mmap and bit wise twiddling - Raspberry Pi

2012-05-02 Thread Petr Jakes
= GPIO() LED01 = gpio.pin04 LED01 = 1 # led diode is shining (or gpio pin 4 is set) LED01 = 0 # led diode is off General suggestions, how to organise this work are more then welcome. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: How to convert simple B/W graphic to the dot matrix for the LED display/sign

2012-03-05 Thread Petr Jakes
> >>> import Image > >>> im=Image.new('L', (100,100)) > >>> im=im.convert('1') > >>> px=im.load() > >>> px[0,0] Thanks, load() method works great. One more question. Finally, I would like to store array in the database. What is the best way to store arrays? Petr -- http://mail.python.org/

Re: How to convert simple B/W graphic to the dot matrix for the LED display/sign

2012-03-04 Thread Petr Jakes
> What file format is the graphic in? How big is it? > > What file format do you want it to be? > Now, I am able to create the png file with the resolution 432x64 using PIL (using draw.text method for example). I would like to get the 432x64 True/False (Black/White) lookup table from this file,

How to convert simple B/W graphic to the dot matrix for the LED display/sign

2012-03-04 Thread Petr Jakes
I would like to convert simple B/W graphic to the 432x64 pixel matrix. It is intended to display this graphic on the one color LED matrix sign/display (432 LEDs width, 64 LEDs height). I am experimenting with the PIL, but I did not find solution there. It will be really helpful If somebody here ca

do something in time interval

2008-10-06 Thread Petr Jakes
(0.01) seconds = time.time() if not int(seconds % (5)): if eventFlag: print "5 seconds, hurray" eventFlag = False else: eventFlag = True Best regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

User-defined Exceptions: is self.args OK?

2008-04-16 Thread petr . jakes . tpc
ck, sys print sys.exc_info() traceback.print_exc() Thanks for your replies. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: SQL problem in python

2008-03-08 Thread petr . jakes . tpc
ot; ) q = MyTable.select() for row in q: print row.album, row.filepath for row in MyTable.select(MyTable.q.album == "Pinkk Floyd"): print row.album, row.filepath HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-03-07 Thread petr . jakes . tpc
Finaly, after few experiments, I am using pygame. It comunicates directly with the framebuffer and the performance is excellent. Thanks for your help. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Data aggregation

2008-03-06 Thread petr . jakes . tpc
ll let you put the result of a SELECT into a new > table. > > John Nagle I agree, maybe following can help http://tinyurl.com/32colp Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

property data-descriptor - how to pass additional constants to the get/set method

2008-02-25 Thread petr . jakes . tpc
t)) It works, but it does not look very nice to me. Is there some different/nicer/more pythonic way how to achieve above mentioned? regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread petr . jakes . tpc
> I agree that SDL is probably the best choice but for the sake of > completeness, Gtk can (at least in theory - I've never tried it) be > built against directfb and run without X. from the Pygame Introduction: Pygame is a Python extension library that wraps the SDL library and it's helpers. So y

Re: looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread petr . jakes . tpc
> > is already solved). > > what you are looking for is curse :) > http://docs.python.org/lib/module-curses.html > http://www.ibm.com/developerworks/linux/library/l-python6.html > > renaud Renaud, thanks for your reply. I think I was not specific/clear enough in my first posting. I know the curse

looking for a light weighted library/tool to write simple GUI above the text based application

2008-01-25 Thread petr . jakes . tpc
here for your opinions/experiences/advices. Best regards Petr Jakes http://www.libsdl.org/ http://pyfltk.sourceforge.net/ http://www.pygame.org/news.html http://pyui.sourceforge.net/ http://pyglet.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Pivot Table/Groupby/Sum question

2008-01-04 Thread petr . jakes . tpc
On Jan 4, 4:55 pm, [EMAIL PROTECTED] wrote: > Petr thanks so much for your input. I'll try to learnSQL, especially > if I'll do a lot of database work. > > I tried to do it John's way as en exercise and I'm happy to say I > understand a lot more. Basically I didn't realize I could nest > dictiona

Re: Pivot Table/Groupby/Sum question

