Re: Python vs. Fedora and CentOS

2010-05-29 Thread Wesley Brooks
I've got Fedora 10 here with 2.5, and 11 at the office with 2.6. On 29 May 2010 19:58, Paul Rubin wrote: > John Nagle writes: >>   The major Red Hat based Linux distros are still shipping with Python 2.4. > > Fedora 12 ships with Python 2.6, I think. > -- > http://mail.python.org/mailman/listinf

Re: How to run a repeating timer every n minutes?

2009-10-29 Thread Wesley Brooks
I use the wx.Timer for this: import wx timer = wx.Timer(self, -1) # update gui every 1/4 second (250ms) timer.Start(250) Bind(wx.EVT_TIMER, OnUpdateValues) In the above I'm running the OnUpdateValues function every 250ms. Regards, Wesley Brooks 2009/10/29 VYAS ASHISH M-NTB837 > &g

Re: Python 3D CAD -- need collaborators, or just brave souls :)

2009-03-06 Thread Wesley Brooks
Greetings All, I've been watching this thread since it kicked off with interest. I'd be interested in being kept in the loop with the development of this project as I have made some very simple CAD like tools for Layer Manufacturing (also known as Rapid Prototyping) machines in the past and would

Re: BadZipfile "file is not a zip file"

2009-01-09 Thread Wesley Brooks
I missed the begining of this thread and so appologise if I'm repeating what someone else has said! I had a very similar problem with this error and it turned out it was due to me moving a file across a socket connection and either not reading it or writing it in the binary mode, ie open(filename,

Error from zipfile

2008-07-01 Thread Wesley Brooks
e I have emptied the zip file, created a new one, opend all the files in wordpad and saved them, then put the contents into the new file. Still no joy. Any help would be greatly appreciated. On linux I'm running python 2.5 and on windows it is 2.4. Thanks, Wesley Brooks. -- http://mail.py

Re: Python Success stories

2008-04-22 Thread Wesley Brooks
http://panela.blog-city.com/python_at_google_greg_stein__sdforum.htm Google big enough? ...or look at the companies on the "NASA uses Python... ...so does:" box on the top (nearly top any how!) right of http://www.python.org/ On 22/04/2008, azrael <[EMAIL PROTECTED]> wrote: > Which big aplicatio

Re: readline() - problem

2007-10-02 Thread Wesley Brooks
ird character in each line: for line in file: if (line != '') and (len(line) > 2): if line[2] == '1': print "Got line:", line Would give: Got line: 1 1 Got line: 3 1 Cheers, Wesley Brooks On 02/10/2007, [EMAIL PROTECTED] <[EMAIL PROTE

Re: concise code (beginner)

2007-09-05 Thread Wesley Brooks
Sorry, just seen a mistake in my code, however Diez beat me to what I was actually thinking! Wes On 05/09/07, Wesley Brooks <[EMAIL PROTECTED]> wrote: > Try adding all the functions into a list such as; > > funcList = [dev.read1, dev.read2, dev.read3] > > for func in func

Re: concise code (beginner)

2007-09-05 Thread Wesley Brooks
Try adding all the functions into a list such as; funcList = [dev.read1, dev.read2, dev.read3] for func in funcList: for dev in devs: try: func() except: print exception remove dev from devs Wes. On 05/09/07, bambam <[EMAIL PROTECTED]> wrote: >

Re: Calling a dos batch file from python

2007-09-05 Thread Wesley Brooks
I looked into this a little while ago so I could get the MAC address of a machine while on linux or windows. Here's a simplified version that just does the windows side; self.macMatch = re.compile(r"((\w\w[:-]){5}\w\w)") data = os.popen("ipconfig /all", 'r') text = data.read() tup = self.macMatch.

Re: Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

2007-07-09 Thread Wesley Brooks
For a robotics project I would highly recommend the use of Phidgets, they can supply sensors and interface kits with APIs. Not sure if Python is fully supported yet but there certinally seems to be a considerable effort ongoing creating an API for python. I've only used them to date for servo contr

type classobj not defined?

2007-01-03 Thread Wesley Brooks
ed For the time being I'll use b.__name__ == b to ensure I'm getting the right class. Is there a reason why the other types such as bool are defined but classobj isn't? I'm running the following version of python: Python 2.4.3 (#1, Jun 13 2006, 11:46:08) [GCC 4.1.1 20060525

Re: function v. method

2006-07-25 Thread Wesley Brooks
(Apollogies to fuzzylollipop for replying to them rather than the list!) Python does have ALREADY have an OFFICAL mechanism for private members, prefix your names with _ or __. Both are ommited from autogenerateddocuementation and both are OFFICALLY not supposed to be used.Could you elaborate on th

XP64 64 Bit Linux and Programming Best Practice Guide

2006-05-22 Thread Wesley Brooks
++? I would like to know which features are best to use and which are best to avoid when optimising for speed and or memory usage. Thanks in advance of any advice.Yours Faithfully,Wesley Brooks -- http://mail.python.org/mailman/listinfo/python-list

Controlling non-python programs with python

2006-05-09 Thread Wesley Brooks
Dear All,Tried to post once before but it seemed to get trapped in the system due to a suspect heading.I would like to create and pass keyboard, mouse, and analogue device events another program in order to control it, perhaps over a network if it requires too much processing power to be done on th

Passing events

2006-05-01 Thread Wesley Brooks
steering wheels and pedals?Thanks again in advance of any help.Yours Sincerely,Wesley Brooks -- http://mail.python.org/mailman/listinfo/python-list

Python based file format cracking

2006-05-01 Thread Wesley Brooks
Dear Users,Is there another tool that can examine an string for undefined repeating patterns? I'm aware of and have limited experience regular expressions which finds supplied patterns within a string. Yours Faithfully, Wesley Brooks -- http://mail.python.org/mailman/listinfo/python-list