Author: | Tom Oakley |
---|---|
Copyright: | Copyright (c) 2008 - 2013 Tom Oakley. |
pylibra
is an application to read data from a serial port, parse it
into useful chunks, and write the data to a file.
If you notice any problems, please create a new ticket.
pip install py2exe pyserial
git clone https://github.com/blokeley/pylibra.git
cd pylibra
python setup.py py2exe
- edit the libra.cfg file to set the correct serial settings and column headings for your data. the regular expression line ("regex") defines how pylibra searches serial data for the data you want. see http://docs.python.org/library/re.html for details on regular expression formats.
- for the graphical user interface, run
pylibragui.exe
- for the command line interface, open a command prompt window
(
cmd.exe
), then use cd to change directory to where pylibra is and runpylibra.exe
- select start to start polling the serial port for data. data are automatically saved in a file called data.csv in the current working directory.
- install pyserial. for example, on ubuntu or debian open a terminal as root
and type
apt-get install pyserial
- run
git clone https://github.com/blokeley/pylibra.git
To run the command line interface, open a shell terminal, cd
to the
directory containing pylibra and type python pylibra.py
To run the graphical user interface, either double-click on pylibragui.py
in a graphical file manager, or open a shell terminal, cd
to the
directory containing pylibra and type python pylibragui.py
To develop pylibra you need a python interpreter and a couple of libraries. If you are using Windows, use the Windows installers for pyserial, py2exe and wxPython rather than setuptools/easy_install.
- Python 2.6+ interpreter. Note that 3.0+ has not been tested and probably will not work.
- pySerial serial port library. Install pyserial using the Windows executable rather than easy_install so that py2exe can find the serial package.
- py2exe to create the Windows executable.
- wxPython for the GUI.
- A good text editor.
- Choose a ticket to address from https://github.com/blokeley/pylibra/issues
- Make a server-side clone on github
- Clone from your server-side repo using
git clone https://github.com/USER/pylibra.git
where USER is your user name - If at all possible, write a unit test or tests to expose the problem.
- Create a feature branch on your local repo using
git checkout -n BRANCHNAME
- Solve the problem.
- If you want to build a Windows executable, open a terminal and run
python setup.py py2exe
. - Test as much as possible.
- Update the documentation if you make any changes noticeable to the user.
- Commit using
git commit -m
with a helpful commit message, preferably referencing the ticket with#xx
where xx is the ticket number. - Push your changes to your server-side repo using git push
- Create a pull request on github.
- Download docutils.
- Make sure that
C:\Python26\Scripts
is on yourPATH
environment variable.