generator object, next method

2005-09-08 Thread simonwittber
>>> gen = iterator() >>> gen.next >>> gen.next >>> gen.next >>> gen.next >>> gen.next is gen.next False What is behind this apparently strange behaviour? (The .next method seems to alternately bind to two different objects) Sw. -- http://mail.python.org/mailman/listinfo/python-list

Re: python profiling, hotspot and strange execution time

2005-09-08 Thread cournape
> OK - first of all, as someone else has asked, what platform are you > running? I'm assuming it's windows since you're referring to > time.clock() and then later saying "wall clock". Actually, no. I am working on a x86 linux (HT disabled for this testing, as I thought it may introduce some sub

Re: generator object, next method

2005-09-08 Thread Peter Otten
[EMAIL PROTECTED] wrote: gen = iterator() gen.next > Behind the scene, gen.next is bound to _, i. e. it cannot be garbage-collected. Then... gen.next > a new method wrapper is created and assigned to _, and the previous method wrapper is now garbage-collected. The memory locati

pretty windows installer for py scripts

2005-09-08 Thread rbt
Any recommendations on a windows packager/installer that's free? I need it to allow non-tech users to install some python scripts... you know, "Click Next"... "Click Next"... "Click Finish"... "You're Done!" and everything just magically works ;) -- http://mail.python.org/mailman/listinfo/python-l

Re: CGI File Uploads and Progress Bars

2005-09-08 Thread Diez B. Roggisch
> So, bottom line: Does anyone know how to get the size of the incoming file > data without reading the whole thing into a string? Can I do something with > content_header? http://www.faqs.org/rfcs/rfc1867.html It seems that _maybe_ you can use the content-length http header. But it looks as if

Re: generator object, next method

2005-09-08 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > gen = iterator() gen.next > gen.next > gen.next > gen.next > gen.next is gen.next > False > > > What is behind this apparently strange behaviour? (The .next method > seems to alternately bind to two different objects) It is a combination

Re: generator object, next method

2005-09-08 Thread Paul Rubin
Duncan Booth <[EMAIL PROTECTED]> writes: > 1) Every time you access gen.next you create a new method-wrapper object. Why is that? I thought gen.next is a callable and gen.next() actually advances the iterator. Why shouldn't gen.next always be the same object? -- http://mail.python.org/mailman/l

Re: determine if os.system() is done

2005-09-08 Thread Martin Franklin
Xah Lee wrote: > suppose i'm calling two system processes, one to unzip, and one to > “tail” to get the las t line. How can i determine when the first > process is done? > > Example: > > subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]); > > last_line=subprocess.Popen([r"/usr/bin/tail",

Re: generator object, next method

2005-09-08 Thread simonwittber
> Why is that? I thought gen.next is a callable and gen.next() actually > advances the iterator. Why shouldn't gen.next always be the same object? That is, in essence, my question. Executing the below script, rather than typing at a console, probably clarifies things a little. Sw. #-

Re: PEP-able? Expressional conditions

2005-09-08 Thread Bengt Richter
On Wed, 7 Sep 2005 17:53:46 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >On Wednesday 07 September 2005 02:44 pm, Paul Rubin wrote: >> Terry Hancock <[EMAIL PROTECTED]> writes: >> > def ternary(condition, true_result, false_result): >> >if condition: >> >return true_result >> >

reading the last line of a file

2005-09-08 Thread Xah Lee
Martin Franklin wrote: > import gzip > log_file = gzip.open("access_log.4.gz") > last_line = log_file.readlines()[-1] > log_file.close() does the log_file.readlines()[-1] actually read all the lines first? i switched to system call with tail because originally i was using a pure Python solution

Re: generator object, next method

2005-09-08 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: >>Why is that? I thought gen.next is a callable and gen.next() actually >>advances the iterator. Why shouldn't gen.next always be the same object? > > > That is, in essence, my question. Because bound methods are generated on the fly - google this group, there have b

RE: pretty windows installer for py scripts

2005-09-08 Thread Coates, Steve (ACHE)
> Any recommendations on a windows packager/installer that's > free? I need it to allow non-tech users to install some > python scripts... you know, "Click Next"... "Click Next"... > "Click Finish"... "You're Done!" and everything just > magically works ;) > > Last time I had to do this, I used

