Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread c d saunter
I did a double take when debugging an error the other day. My problem was missing out a comma when building a list of strings. Much to my surprise the offending code still executed to cause problems later on: txt = 'this', 'works' print txt ('this', 'works') # As expected txt = 'this'

Re: Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread c d saunter
Bruno Desthuilliers (bruno.42.desthuilli...@websiteburo.invalid) wrote: : c d saunter a écrit : : I did a double take when debugging an error the other day. My : problem was missing out a comma when building a list of strings. : : Much to my surprise the offending code still executed

Re: Parsing VHDL with python, where to start.

2008-07-23 Thread c d saunter
Svenn Are Bjerkem ([EMAIL PROTECTED]) wrote: : Hi, : I am in the need to write an application for PyQt to visualise the : structure of a VHDL project I am working on. Looking for a sensible : way to parse VHDL files and putting them into a data structure that : PyQt can represent as a tree (or

Re: Parallel port control with USB-Parallel converter

2008-02-14 Thread c d saunter
Soren, I don't know about the USB parallel port converters but there are variousways you can add USB connectivity yourself. A simple way are the USB devices from FTDI (http://www.ftdichip.com/FTProducts.htm) Either the FT232R or the FT245R. These are both single chip solutions that

Re: Parallel port control with USB-Parallel converter

2008-02-14 Thread c d saunter
want the 245. regards cds c d saunter ([EMAIL PROTECTED]) wrote: : Soren, : I don't know about the USB parallel port converters but there are : variousways you can add USB connectivity yourself. : A simple way are the USB devices from FTDI : (http://www.ftdichip.com/FTProducts.htm

Windows AVIFile problems

2008-01-25 Thread c d saunter
Hi All, I'm trying to access individual video frames of an AVI file from within Python 2.4 or 2.5 under Windows XP. I have found this example code here for that does exactly what I want, using the windows avifile.dll but I am unable to find the AVIFile.h header...

Re: Windows AVIFile problems

2008-01-25 Thread c d saunter
Thomas Heller ([EMAIL PROTECTED]) wrote: : c d saunter schrieb: : Hi All, : : The dll is not corrupt. It is the 16-bit dll, possibly present for legacy : 16-bit support. Thomas, Thanks, that explains a lot. Regards, Chris Saunter -- http://mail.python.org/mailman/listinfo

Re: Getting rid of bitwise operators in Python 3?

2007-09-23 Thread c d saunter
: arguments and dicts, which are lot more versatile. Another major use, : talking to hardware, is not something oft done in Python either. Are you sure? I've been doing lots of exactly that for 4 years, and I'm not the only one round here... Python makes an excellent language for talking to

Re: Fastest Way To Loop Through Every Pixel

2006-07-28 Thread c d saunter
Chaos ([EMAIL PROTECTED]) wrote: : He is the code #Actions here : myCol = (0.3 * image.GetRed(thisX, thisY)) + (0.59 * : image.GetGreen(thisX, thisY)) + (0.11 * image.GetBlue(thisX, thisY)) : if myCol darkestCol: :darkestCol = myCol :possX = thisX :possY = thisY You really don't

Re: Robotics and parallel ports

2005-12-17 Thread c d saunter
Isaac T Alston ([EMAIL PROTECTED]) wrote: : Thanks for everyone's tips and hints. I WILL MAKE THIS WORK! I think I'll : take your advice and use the serial port instead of the parallel port - I : won't have that much data to send (in comparison with, for example, : industrial level applications).

Re: Robotics and parallel ports

2005-12-15 Thread c d saunter
Isaac T Alston ([EMAIL PROTECTED]) wrote: : Heiko Wundram wrote: : Maybe it's what you're looking for. : Thanks for that. I've never actually built a robot or anything like that : before, so I'm welcome to any advice I can get! I've heard programming via : USB is hard, so that's why I'm using

Re: Using Python to add thumbnails to Explorer

2005-11-02 Thread c d saunter
John J. Lee ([EMAIL PROTECTED]) wrote: : Roger Upole [EMAIL PROTECTED] writes: : Or, if not, then you can do it with module ctypes. : http://starship.python.net/crew/theller/ctypes/ : There's an O'Reilly book called something like win32 shell : programming that covers this stuff. : John

Using Python to add thumbnails to Explorer

2005-10-26 Thread c d saunter
Greetings All, In Widows Explorer there is a thumbnail view, where you see images as thumbnails. Applications such as MS Office and OpenOffice, when installed, cause their respective filetypes to be previewed as thumbnails as well. Thumbnails are stored in the Thumbs.db hidden file.

Re: Jpg

2005-10-26 Thread c d saunter
Tuvas ([EMAIL PROTECTED]) wrote: : I am building a GUI interface at the moment, and would like to have : support for displaying a jpg file, and a FITS file if possible. Is : there any way to do this? My interface has been written in Tkinter at : the moment, especially because of it's great

Re: Using Python to add thumbnails to Explorer

2005-10-26 Thread c d saunter
Hi Roger, Thanks for the info - I was actually interested in custom per file thumbnails rather than icons, but your message sentt me pouring through seemingly relevent parts of the registry - however what I need isn't there. Turns out I need to use a .dll shell

Re: Decline and fall of scripting languages ?

2005-08-07 Thread c d saunter
Kay Schluehr ([EMAIL PROTECTED]) wrote: : No good news for scripting-language fans: : http://www.phpmag.net/itr/news/psecom,id,23284,nodeid,113.html Just as well I ditched a scripting language for Python then... cds -- http://mail.python.org/mailman/listinfo/python-list

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread c d saunter
Novice Experl ([EMAIL PROTECTED]) wrote: : I'd like to write a simple application that interfaces with the parallel port, and changes the data on it according to keyboard input. I hope I can get it to run under windows xp and / or windows 2000. : How can I do this? What do I need to know? It

Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread c d saunter
in Basic. These days it's almost impossible without special kit and lots of know how. Heck, the old BBC Mirco had raw IO capabilites as fast as an IBM parallel port, and more flexible to boot. Progress. A real pain for rd types. --- cds c d saunter ([EMAIL PROTECTED]) wrote: : Novice Experl

Re: When someone from Britain speaks, Americans hear a British accent...

2005-06-28 Thread c d saunter
Michael Hoffman ([EMAIL PROTECTED]) wrote: : muldoon wrote: : Americans consider having a British accent a sign of sophistication : and high intelligence. Many companies hire salespersons from Britain to : represent their products,etc. Question: When the British hear an : American accent, does

Re: Jython Phone Interview Advice

2005-03-15 Thread c d saunter
George Jempty ([EMAIL PROTECTED]) wrote: : I'm undergoing a phone interview for a Jython job today. Anybody have : practical advice for me? I haven't worked with Python in years, but I : have been working with Java in the meantime (resume at : http://scriptify.com/george_jempty_resume.pdf).

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread c d saunter
Alex Martelli ([EMAIL PROTECTED]) wrote: : I'm considering proposing to O'Reilly a 2nd edition of Python in a : Nutshell, that I'd write in 2005, essentially to cover Python 2.3 and : 2.4 (the current 1st edition only covers Python up to 2.2). : So, if there's any advice or request about a 2nd