2008-01-03 Thread petr . jakes . tpc
can control Excel from Python using win32api, win32com ( http://tinyurl.com/2m3x3v ) HTH Petr Jakes #!/usr/bin/env python # -*- coding: cp1250 -*- import sqlite3 con = sqlite3.connect(":memory:") cur = con.cursor() normalizedInputData=[] subCategories=[] rawData = [['Italy

Re: Pivot Table/Groupby/Sum question

2008-01-02 Thread petr . jakes . tpc
> So the data comes in as a long list. I'm dealing with some > information on various countries with 6 pieces of information to > pivot. Just to make it simple it's like a video store database. The > data is like [Country, Category, Sub Category, Film Title, Director, > Number of Copies]. data

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
): for no in range(10): yield no myNo=property(getInfo) gen=GenExample() print gen.myNo.next() print gen.myNo.next() . . print gen.myNo.next() -- Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
tside class definition). The meaning of my question was: Is it possible to define some general sort of set/get/del/doc rules for the attributes which are defined in the code AFTER the instantiation of an object. I am sending this question even I feel such a "on the fly" creation of th

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
et/del/doc function calls upon access to defined attribute). My question is: is it possible to set the "property" for any attribute when I do not know what will be the name of the attribute in the future? Thanks for your reply Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Pivot Table/Groupby/Sum question

2007-12-29 Thread petr . jakes . tpc
> Yes, I realize Excel has excellent support for pivot tables. However, > I hate how Excel does it and, for my particular excel files, I need > them to be formated in an automated way because I will have a number > of them over time and I'd prefer just to have python do it in a flash > than to do

Re: Pivot Table/Groupby/Sum question

2007-12-29 Thread petr . jakes . tpc
Patrick, in your first posting you are writing "... I'm trying to learn how to make pivot tables from some excel sheets...". Can you be more specific please? AFIK Excel offers very good support for pivot tables. So why to read tabular data from the Excel sheet and than transform it to pivot tabel

Re: Pivot Table/Groupby/Sum question

2007-12-28 Thread petr . jakes . tpc
What about to let SQL to work for you. HTH Petr Jakes Tested on Python 2.5.1 8<-- #!/usr/bin/env python # -*- coding: utf-8 -*- import sqlite3 con = sqlite3.connect(":memory:") cur = con.cursor() inputData=( ('Bob', 'Morn', 240), ('

Re: how to generate html table from "table" data?

2007-12-26 Thread petr . jakes . tpc
n to offend somebody here and I am really grateful for all replies. Thank you Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: how to generate html table from "table" data?

2007-12-26 Thread petr . jakes . tpc
. Such a "reports" can be read by user using web browser later on. I was just trying to find if somebody here can point me to the existing tool, which is suitable for such a task. Anyway thank you for trying me help. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

how to generate html table from "table" data?

2007-12-25 Thread petr . jakes . tpc
ific cells. Googling for a while I have found only this tool: http://pasko.net/PyHtmlTable/ Your tips to some other tools or/and your suggestion how to solve above mentioned will be very helpful. Thanks and regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: doctest + sqlobject (TDD)

2007-12-22 Thread petr . jakes . tpc
Thanks, it works. And thanks for your comments which are worth to think about :) Petr > This has nothing to do with your previous problem. Use > > from __main__ import myFunction, myOtherFunction, ... > > or > > from __main__ import * > > if you prefer "namespace pollution paradise"*. > > Again, i

Re: doctest + sqlobject (TDD)

2007-12-22 Thread petr . jakes . tpc
On Dec 22, 7:05 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > petr.jakes.tpc wrote: While you could either alter the textfile to > > >>> import __main__ as displeje_pokus > > or the module along the lines of > > # not recommended! > from displeje_pokus import TextyDispleje > if __name__ == "__main__

doctest + sqlobject (TDD)

2007-12-22 Thread petr . jakes . tpc
s bellow). When I run "python displeje_pokus.py" I am getting an error (see below) which I am not able to eliminate. thanks for your reply Petr Jakes == displeje_pokus.py == from sqlobject import * class TextyDispleje(SQLObject): pass if __

Re: datetime.time() class - How to pass it a time string?

2007-07-24 Thread Petr Jakes
ever, the __init__() > method only takes integers (which means I'd be forced to parse the > string myself). Does anyone know of a way I can make it use the > string? Thanks. http://pleac.sourceforge.net/pleac_python/datesandtimes.html the part "http://pleac.sourceforge.net

how to analyse music stream

2007-07-24 Thread Petr Jakes
lyse music stream form the PC radio card to get the signal: "first tones of Frozen were played after Sacrifice, call to the studio" :-) Of course, the calling can be made by PC as well, but this is the easiest part of the task :) Thanks for your tips and comments Petr Jakes PS: both, Linux

Re: Catching a key press

2007-07-23 Thread Petr Jakes
On 23 ec, 14:23, westymatt <[EMAIL PROTECTED]> wrote: > linux primarily still a little lost in how to implementent this, > however I understand what you are saying. maybe you can use this: http://tinyurl.com/2zyfmw HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with PySMS