Re: generator object, next method

2005-09-08 Thread Duncan Booth
Paul Rubin wrote: > Duncan Booth <[EMAIL PROTECTED]> writes: >> 1) Every time you access gen.next you create a new method-wrapper >> object. > > Why is that? I thought gen.next is a callable and gen.next() actually > advances the iterator. Why shouldn't gen.next always be the same > object?

popen in thread on QNX

2005-09-08 Thread Jacek Popławski
I am still in the process of creating my script which will run command received from socket. My scripts works perfectly on Linux, but doesn't work on QNX! File "/usr/lib/python2.4/popen2.py", line 108, in __init__ self.pid = os.fork() OSError: [Errno 89] Function not implemented When I t

Re: reading the last line of a file

2005-09-08 Thread Martin Franklin
Xah Lee wrote: > Martin Franklin wrote: > >>import gzip >>log_file = gzip.open("access_log.4.gz") >>last_line = log_file.readlines()[-1] >>log_file.close() > > > does the > log_file.readlines()[-1] > actually read all the lines first? Yes I'm afraid it does. > > i switched to system call wi

Re: popen in thread on QNX

2005-09-08 Thread Jacek Popławski
It works when I use os.system() instead os.popen3(), but with os.system() I have no access to stdout and stderr :-( -- http://mail.python.org/mailman/listinfo/python-list

Re: Django Vs Rails

2005-09-08 Thread James
I actually like the framework to reflect on my database. I am more of a visual person. I have tools for all my favorite databases that allow me to get a glance of ER diagrams and I would rather develop my data models in these tools rather than in code. Further more I rather like the idea of parsimo

Re: reading the last line of a file

2005-09-08 Thread Martin Franklin
Martin Franklin wrote: > Xah Lee wrote: > >>Martin Franklin wrote: >> >> >>>import gzip >>>log_file = gzip.open("access_log.4.gz") >>>last_line = log_file.readlines()[-1] >>>log_file.close() >> >> >>does the >>log_file.readlines()[-1] >>actually read all the lines first? > > > > Yes I'm afraid

Re: dual processor

2005-09-08 Thread Nick Craig-Wood
Paul Rubin wrote: > Jorgen Grahn <[EMAIL PROTECTED]> writes: > > I feel the recent SMP hype (in general, and in Python) is a red herring. Why > > do I need that extra performance? What application would use it? > > How many mhz does the computer you're using right now have? When did > you buy

Re: PEP-able? Expressional conditions

2005-09-08 Thread Paul Rubin
Terry Hancock <[EMAIL PROTECTED]> writes: > > Not the same at all. It evaluates both the true and false results, > > which may have side effects. > > If you are depending on that kind of nit-picking behavior, > you have a serious design flaw, a bug waiting to bite you, > and code which shouldn't

Re: reading the last line of a file

2005-09-08 Thread Martin Franklin
Martin Franklin wrote: > Martin Franklin wrote: > >>Xah Lee wrote: >> >> >>>Martin Franklin wrote: >>> >>> >>> import gzip log_file = gzip.open("access_log.4.gz") last_line = log_file.readlines()[-1] log_file.close() >>> >>> >>>does the >>>log_file.readlines()[-1] >>>actually read

Re: Job Offer in Paris, France : R&D Engineer (Plone)

2005-09-08 Thread Fred Pacquier
Peter Hansen <[EMAIL PROTECTED]> said : > I can't let that pass. :-) I believe it was well established in posts > a few years ago that while the programming-language equivalent of > Esperanto is clearly Python, "Volapuke" was most definitely > reincarnated as *Perl*. Sorry -- I've been reading

Re: Sockets: code works locally but fails over LAN

2005-09-08 Thread n00m
Thanks, Bryan, for the details! Btw, the newest oops in the topic's subject is: the code does not work in the case of: sqls_host, sqls_port = '192.168.0.8', 1433 proxy_host, proxy_port = '192.168.0.3', 1434 ## proxy_host, proxy_port = '127.0.0.1', 1434 ## proxy_host, proxy_port = '', 1434 I.e. w

Migrate PYD Files

2005-09-08 Thread David Duerrenmatt
Is there a way to use old pyd files (Python 1.5.2) with a newer version of Python without recompiling them? Because the source code is not available anymore, I'm wondering whether it's possible or not to change few bytes with a hex editor (version number?). I'd like to give it a try since the modu

Printer List from CUPS

2005-09-08 Thread Mike Tammerman
Hi, I want to get the printer list from CUPS. I found some ways using lpstat -p and http://localhost:631/printers but, these ways require some parsing and I am not sure, if the parsing works all the time. A pythonic way would be very helpful. Thanks, Mike -- http://mail.python.org/mailman/lis

Re: Manging multiple Python installation

2005-09-08 Thread Roel Schroeven
Jeremy Jones wrote: > Andy Leszczynski wrote: >> >>Is there any way to pass the prefix to the "make install"? Why "make" >>depends on that? >> >>A. >> > > What does it matter? If you *could* pass it to make, what does that buy > you? I'm not a make guru, but I'm not sure you can do this. Som

Re: pretty windows installer for py scripts

2005-09-08 Thread Roel Schroeven
rbt wrote: > Any recommendations on a windows packager/installer that's free? I need > it to allow non-tech users to install some python scripts... you know, > "Click Next"... "Click Next"... "Click Finish"... "You're Done!" and > everything just magically works ;) Innosetup (http://www.jrsoftwar

Re: reading the last line of a file

2005-09-08 Thread Fredrik Lundh
Martin Franklin wrote: > Ok, in that case stick to your shell based solution, although 100 > megabytes does not sound that large to me I guess it is relative > to the system you are running on :) (I have over a gig of memory here) since the file is gzipped, you need to read all of it to get the l

