Re: [Tutor] Python Job Scheduling package

2011-10-15 Thread Steven D'Aprano
bod...@googlemail.com wrote: Have you thought about writing your own? Others have posted some useful links, but in all honesty you could hack something together to achieve that in next to no time Anyone can "hack something together" in next to no time, but getting a quality package that is wel

Re: [Tutor] Windows vs Linux processing speed.

2011-10-15 Thread Steven D'Aprano
Steven D'Aprano wrote: Very few program's speed are greatly dependent on raw processor speed. Processor speed is one of the great marketing gimmicks of all time. Of course it has *some* effect, but the bottleneck is almost never the CPU, and usually the speed of getting data and/or code out of

Re: [Tutor] Running a loop

2011-10-15 Thread Steven D'Aprano
Jason Barry wrote: I am using Windows 7 and python 3.1. This is a block from a slot machine code. It takes the random generated words and indicates if it wins or loses. I can't figure out why it wants to print the last print statement 'Loser' no matter if the elif statements are true. Alan has

Re: [Tutor] Can I set LD_LIBRARY_PATH within a .py file?

2011-10-15 Thread Hugo Arts
On Sat, Oct 15, 2011 at 9:51 PM, Albert-Jan Roskam wrote: > Hello, > Can I set the LD_LIBRARY_PATH environment variable (on-the-fly) within a .py > file? > I would like to use an .so-file that lives in a non-standard location. > > This does not work: > try: >    os.environ["LD_LIBRARY_PATH"]  += (

Re: [Tutor] Running a loop

2011-10-15 Thread Robert Sjoblom
> Subject: [Tutor] Running a loop > I am using Windows 7 and python 3.1. This is a block from a slot machine > code. It takes the random generated words and indicates if it wins or loses. > I can't figure out why it wants to print the last print statement 'Loser' no > matter if the elif statements

[Tutor] Can I set LD_LIBRARY_PATH within a .py file?

2011-10-15 Thread Albert-Jan Roskam
Hello, Can I set the LD_LIBRARY_PATH environment variable (on-the-fly) within a .py file? I would like to use an .so-file that lives in a non-standard location. This does not work: try:    os.environ["LD_LIBRARY_PATH"]  += (":" + path) except KeyError:    os.environ["LD_LIBRARY_PATH"] = pat

Re: [Tutor] Running a loop

2011-10-15 Thread Alan Gauld
On 15/10/11 16:58, Jason Barry wrote: wheel1=['ZOMBIE', 'WITCH', 'CAT', 'GHOST', 'CANDY','PUMPKIN','PUMPKIN','CANDY', 'GHOST','CANDY'] def checkwin (wheel1index, wheel2index, wheel3index): if wheel1index=='zombie' and wheel2index=='zombie' and wheel3index== 'zombie': The values are define

[Tutor] Running a loop

2011-10-15 Thread Jason Barry
I am using Windows 7 and python 3.1. This is a block from a slot machine code. It takes the random generated words and indicates if it wins or loses. I can't figure out why it wants to print the last print statement 'Loser' no matter if the elif statements are true. import random wheel1=['ZOMB

Re: [Tutor] Windows vs Linux processing speed.

2011-10-15 Thread Emile van Sebille
On 10/14/2011 9:45 AM Tony Pelletier said... I have a question regarding the speed of my program on linux in comparison to windows. I mainly use windows, but I tend to use Arch Linux at home. When I run it via windows, it's relatively slow and didn't really bother me, but when I ran it at

Re: [Tutor] ctypes and arrays of pointers

2011-10-15 Thread Albert-Jan Roskam
 Hi, Got it already. Here's some incomplete code that shows how it could be done: # Pointer to array of pointers to labels labelsPtr = ctypes.pointer((ctypes.POINTER(ctypes.c_char_p) * MAX_ARRAY_SIZE)()) retcode = self.theLib.GetValueLabels(self.fh, varName, valuesPtr, labelsPtr, numLabelsPt