2007-05-27 Thread Petr Jakes
Maybe you can try python binding for gammu, which works great for me. HTH Petr Jakes http://cihar.com/gammu/python/ -- http://mail.python.org/mailman/listinfo/python-list

Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
Hi Dennis, thanks for your reply. Dennis Lee Bieber napsal: > > def dataOnSerialPort(): > > data=s.readLine() > > Unless you are using a custom serial port module, that should be > s.readline() sorry for the typo > > > if data: > > return data > > else: > > return

Re: writing serial port data to the gzip file

2006-12-18 Thread Petr Jakes
Maybe I am missing something. Expect data is comming continually to the serial port for the period say 10min. (say form the GPS), than it stops for 1 minute and so on over and over. I would like to log such a data to the different gzip files. My example was written just for the simplicity (I was tr

writing serial port data to the gzip file

2006-12-17 Thread Petr Jakes
serial port. It looks like g.close() does not close the gz file. I was reading in the doc: Calling a GzipFile object's close() method does not close fileobj, since you might wish to append more material after the compressed data... so I am completely lost now... thanks for your comments.

unicode mystery/problem

2006-09-20 Thread Petr Jakes
looks strange, I have to use str(a) syntax even I know the "a" variable is a string. I am trying to use ChartDirector for Python (charts for Python) and the method "layer.addDataSet()" needs above mentioned syntax otherwise it returns an Error. layer.addDataSet(data, colour,

import gtk RuntimeError: could not open display

2006-09-11 Thread Petr Jakes
Hi my script is working well when I am running it from the terminal window. While I am trying to start it as a Cron job, I am getting an Error described bellow: My configuration: Pentium III, Python 2.4.1, Fedora Core4 Thanks for your comments. Petr Jakes File "/root/eric/analyza_da

Re: technique to enter text using a mobile phone keypad (T9 dictionary-based disambiguation)

2006-08-09 Thread Petr Jakes
Thanks a lot. It works flawlessly and I have learned few new Python "tricks" as well. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: break the loop in one object and then return

2006-06-27 Thread Petr Jakes
t;debugging" purposes. Finally you will remove it. For example you can put: print "starting the strt function", "mynum = ", mynum, "yournum =", yournum on the first row of your strt function, so you will see the code is going through there. Finally: Try to thi

Re: break the loop in one object and then return

2006-06-26 Thread Petr Jakes
urnum < 101" you should test if the input is an integer as well.. http://tinyurl.com/j468c Other suggested here which way to go. Good luck :) Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Char-I/O Dialogs for Win32 and DOS

2006-06-14 Thread Petr Jakes
o the > kit ? TIAMR You can try: Dialog http://invisible-island.net/dialog/ HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Most elegant way to generate 3-char sequence

2006-06-11 Thread Petr Jakes
o my less elegant > co-workers can figure out what I was trying to accomplish. > > Sam Schulenburg +1 Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: what are you using python language for?

2006-06-07 Thread Petr Jakes
hacker1017 wrote: > im just asking out of curiosity. a vending machine controlled from the PC (peripherals connected using I2C bus (SMBus) and the MDB coin change-giver and the bill acceptor connected to the serial port). Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

what is the reasonable (best?) Exception handling strategy?

2006-06-01 Thread Petr Jakes
specific answers to the above mentioned code example. Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: do "some action" once a minute

2006-05-09 Thread Petr Jakes
Thanks for your comment. It is mainly English issue (I am not native English speaker). OK, to be more specific, I would like to run the code, when the value of seconds in the timestamp become say "00". The whole code will run in the infinitive loop and other actions will be executed as well, so it

do "some action" once a minute

2006-05-08 Thread Petr Jakes
irst occur of sec==0 only!! polling 10x a second minutes=min print "Eureca" time.sleep(0.1) Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: eric3 3.9.0 released

2006-05-06 Thread Petr Jakes
I think you can get the answer on http://www.die-offenbachs.de/detlev/eric3-mailinglist.html rather then here. HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I use python for this .. ??

2006-05-04 Thread Petr Jakes
off). Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: milliseconds are not stored in the timestamp KInterbasDB + Firebird

2006-05-03 Thread Petr Jakes
/kinterbasdb-3.2_pre_20060503.win32-FB-2.0-py2.4.exe Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Polling from keyboard

2006-05-02 Thread Petr Jakes
I am using following code which I have found on http://www.ibiblio.org/obp/py4fun/ few months ago. It works well for my purposes. Another way is to use Curses library. HTH Petr Jakes #!/usr/local/bin/python # # t t y L i n u x . p y # # getLookAhead reads lookahead chars from the keyboard

milliseconds are not stored in the timestamp KInterbasDB + Firebird

2006-05-02 Thread Petr Jakes
Firebird CS 1.5, Python 2.4.1, KInterbasDB 3.2b1 Thanks for your advices. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Databases in Python

2006-04-29 Thread Petr Jakes
Thank you very much, Steve. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Databases in Python

2006-04-28 Thread Petr Jakes
I have got Steven's book of course (it is excellent IMHO). I was just thinking some new approaches can be found in the tutorial. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Using Databases in Python

2006-04-28 Thread Petr Jakes
I would like to know if anybody can point me to the site, where it is possible to find the tutorial "Using Databases in Python" which is mentioned by Steve Holden here: http://tinyurl.com/ectj8 Thanks Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Coming from delphi - looking for an IDE - willing to spend money

2006-04-26 Thread Petr Jakes
Eric3 is great IMHO. http://www.die-offenbachs.de/detlev/eric3.html -- http://mail.python.org/mailman/listinfo/python-list

Re: kinterbas and Python

2006-04-04 Thread Petr Jakes
Jarek, I am using it always like in the following example to connect to the remote host and it works for me flawlessly. Petr Jakes import kinterbasdb as k con = k.connect( host='router.maren.cz', database='/data/sysdat01.gdb', user='SYS

Re: excel application

2006-03-29 Thread Petr Jakes
discussion groups before posting questions (I am not saying it is a bad idea to ask here, I am only trying to show an simple alternative how to get an answers to your questions to you) HTH Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: accesibility of the namespace

2006-03-09 Thread Petr Jakes
red in the dictionary with the strings. Any other suggestions? Thanks Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: accesibility of the namespace

2006-03-09 Thread Petr Jakes
Thanks Steven, credit is mentioned to be a calculated value changed at run-time and your "third hand" suggestion is exactly what I was looking for. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

accesibility of the namespace

2006-03-09 Thread Petr Jakes
ke: lcd={2:"Your credit= %3d" % (credit)} While I am trying to import my_dictionary in to the main code, I am getting: exception unhandled NameError name "credit" is not defined How can I organize my code so the "credit" variable will be "visible" in

Re: Pyserial again

2006-03-07 Thread Petr Jakes
l(0, 9600, 8, "E", stopbits=2, timeout=1) (it was recommended to you in above mentioned posting as well) You can find plenty of examples on http://pyserial.sourceforge.net/ in the "Examples" paragraph. Try to study and search before you ask. HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial again

2006-03-06 Thread Petr Jakes
Grant and Steve, I am wowed and amazed how supportive and helpful you (and other people in this group as well of course) are. Thanks. (sorry for OT) Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: spliting on ":"

2006-03-04 Thread Petr Jakes
> I think you're getting caught by the classic and/or trap in Python, > trying to avoid using a simple if statement. What do you mean by "the classic and/or trap"? Can you give an example please? Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Indentation Problems

2006-03-01 Thread Petr Jakes
the troubles with indentation anymore. HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: pyserial

2006-02-24 Thread Petr Jakes
imple and short code first, so you will be able to understand how to communicate with the serial port. HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: pyserial

2006-02-23 Thread Petr Jakes
put()) Does it print out something? Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial never read

2006-02-22 Thread Petr Jakes
Well, I think it is better to start with some simple code first. Try to read serial port and print it out. something like this could work: import serial s = serial.Serial(port=2,baudrate=38400, timeout=20) while 1: print s.readline() Petr Jakes -- http://mail.python.org/mailman/listinfo

Re: how to break a for loop?

2006-02-20 Thread Petr Jakes
zero_list=[0,0,0,0,0,1,2,3,4] for x in range(len(zero_list)): if zero_list[x]!=0: break nonzero_list=zero_list[x:] print nonzero_list but some more "pythonic" solutions will be posted from other users I guess :) HTH Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: editor for Python on Linux

