Python Software to Scotty Spectrum Analyser : PySlim
PySlim is the Python version of the software created by Scotty to manage the Slim. The methodology that I use is object oriented, and in the following graphs I will show the inner structure of the program.
Requirements
Python Download
You can get the latest Python release from: http://www.python.org/download/ For Windows, it is possible to download the msi file: this Windows installer asks for the Installation Path that defaults to c:\Python26
Download
You could download the program in www.miginternacional.com/~juanfe/pyslim.git by:
git clone http://www.miginternacional.com/~juanfe/pyslim.git pyslim
or if you already has cloned it you could just do in the directory pyslim:
git pull
Instalation
PySlim require python instaled in your computer, to install Python look in:
http://wiki.python.org/moin/BeginnersGuide/Download
Before you begin you must install the parallel library, in bo
Instalation parallel port library in Windows
You must install the pyparallel, you could download from sourceforge in http://sourceforge.net/project/showfiles.php?group_id=46487&package_id=77441. I don't know who to install it.
I never use windows, but I found that you could download the file inpout32, put it in the directory system32, and in Python run:
from ctypes import windll
p = windll.inpout32
p.Inp32(0x378) #default 255(all high) on my pc
p.Out32(0x378, 0) #put all low on port 2-9if you have duds could read the web page, or the page.
Instalation parallel port in Linux
In Linux you must install pyparallel, in Debian is a package and you cold install like this:
apt-get install python-parallel
in other distro you could install following the instruction in the web page.
Remove the module lp and install the modules ppdev and parport in the kernel, like super user:
su rmmod lp modprobe ppdev modprobe parport_pc
add to /etc/modules the following line to be loaded at boot time:
alias parport_lowlevel parport_pc
and to the file /etc/rc.local add the line "rmmod lp", before the line "exit 0", this is because any reboot the lp module is loaded. This is in Debian, I do not how to make in other distro.
To see the device permission use:
ls -la /dev/parport0
And to change the device permission, use:
addgroup juanfe lp
if you like you could make:
cat /etc/group | grep lp
You could see something like:
lp:x:7:juanfe lpadmin:x:109:
After that restart the session.
If those does not work, you could try editing the file /etc/group in the line assigned to lp, to grand a "juanfe" user changing the line to look like:
lp::7:daemon,lp,juanfe or lp:x:7:daemon,lp,juanfe
In the following web page there are a cool description of the installation of the module.
Runing PySlim
Once you have download pyslim in your working directory, there must exit in the same directory the files pyslim.py, config.txt, mod.py and slimlib.py "the intention is to eliminate this las asap".
I never use windows, to run pyslim in windows see the "web page", and there must say what to do.
In linux, just run in the working directory:
./pyslim.py
User Case Diagram
Class Diagram