Re: pretty windows installer for py scripts

2005-09-08 Thread Christophe
rbt a écrit : > Any recommendations on a windows packager/installer that's free? I need > it to allow non-tech users to install some python scripts... you know, > "Click Next"... "Click Next"... "Click Finish"... "You're Done!" and > everything just magically works ;) Isn't that already available

Re: Migrate PYD Files

2005-09-08 Thread Fredrik Lundh
David Duerrenmatt wrote: > Is there a way to use old pyd files (Python 1.5.2) with a newer version > of Python without recompiling them? > Because the source code is not available anymore, I'm wondering whether > it's possible or not to change few bytes with a hex editor (version > number?). I'd

Re: pretty windows installer for py scripts

2005-09-08 Thread Paul Rubin
Christophe <[EMAIL PROTECTED]> writes: > > Any recommendations on a windows packager/installer that's free? I need > > it to allow non-tech users to install some python scripts... you know, > > "Click Next"... "Click Next"... "Click Finish"... "You're Done!" and > > everything just magically works

Re: pretty windows installer for py scripts

2005-09-08 Thread Christophe
Paul Rubin a écrit : > Christophe <[EMAIL PROTECTED]> writes: > >>>Any recommendations on a windows packager/installer that's free? I need >>>it to allow non-tech users to install some python scripts... you know, >>>"Click Next"... "Click Next"... "Click Finish"... "You're Done!" and >>>everything

Re: determine if os.system() is done

2005-09-08 Thread Christos Georgiou
On Wed, 07 Sep 2005 23:28:13 -0400, rumours say that Peter Hansen <[EMAIL PROTECTED]> might have written: >Martin P. Hellwig wrote: >> The only thing I am disappointed at his writing style, most likely he >> has a disrupted view on social acceptable behavior and communication. >> These skills mig

Distutils question

2005-09-08 Thread Laszlo Zsolt Nagy
How how can I install my .mo files from a distutil script into its default location? sys.prefix + os.sep + 'share' + os.sep + 'locale' -- http://mail.python.org/mailman/listinfo/python-list

Re: Printer List from CUPS

2005-09-08 Thread Martin Franklin
Mike Tammerman wrote: > Hi, > > I want to get the printer list from CUPS. I found some ways using > > lpstat -p and > http://localhost:631/printers > > but, these ways require some parsing and I am not sure, if the parsing > works all the time. A pythonic way would be very helpful. > > Thanks,

Re: python profiling, hotspot and strange execution time