2006-02-20 Thread Petr Jakes
Endless stories about IDEs (try to browse through this discussion group first). Of course it depends about users personal needs and taste. So install them and try them (I know, it's really time consuming). I thing there is not the other way to decide which one is the best for YOU. Petr

how to get function names from the file

2006-02-15 Thread Petr Jakes
like to read the file with the function names sequences # and to create tuple which will contain the function names. # After that I would like to call functions from the tuple: functions=(printFoo, printFOO) for function in functions: function() Thanks for your postings Petr Jakes -- http://ma

Re: What editor shall I use?

2006-02-08 Thread Petr Jakes
http://www.pspad.com/en/ Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: tricky regular expressions

2006-02-07 Thread Petr Jakes
ot;] for title in range(len(titles)): if titles[title][:6] =="Title:": x=1 try: while titles[title+x]!="Request : Play" and titles[title+x]!="Request : next": x+=1 pass print titles[title], titles[title+x] except IndexError: pass HTH Petr Jakes PS: just wonder why are you asking the same question in two different topics -- http://mail.python.org/mailman/listinfo/python-list

Re: how to parse structured text file?

2006-01-31 Thread Petr Jakes
Sorry I was not precise enough in my description. In the file, there is of course more sections starting with the keyword type: I would like to only analyze sections which start with the sequence: type: 4 Petr jakes -- http://mail.python.org/mailman/listinfo/python-list

