Re: os.tmpfile() vs. tempfile.TemporaryFile()

2010-11-11 Thread danmcle...@yahoo.com
On Nov 11, 11:32 am, John Nagle na...@animats.com wrote:    Is there any reason to prefer tempfile.TemporaryFile() over os.tmpfile()?  Both create a nameless temporary file that will be deleted on close.                                 John Nagle tempfile.TemporaryFile has more options, e.g.

Re: A matter of queues, tasks and multiprocessing

2010-11-10 Thread danmcle...@yahoo.com
If you are using Python 2.6 or greater, look into the multiprocessing module. It may contain 90% of what you need. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the best way to handle a missing newline in the following case

2010-11-05 Thread danmcle...@yahoo.com
The problem is when I get to the last line. When the program sees '\n' after the 9, everything works fine. However, when there isn't a '\n', the program doesn't process the last line. What would be the best approach to handle the case of the possible missing '\n' at the end of the file? use

Re: How to run python without python

2010-04-02 Thread danmcle...@yahoo.com
On Apr 1, 5:54 pm, Chris Rebert c...@rebertia.com wrote: On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Fri, Apr 2, 2010 at 1:36 AM, Spencer infotech...@fairpoint.net wrote: Is there a way to developing a script on linux and give it to someone on

Re: How to run python without python

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 11:09 am, danmcle...@yahoo.com danmcle...@yahoo.com wrote: On Apr 1, 5:54 pm, Chris Rebert c...@rebertia.com wrote: On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Fri, Apr 2, 2010 at 1:36 AM, Spencer infotech...@fairpoint.net wrote

Re: How to run python without python

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 11:23 am, Chris Rebert c...@rebertia.com wrote: On Fri, Apr 2, 2010 at 10:09 AM, danmcle...@yahoo.com danmcle...@yahoo.com wrote: On Apr 1, 5:54 pm, Chris Rebert c...@rebertia.com wrote: On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Fri

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:14 pm, Booter colo.av...@gmail.com wrote: Hello all, I am new to python ans was wondering if there was a way to get the mac address from the local NIC? Thanks for your help. Gerad for windows parse p.stdout.read(): import subprocess p = subprocess.Popen('ipconfig', shell =

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:52 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: On Apr 2, 2:14 pm, Booter colo.av...@gmail.com wrote: Hello all, I am new to python ans was wondering if there was a way to get the mac address from the local NIC? Thanks for your help. Gerad for windows parse

Re: Getting Local MAC Address

2010-04-02 Thread danmcle...@yahoo.com
On Apr 2, 2:52 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: On Apr 2, 2:14 pm, Booter colo.av...@gmail.com wrote: Hello all, I am new to python ans was wondering if there was a way to get the mac address from the local NIC? Thanks for your help. Gerad for windows parse

Re: How to execute a script from another script and other script does not do busy wait.

2010-01-07 Thread danmcle...@yahoo.com
On Jan 7, 9:18 am, Jorgen Grahn grahn+n...@snipabacken.se wrote: On Thu, 2010-01-07, Rajat wrote: I want to run a python script( aka script2) from another python script (aka script1). While script1 executes script2 it waits for script2 to complete and in doing so it also does some other

Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
I am using the array module to instantiate many arrays in my application. It seems like there is a memory leak in there somewhere. Can anyone confim this and let me know what, if anything, I can do about it? I am using Fedora Core 5 Linux: import commands import array import itertools import sys

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 3:31 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: I am using the array module to instantiate many arrays in my application. It seems like there is a memory leak in there somewhere. Can anyone confim this and let me know what, if anything, I can do about it? I am using Fedora

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 3:47 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: On May 7, 3:31 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: I am using the array module to instantiate many arrays in my application. It seems like there is a memory leak in there somewhere. Can anyone confim

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 3:58 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: On May 7, 3:47 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: On May 7, 3:31 pm, danmcle...@yahoo.com danmcle...@yahoo.com wrote: I am using the array module to instantiate many arrays in my application

Re: Python 2.4.3 array memory leak

2009-05-07 Thread danmcle...@yahoo.com
On May 7, 4:41 pm, Terry Reedy tjre...@udel.edu wrote: danmcle...@yahoo.com wrote: I am using the array module to instantiate many arrays in my application. It seems like there is a memory leak in there somewhere. Can anyone confim this and let me know what, if anything, I can do about