2005-09-08 Thread Jeremy Jones
[EMAIL PROTECTED] wrote: >I am not sure to understand the big difference between "time spent in >different areas of code" and "how long did this thing take to run?". >Looking at python doc for deterministic profiling, I understand the >implementation difference, and the performance implications,

Re: popen in thread on QNX

2005-09-08 Thread Laszlo Zsolt Nagy
Jacek Popławski wrote: >I am still in the process of creating my script which will run command >received from socket. >My scripts works perfectly on Linux, but doesn't work on QNX! > >File "/usr/lib/python2.4/popen2.py", line 108, in __init__ > self.pid = os.fork() >OSError: [Errno 89] Func

Re: Migrate PYD Files

2005-09-08 Thread fraca7
David Duerrenmatt a écrit : > Is there a way to use old pyd files (Python 1.5.2) with a newer version > of Python without recompiling them? No. In general, incrementing the middle version number means that the Python C API has changed in an incompatible manner. There are some exceptions (2.2 mo

Re: reading the last line of a file

2005-09-08 Thread Leif K-Brooks
Xah Lee wrote: > i switched to system call with tail because originally i was using a > pure Python solution > > inF = gzip.GzipFile(ff, 'rb'); > s=inF.readlines() > inF.close() > last_line=s[-1] > > and since the log file is 100 megabytes it takes a long time

Re: popen in thread on QNX

2005-09-08 Thread Jacek Popławski
Laszlo Zsolt Nagy wrote: > os.popen already creates a new process. So what if you try to call > os.popen from your main thread, then pass the file descriptors to your > thread? > It is just an idea... But I need to run command from thread, that's the main reason to create new thread :) -- http

Re: Manging multiple Python installation

2005-09-08 Thread Jeremy Jones
Roel Schroeven wrote: >Jeremy Jones wrote: > > > >>Andy Leszczynski wrote: >> >> >>>Is there any way to pass the prefix to the "make install"? Why "make" >>>depends on that? >>> >>>A. >>> >>> >>> >>What does it matter? If you *could* pass it to make, what does that buy >>you? I'm n

Re: reading the last line of a file

2005-09-08 Thread Fredrik Lundh
Fredrik Lundh wrote: > zcat|tail is a LOT faster. and here's the "right way" to use that: from subprocess import Popen, PIPE p1 = Popen(["zcat", filename], stdout=PIPE) p2 = Popen(["tail", "-1"], stdin=p1.stdout, stdout=PIPE) last_line = p2.communicate()[0] (on my small sample,

Re: killing thread after timeout

2005-09-08 Thread Jacek Popławski
Bryan Olson wrote: > First, a portable worker-process timeout: In the child process, > create a worker daemon thread, and let the main thread wait > until either the worker signals that it is done, or the timeout > duration expires. It works on QNX, thanks a lot, your reply was very helpful! > I

Re: launching adobe reader with arguments from os.system call

2005-09-08 Thread Greg Miller
Thank you Martin, here's what I discovered this morning to work, the only problem is it is painfully slow to launch the application. os.system('start acroRd32.exe'+' /A'+' "page=15"'+' "C:\\Gregtemp\\estelletest\\NexGlosser_User_Guide_W60G00_en.pdf"') I'm going to give your method a try to see if

record sound to numarray/list

2005-09-08 Thread rubbishemail
Hello, do you know any way to record a sound from the soundcard on winXP to a numarray? many thanks Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: killing thread after timeout

2005-09-08 Thread Paul Rubin
Bryan Olson <[EMAIL PROTECTED]> writes: > First, a portable worker-process timeout: In the child process, > create a worker daemon thread, and let the main thread wait > until either the worker signals that it is done, or the timeout > duration expires. As the Python Library Reference states in > s

Re: popen in thread on QNX

2005-09-08 Thread Laszlo Zsolt Nagy
>>os.popen already creates a new process. So what if you try to call >>os.popen from your main thread, then pass the file descriptors to your >>thread? >>It is just an idea... >> >> > >But I need to run command from thread, that's the main reason to create >new thread :) > > Ok, but can't

Re: Is my thread safe from premature garbage collection?

2005-09-08 Thread NutJob
Good point there. Sorry, I should have thought of that myself really, but well, I guess I'm having my senior moments a bit early. :P -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating custom event in WxPython

2005-09-08 Thread NutJob
Cool, thanks a bunch! -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP-able? Expressional conditions

2005-09-08 Thread Antoon Pardon
Op 2005-09-07, Terry Reedy schreef <[EMAIL PROTECTED]>: > > "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> No, as I explained it is not a ternary operator and it can't easily be >> implemented using a Python function efficiently because Python does not >> support l

Re: Distutils question

2005-09-08 Thread Peter Hansen
Laszlo Zsolt Nagy wrote: > How how can I install my .mo files from a distutil script into its > default location? > > sys.prefix + os.sep + 'share' + os.sep + 'locale' I can't answer the first question, but the latter should be written this way instead os.path.join(sys.prefix, 'share', 'lo

Re: Creating custom event in WxPython

2005-09-08 Thread Chris Lambacher
You should be derriving from PyCommandEvent since only CommandEvents are set to propegate, which is probably what you want (see the wxwidgets Event handling overview). In order to use Bind you will need an instance of PyEventBinder. For the example below that would be something like: EVT_INVOKE

Re: Construct raw strings?

2005-09-08 Thread Benji York
Peter Hansen wrote: > Benji York wrote: > >> It's not join that's getting you, it's the non-raw string >> representation in path_to_scan. Use either 'd:\test_images' or >> 'd:\\test_images' instead. > > Benji, you're confusing things: you probably meant r'd:\test_images' > in the above Doh! I

Re: PEP-able? Expressional conditions

2005-09-08 Thread Duncan Booth
Antoon Pardon wrote: > Which is why I don't understand the resistance against introducing > such a beast. The idea has already been discussed to death. Read PEP 308 to see what was proposed, discussed, and why the PEP was eventually rejected: http://www.python.org/peps/pep-0308.html: > Status:

Re: Migrate PYD Files

2005-09-08 Thread Kay Schluehr
David Duerrenmatt wrote: > Is there a way to use old pyd files (Python 1.5.2) with a newer version > of Python without recompiling them? > > Because the source code is not available anymore, I'm wondering whether > it's possible or not to change few bytes with a hex editor (version > number?). I'd

Re: pretty windows installer for py scripts

2005-09-08 Thread Adriaan Renting
The elegant way to do installs on Windows would be by creating an MSI. Microsoft provides (IIRC) a simple tool to create those (Orca), that's free. Without the Installshield or Wise tools I think it would take quite some effort though, because you need to understand all the details of how msi ta

ANN: PyDev 0.9.8.1 released

2005-09-08 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python Development Enviroment for Eclipse) version 0.9.8.1 has been released. Check the homepage (http://pydev.sourceforge.net/) for more details. Details for Release: 0.9.8.1 Major highlights: --- * Java 1.4 support reintroduced. * Styles a

Video display, frame rate 640x480 @ 30fps achievable?

2005-09-08 Thread Guenter
Hi, I need to develop an application that displays video 640x480 16-bit per pixel with 30 fps. I would prefer to do that with Python (wxPython) but don't have any experience whether it is possible to achieve that frame rate and still have some resources for other processing left? My development P

Re: Printer List from CUPS

2005-09-08 Thread Mike Tammerman
I am using Ubuntu. pycups seems to be not existed any more. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: killing thread after timeout

2005-09-08 Thread Jacek Popławski
Paul Rubin wrote: > Maybe the child process can just use sigalarm instead of a separate > thread, to implement the timeout. Already tried that, signals works only in main thread. > To get even more OS-specific, AF_UNIX sockets (at least on Linux) have > a feature called ancillary messages that al

Re: Video display, frame rate 640x480 @ 30fps achievable?

2005-09-08 Thread Peter Hansen
Guenter wrote: > I need to develop an application that displays video 640x480 16-bit per > pixel with 30 fps. > > I would prefer to do that with Python (wxPython) but don't have any > experience whether it is possible to achieve that frame rate and still > have some resources for other processing

Re: Printer List from CUPS

2005-09-08 Thread Martin Franklin
Mike Tammerman wrote: > I am using Ubuntu. pycups seems to be not existed any more. > > Mike > Yeah as I said if you're using a redhat based distro... However you could try getting the redhat / fedora rpm that provides pycups and installing it? I would ask on the Ubuntu list, I know they are a

Re: PEP-able? Expressional conditions

2005-09-08 Thread Antoon Pardon
Op 2005-09-08, Duncan Booth schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Which is why I don't understand the resistance against introducing >> such a beast. > > The idea has already been discussed to death. Read PEP 308 to see what was > proposed, discussed, and why the PEP was eventua

Re: launching adobe reader with arguments from os.system call

2005-09-08 Thread Steve Holden
Greg Miller wrote: > Thank you Martin, here's what I discovered this morning to work, the > only problem is it is painfully slow to launch the application. > > os.system('start acroRd32.exe'+' /A'+' "page=15"'+' > "C:\\Gregtemp\\estelletest\\NexGlosser_User_Guide_W60G00_en.pdf"') > > I'm going to

Re: popen in thread on QNX

2005-09-08 Thread Jacek Popławski
Laszlo Zsolt Nagy wrote: > - one of your worker threads wants to run a command > - it creates the argument list and puts it into a message queue > - woker thread starts to sleep > - main thread processes the message queue -> it will run popen, put back > the file descriptors into the message and w

ANN: ConfigObj 4.0.0 Beta 4

2005-09-08 Thread Fuzzyman
Hello Pythoneers, ConfigObj 4.0.0 has a beta 4 release. This fixes a couple of moderately serious bugs - so it's worth switching to. http://cheeseshop.python.org/pypi/ConfigObj http://www.voidspace.org.uk/python/configobj.html http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=configob

Re: Video display, frame rate 640x480 @ 30fps achievable?

2005-09-08 Thread Fredrik Lundh
Peter Hansen wrote: >> I need to develop an application that displays video 640x480 16-bit per >> pixel with 30 fps. >> >> I would prefer to do that with Python (wxPython) but don't have any >> experience whether it is possible to achieve that frame rate and still >> have some resources for other

Re: python profiling, hotspot and strange execution time

2005-09-08 Thread bdrosen96
I was unhappy with both hotshot and the standard python profiler, so I wrote my own, which may be what you are looking for. I've submitted it as a patch at: http://sourceforge.net/tracker/index.php?func=detail&aid=1212837&group_id=5470&atid=305470 It should add a minimum of overhead, give real nu

Distutils extension proposal (was: Re: Distutils question)

2005-09-08 Thread Laszlo Zsolt Nagy
Peter Hansen wrote: >>How how can I install my .mo files from a distutil script into its >>default location? >> >>sys.prefix + os.sep + 'share' + os.sep + 'locale' >> >> > >I can't answer the first question, but the latter should be written this >way instead > >os.path.join(sys.prefix, '

job scheduling framework?

2005-09-08 Thread Chris Curvey
Has anyone seen a simple open source job-scheduling framework written in Python? I don't really want to reinvent the wheel. All I need is the ability to set up a series of atomic "jobs" as a "stream", then have the system execute the jobs in the stream one-at-a-time until all the jobs in the stre

Re: record sound to numarray/list

2005-09-08 Thread [EMAIL PROTECTED]
No there is not. Hey, you could write one though. -- http://mail.python.org/mailman/listinfo/python-list

Re: Video display, frame rate 640x480 @ 30fps achievable?

2005-09-08 Thread Diez B. Roggisch
Guenter wrote: > Hi, > > I need to develop an application that displays video 640x480 16-bit per > pixel with 30 fps. > > I would prefer to do that with Python (wxPython) but don't have any > experience whether it is possible to achieve that frame rate and still > have some resources for other pr

RE: CGI File Uploads and Progress Bars

2005-09-08 Thread Robert Brewer
Doug Helm wrote: > I'm writing a CGI to handle very large file uploads. > I would like to include a progress bar. > ...I need to know not only the number of > bytes received, but also the total number of > incoming bytes. Here's the heart of the code: > > while afcommon.True: > lstrData

Re: job scheduling framework?

2005-09-08 Thread Benji York
Chris Curvey wrote: > Has anyone seen a simple open source job-scheduling framework written > in Python? It sounds like BuildBot (http://buildbot.sf.net) might interest you. It's not exactly meant to be a job control system, but it does have some nice functionality. It might be interesting to e

Re: killing thread after timeout

2005-09-08 Thread Bryan Olson
Paul Rubin wrote: > To get even more OS-specific, AF_UNIX sockets (at least on Linux) have > a feature called ancillary messages that allow passing file > descriptors between processes. It's currently not supported by the > Python socket lib, but one of these days... . But I don't think > Windows

Re: pretty windows installer for py scripts

2005-09-08 Thread [EMAIL PROTECTED]
I second that. NSIS works better than MSI, Inno, or even InstallShield. I highly recommend it. Of course, a second choice is Inno, third is MSI, and last resort is InstallShield. Another option is to make an installer using "AutoIT" but that can get kind of tricky. -- http://mail.python.org/mailm

Re: question from beginner

2005-09-08 Thread dario
Thanks Dennis. In effect stringZVEI doesn't remain empty after the .read method, then the loop is executed 1 time. How could be a 'while' loop to wait a no empty string from the serial port? Dario. Dennis Lee Bieber ha scritto: > On 7 Sep 2005 07:14:37 -0700, "dario" <[EMAIL PROTECTED]> declaim

Re: List of integers & L.I.S.

2005-09-08 Thread [EMAIL PROTECTED]
> ... and let me reveal the secret: > http://spoj.sphere.pl/problems /SUPPER/ your question is different than the question on this website. also, what do you consider to be the correct output for this permutation? (according to your original question) [4, 5, 1, 2, 3, 6, 7, 8] Manuel -- http:/

Re: List of integers & L.I.S.

2005-09-08 Thread [EMAIL PROTECTED]
So, this has no real world use, aside from posting it on a website. Thanks for wasting our time. You are making up an arbitrary problem and asking for a solution, simply because you want to look at the solutions, not because your problem needs to be solved. Clearly, this is a waste of time. -- ht

Re: popen in thread on QNX

2005-09-08 Thread [EMAIL PROTECTED]
spawn() works on QNX, fork() does not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with C extension module

2005-09-08 Thread chris
Ok, I found further examples on the Internet and got something working (it seems), but I have a question about the memory management. The example I found did not include any of the PyMem_... functions. Here's roughly what I have working: cdef extern from "my.h": cdef struct inputs: char

Help! Python either hangs or core dumps when calling C malloc

2005-09-08 Thread Lil
Hi Everyone! I've been trying to figure out this weird bug in my program. I have a python program that calls a C function that reads in a binary file into a buffer. In the C program, buffer is allocated by calling malloc. The C program runs perfectly fine but when I use python to call the C functio

Re: launching adobe reader with arguments from os.system call

2005-09-08 Thread Greg Miller
Thank you for the information, when I launched the Reader on the actual hardware it launched quickly. I think I just have too much running on my application PC. I will consider starting an AcroReader app however. Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Cleaning strings with Regular Expressions

2005-09-08 Thread Gary Wilson Jr
sheffdog wrote: > Using regular expressions, the best I can do so far is using the re.sub > command but it still takes two lines. Can I do this in one line? Or > should I be approaching this differently? All I want to end up with is > the file name "ppbhat.tga". A regular expression to do what you

Re: List of integers & L.I.S.

2005-09-08 Thread [EMAIL PROTECTED]
Working on this allowed me to avoid some _real_ (boring) work at my job. So clearly it served a very useful purpose! ;) Manuel -- http://mail.python.org/mailman/listinfo/python-list

Re: job scheduling framework?

2005-09-08 Thread Larry Bates
Google turned up these links that might be of interest: http://www.foretec.com/python/workshops/1998-11/demosession/hoegl/ http://www.webwareforpython.org/Webware/TaskKit/Docs/QuickStart.html http://www.slac.stanford.edu/BFROOT/www/Computing/Distributed/Bookkeeping/SJM/SJMMain.htm Larry Bates C

Re: Django Vs Rails

2005-09-08 Thread Marek Kubica
Hello! On 7 Sep 2005 20:56:28 -0700 flamesrock wrote: > On the other, Rails seems to have a brighter future, Why that? Django is not yet released and everybody is talking about it. Like it happened with RoR. > How difficult would it be to learn Ruby+Rails, assuming that someone is > already sk

Re: Help! Python either hangs or core dumps when calling C malloc

2005-09-08 Thread Larry Bates
Question: Why not just use Python to read the file? f=open(filename, 'rb') fcontents=f.read() If you need to manipulate what is in fcontents you can use struct module and/or slicing. Larry Bates Lil wrote: > Hi Everyone! I've been trying to figure out this weird bug in my > program. I have a p

Django and SQLObject. Why not working together?

2005-09-08 Thread Sokolov Yura
Django Model is wonderfull. But SQLObject more flexible (and powerfull, as i think, and has already more db interfaces). But Django Model is tied with Django, and using Django with another OO mapping is not comfortable. Why do not working together? I can't understand. If you (Django and SQLObject

Re: Help! Python either hangs or core dumps when calling C malloc

2005-09-08 Thread Lil
Hi Larry, It's in the C code mainly because the buffer is an input to the driver. The driver takes a char* as input and I didn't want to pass a char* from python -> swig -> C since swig has memory leaks passing pointers. Do you think this is a Python issue or a Red Hat issue? I'm going to try

Re: improvements for the logging package

2005-09-08 Thread skip
Trent> Unfortunately your getting caught by the default logging level Trent> being WARN, so that any log level below that is tossed. Ah, okay. I'll pick back through the docs and see what I missed, then maybe add a description of the minimal steps needed to get going. >> I suspect t

Re: job scheduling framework?

2005-09-08 Thread Fernando Perez
Larry Bates wrote: > Google turned up these links that might be of interest: > > http://www.foretec.com/python/workshops/1998-11/demosession/hoegl/ > http://www.webwareforpython.org/Webware/TaskKit/Docs/QuickStart.html > http://www.slac.stanford.edu/BFROOT/www/Computing/Distributed/Bookkeeping/SJ

Re: List of integers & L.I.S.

2005-09-08 Thread Tim Peters
[EMAIL PROTECTED] > So, this has no real world use, aside from posting it on a website. > Thanks for wasting our time. You are making up an arbitrary problem and > asking for a solution, simply because you want to look at the > solutions, not because your problem needs to be solved. Clearly, this >

Re: improvements for the logging package

2005-09-08 Thread Trent Mick
[EMAIL PROTECTED] wrote] > Trent> I thought PEP 8 said camelCase (or whatever it is called) was > Trent> okay? > > Hmmm... In the section entitled "Naming Conventions" I see: > > Function Names > > Function names should be lowercase, possibly with words separated by > un