how to parse structured text file?

2006-01-31 Thread Petr Jakes
I have a file which contains data in the format shown in the sample bellow. How can I parse it to get following: (14,trigger,guard,do_action,15) Thanks a lot for your postings Petr Jakes type: 4 bgrColor: 255 255 255 fgrColor: 0 0 0 objId: 16 Num.Pts: 2 177 104 350 134 objStartId: 14 objEndId

Re: Python code written in 1998, how to improve/change it?

2006-01-28 Thread Petr Jakes
store state/transition dependencies). Tanks to all for your previous postings. Petr Jakes State machine example, for the pull/push button mentioned earlier in this discussion thread class FSM: '''the "states" dictionary contains user defined "st

Re: Python code written in 1998, how to improve/change it?

2006-01-22 Thread Petr Jakes
Sorry for the typo in my previous posting. Of course it has to be: simple liftt/push ON/OFF button -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code written in 1998, how to improve/change it?

2006-01-22 Thread Petr Jakes
Sorry, I can't get in. Can you please show me, how to use your approach on the simple push/push ON/OFF button for example please? PS: seriously it is not a homework :) and I feel it like a shame I am asking such a simple questions :( States: ON, OFF Transition event: "push", "lift" transition di

Re: Python code written in 1998, how to improve/change it?

2006-01-19 Thread Petr Jakes
st lost with subclass and mapping attributes etc. while trying to study the code in the example (http://tinyurl.com/a4zkn). All I wanted to know, if, thanks to the improvements in the Python functionality over the years, it is possible to simplify somhow the old code. Otherwise I have to dig through :)

Python code written in 1998, how to improve/change it?

2006-01-19 Thread Petr Jakes
principles used in this code are still valid in the "modern" Python and if/how it can be improved (revrited) using futures of current version of Python. Thanks for your comments for a "newbie" and for your patience. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: termios.tcgetattr(fd) error: (22, 'Invalid argument')

2005-11-19 Thread Petr Jakes
To provide some feedback: As Grant Edwards posted in this list, I was running my code inside of IDE that replaces sys.stdin with some other. While running the program from a shell prompt, everything goes fine. Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

termios.tcgetattr(fd) error: (22, 'Invalid argument')

2005-11-19 Thread Petr Jakes
On my box (Fedora Core4, Python 2.4.1) I am getting following error: >>> import termios, sys >>> fd = sys.stdin.fileno() >>> oldSettings = termios.tcgetattr(fd) Traceback (innermost last): File "", line 1, in ? error: (22, 'Invalid argument')

Re: UART parity setting as "mark" or "space" (using Pyserial???)

2005-11-12 Thread Petr Jakes
ifics. It is necessary to control parity bit setting before sending each communication byte. Regards Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

Re: convert string to the "escaped string"

2005-11-12 Thread Petr Jakes
Fredrik, thanks for your posting. I really appretiate your reply and your way how you kindly answer even stupid newbie's questions on this mailing list. I was trying: int("0xf") but I did not have idea about the optional "base" parameter for the int function. Thanks a lot. Petr -- http://mail.py

Re: convert string to the "escaped string"

2005-11-12 Thread Petr Jakes
small mistake in my previous posting, sorry from "0xf" I need "\xf" of course and mentioned code gives me "\0xf" of course. Thanks for your postings Petr Jakes -- http://mail.python.org/mailman/listinfo/python-list

convert string to the "escaped string"

2005-11-12 Thread Petr Jakes
Hi, I am trying to convert string to the "escaped string". example: from "0xf" I need "\0xf" I am able to do it like: a="0xf" escaped_a=("\%s" % a ).decode("string_escape") But it looks a little bit complicated in this

UART parity setting as "mark" or "space" (using Pyserial???)

2005-11-03 Thread Petr Jakes
a one-bit. For space parity it's always a zero-bit. Does anybody here knows some "tricks" how to set up the mark and space parity on the UART (using pyserial???), so I can simulate 9bit communication? (I know it sounds silly, but I would like to try to re-configure the UART parity before