Re: [Tutor] cgi script to start another process in background

2009-02-26 Thread Ravi Kondamuru
ure end of script headers" error. thanks, Ravi. On Thu, Feb 26, 2009 at 9:09 AM, Jay Deiman wrote: > Ravi Kondamuru wrote: > >> Hi, >> >> I am trying to write a python cgi script, that invokes another process and >> exists. >> Using the subprocess do

[Tutor] cgi script to start another process in background

2009-02-22 Thread Ravi Kondamuru
Hi, I am trying to write a python cgi script, that invokes another process and exists. Using the subprocess documentation on NO_WAIT, I am not having much success: pid = os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg") ==> pid = Popen(["/bin/mycmd", "myarg"]).pid The script seems to wait

Re: [Tutor] reading output from a c executable.

2008-12-22 Thread Ravi Kondamuru
tle_endian, [ ('len', (xstruct. unsigned_long, 1)), ('id', (xstruct.unsigned_long, 1)), ('name', (xstruct.string, (l.len-8))), ]) n = rec(buf[0:l.len]) print n.len, n.id, n.name On Sat, Dec 20, 2008 at 11:54 AM, Ravi Kondamuru wrote: > I

Re: [Tutor] reading output from a c executable.

2008-12-20 Thread Ravi Kondamuru
ecified in structdef. Is there a way to tell it to go till the end of the buffer passed? thanks, Ravi. On Fri, Dec 12, 2008 at 6:30 AM, bob gailer wrote: > Ravi Kondamuru wrote: > >> Denis, These are 32bit, 64bit counters (essentially numbers). >> Bob, There are well over 10K co

Re: [Tutor] reading output from a c executable.

2008-12-12 Thread Ravi Kondamuru
to be retrieved from the log file. Which essentially means having to go through the logfile again. This is because i want to try to avoid using a database to store values after parsing the file. thanks, Ravi. On Thu, Dec 11, 2008 at 7:54 PM, bob gailer wrote: > Ravi Kondamuru wrote: > >> Re

Re: [Tutor] reading output from a c executable.

2008-12-11 Thread Ravi Kondamuru
This was a great info exchange for me. I am going to try out the all-python solution and see how it works out. thank you all, Ravi. On Thu, Dec 11, 2008 at 10:59 AM, Ravi Kondamuru wrote: > Reasons for C: > 1. The log files I am working are 60-100MB files. I *assumed* using C will > r

Re: [Tutor] reading output from a c executable.

2008-12-11 Thread Ravi Kondamuru
graph (changing time duration for display) will have to re-parse the file all over again. And hence speed in parsing the log is important. Hope that explains thanks, Ravi. On Thu, Dec 11, 2008 at 10:45 AM, Steve Willoughby wrote: > Ravi Kondamuru wrote: > >> I am trying to read a bin

Re: [Tutor] reading output from a c executable.

2008-12-11 Thread Ravi Kondamuru
Thu, Dec 11, 2008 at 10:27 AM, Steve Willoughby <[EMAIL PROTECTED]>wrote: > Ravi Kondamuru wrote: > >> Hi, >> I am writing a script to read list output from a C executable. How should >> c program be written so that python can read the output as a list? >> Any

Re: [Tutor] reading output from a c executable.

2008-12-11 Thread Ravi Kondamuru
, bob gailer <[EMAIL PROTECTED]> wrote: > Ravi Kondamuru wrote: > >> Hi, >> I am writing a script to read list output from a C executable. How should >> c program be written so that python can read the output as a list? >> Any pointers to info on this appreciated.

[Tutor] reading output from a c executable.

2008-12-11 Thread Ravi Kondamuru
Hi, I am writing a script to read list output from a C executable. How should c program be written so that python can read the output as a list? Any pointers to info on this appreciated. thanks, Ravi. ___ Tutor maillist - Tutor@python.org http://mail.py

Re: [Tutor] Processing unix style timestamp

2008-03-07 Thread Ravi Kondamuru
Thank you all for your insights. mx.DateTime and feedparser seem to be the easiest to work with. Ravi. On Fri, Mar 7, 2008 at 4:36 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Ravi Kondamuru wrote: > > I looked at datetime, but it seems slightly complex to work with non GMT

Re: [Tutor] Processing unix style timestamp

2008-03-06 Thread Ravi Kondamuru
;> time.strptime("Mon Feb 11 01:34:52 UTC 2008", "%a %b %d %H:%M:%S %Z %Y") (2008, 2, 11, 1, 34, 52, 0, 42, 0) On Thu, Mar 6, 2008 at 4:20 PM, John Fouhy <[EMAIL PROTECTED]> wrote: > On 07/03/2008, Ravi Kondamuru <[EMAIL PROTECTED]> wrote: > > I ha

[Tutor] Processing unix style timestamp

2008-03-06 Thread Ravi Kondamuru
Hi, I have a log file that prints the date and time in the following format: Mon Feb 11 01:34:52 CST 2008 I am expecting multiple timezone entries (eg: PST, PDT and GMT) on the system running in America/Los Angeles time zone. I am looking for a way to internally store all the different timezone en

Re: [Tutor] basic question ...

2006-10-27 Thread Ravi Kondamuru
Thanks a lot for all that info. I am going to start with the doc/lib index for an overview and dir looks like a good runtime help command.Ravi.On 10/27/06, Danny Yoo <[EMAIL PROTECTED]> wrote: On Fri, 27 Oct 2006, Ravi Kondamuru wrote:> How does one figure all the builtin libraries/ cla

[Tutor] basic question ...

2006-10-27 Thread Ravi Kondamuru
Hi,How does one figure all the builtin libraries/ classes that python supports?For example if I want to sort a list of names, I would normally think of implementing the sorting routine in C. I am just beginning to learn python. It looks like there is a rich set available builtin libraries. So, is t