Re: Help! Python either hangs or core dumps when calling C malloc

2005-09-08 Thread Fredrik Lundh
"Lil" <[EMAIL PROTECTED]> wrote: > It's in the C code mainly because the buffer is an input to the > driver. The driver takes a char* as input and I didn't want to pass a > char* from python -> swig -> C since swig has memory leaks passing > pointers. > Do you think this is a Python issue or

Re: List of integers & L.I.S.

2005-09-08 Thread [EMAIL PROTECTED]
> That's easy to follow, although their use of a Van Emde-Boas set as a > given hides the most challenging part (the "efficient data structure" > part). The "efficient data structure" is the easy part. Obviously, it is a dict of lists. ...or is it a list of dicts?... ...or is it a tuple of gene

Re: List of integers & L.I.S.

2005-09-08 Thread n00m
[EMAIL PROTECTED] wrote: > So, this has no real world use, aside from posting it on a website. I don't think you're quite right. We never know where we gain and where we lose. > So clearly it served a very useful purpose! ;) Thanks, Manuel! > your question is different than the question on this

Re: List of integers & L.I.S.

2005-09-08 Thread n00m
PS: I've still not read 2 new posts. -- http://mail.python.org/mailman/listinfo/python-list

Re: Printer List from CUPS

2005-09-08 Thread djw
Mike Tammerman wrote: > Hi, > > I want to get the printer list from CUPS. I found some ways using > > lpstat -p and > http://localhost:631/printers > > but, these ways require some parsing and I am not sure, if the parsing > works all the time. A pythonic way would be very helpful. > > Thanks,

  1   2   >