Re: [Tutor] Tree Ctrl Data Structure - Help, please!

2008-07-15 Thread John Fouhy
On 16/07/2008, Michiel Overtoom <[EMAIL PROTECTED]> wrote: > Lauren wrote... > > Based on some research I've done, I think I want my data structure to > > be a series of lists within lists: > # start of example > > # this example uses a hierarchy of three levels: 1) continent, 2) > country/st

Re: [Tutor] Tree Ctrl Data Structure - Help, please!

2008-07-15 Thread Michiel Overtoom
Lauren wrote... > Based on some research I've done, I think I want my data structure to > be a series of lists within lists: > [...] > Can someone give me some pointers on how to think about this > clearly?? I'm obviously missing some steps!! :-( I find your example a bit hard to follow. From

[Tutor] Tree Ctrl Data Structure - Help, please!

2008-07-15 Thread Lauren Snyder
Hello! ACK!!! I am attempting to "AUTO" populate a tree control Right now I am just focusing on dynamically creating the data structure (a list of lists) that will later be used to populate the tree control. This is where I am stuck! Based on some research I've done, I think I w

Re: [Tutor] parsing sendmail logs

2008-07-15 Thread Alan Gauld
"Monika Jisswel" <[EMAIL PROTECTED]> wrote to say the truth I never thought about "additional overhead of getting the input/output data transferred" because the suprocess itself will contain the (bash)pipe to redirect output to the next utility used not the python subprocess.PIPE pipe so it w

Re: [Tutor] function for memory usage

2008-07-15 Thread Monika Jisswel
ps -eo pid,ppid,rss,vsize,pcpu,pmem,cmd -ww --sort=pid I m no genius i found it here : http://mail.nl.linux.org/linux-mm/2003-03/msg00077.html ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] getting error in uploading a file

2008-07-15 Thread Kent Johnson
On Tue, Jul 15, 2008 at 2:41 PM, Mayank Agarwal <[EMAIL PROTECTED]> wrote: > Hi, > i have a look on error_log and the error is following: > can you tell what to do next to remove this error This is pretty far off-topic for this list, if you need help with Apache I would prefer you to find it some

Re: [Tutor] getting error in uploading a file

2008-07-15 Thread Marc Tompkins
On Tue, Jul 15, 2008 at 11:41 AM, Mayank Agarwal <[EMAIL PROTECTED]> wrote: > Hi, > i have a look on error_log and the error is following: > [Tue Jul 15 21:17:03 2008] [error] [client 10.73.41.64] (8)Exec format > error: exec of '/etc/httpd/cgi-bin/final.php' failed > [Tue Jul 15 21:17:03 2008] [e

Re: [Tutor] getting error in uploading a file

2008-07-15 Thread Mayank Agarwal
Hi, i have a look on error_log and the error is following: [Tue Jul 15 21:17:03 2008] [error] [client 10.73.41.64] (8)Exec format error: exec of '/etc/httpd/cgi-bin/final.php' failed [Tue Jul 15 21:17:03 2008] [error] [client 10.73.41.64] No log handling enabled - turning on stderr logging [Tue Jul

Re: [Tutor] parsing sendmail logs

2008-07-15 Thread Jeff Younker
On Jul 14, 2008, at 12:29 AM, nibudh wrote: Hi List, I'm looking for some support libraries that will help me to parse sendmail logs. I'm confused about whether i need a "parser" per se, and if i do which parser to use. I found this website http://nedbatchelder.com/text/python-parsers.htm

Re: [Tutor] Anyone using tarfile?

2008-07-15 Thread Michiel Overtoom
Terry wrote... > Well, I've been programming long enough that I tend to assume the > opposite: "I must be doing something wrong." Yes indeed ;-) Don't forget that thousands (if not millions) of individuals all across the internet are using Python and harnessing their collective IQ to squash eve

Re: [Tutor] Anyone using tarfile?

2008-07-15 Thread Kent Johnson
On Tue, Jul 15, 2008 at 1:31 PM, Terry Carroll <[EMAIL PROTECTED]> wrote: > For another thing, "prefix" still isn't documented; I'd have expected the > variable name to be along the lines of _prefix, or not retained in the > class instance if it wasn't intended for consumption. But that might jus

Re: [Tutor] accessing string in list

2008-07-15 Thread Michiel Overtoom
Bryan wrote... >I have a list of labels for a data file, >test = ['depth', '4', '6', '10', '15', '20', '30', '40', 'angle'] >If I have 15.8, I would like to get the index of '20' and '15'. I would >also like to make sure that my known value falls in the range 4-40. Python has a standard module '

Re: [Tutor] Anyone using tarfile?

2008-07-15 Thread Terry Carroll
On Tue, 15 Jul 2008, Kent Johnson wrote: > What version of Python are you using? I have 2.5.2 and the line > numbers in my tarfile.py are quite different than yours. The changelog > for Python 2.5.2 shows many fixes to tarfile so an upgrade may be in > order. And that was it! I pulled the most c

Re: [Tutor] getting error in uploading a file

2008-07-15 Thread Daniel Sarmiento
r. > More information about this error may be available > in the server error log. > > Apache/2.0.52 (Red Hat) Server at 10.72.147.89 Port 80 > > > can you tell me what is meaning of this error > Thanks > Mayank > -- next part -- > An HTML

Re: [Tutor] getting error in uploading a file

2008-07-15 Thread bob gailer
Mayank Agarwal wrote: Hi, i am getting error in uploading a file from python script. the error is follwing: 500 Internal Server Error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server admin

Re: [Tutor] getting error in uploading a file

2008-07-15 Thread W W
On Tue, Jul 15, 2008 at 10:53 AM, Mayank Agarwal <[EMAIL PROTECTED]> wrote: > Hi, > i am getting error in uploading a file from python script. > > the error is follwing: > > > > 500 Internal Server Error > > Internal Server Error > The server encountered an internal error or > misconfiguration

[Tutor] getting error in uploading a file

2008-07-15 Thread Mayank Agarwal
Hi, ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] getting error in uploading a file

2008-07-15 Thread Mayank Agarwal
Hi, i am getting error in uploading a file from python script. the error is follwing: 500 Internal Server Error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED

Re: [Tutor] accessing string in list

2008-07-15 Thread Jerry Hill
On Tue, Jul 15, 2008 at 10:55 AM, Bryan Fodness <[EMAIL PROTECTED]> wrote: > I have a list of labels for a data file, > > test = ['depth', '4', '6', '10', '15', '20', '30', '40', 'angle'] > > I would like to get the string of the first value that is greater than a > known value and the previous str

[Tutor] accessing string in list

2008-07-15 Thread Bryan Fodness
I have a list of labels for a data file, test = ['depth', '4', '6', '10', '15', '20', '30', '40', 'angle'] I would like to get the string of the first value that is greater than a known value and the previous string. If I have 15.8, I would like to get the index of '20' and '15'. I would also l

Re: [Tutor] parsing sendmail logs

2008-07-15 Thread Martin Walsh
Monika Jisswel wrote: > to say the truth I never thought about "additional overhead of getting > the input/output data transferred" because the suprocess itself will > contain the (bash)pipe to redirect output to the next utility used not > the python subprocess.PIPE pipe so it will be like one su

Re: [Tutor] parsing sendmail logs

2008-07-15 Thread Monika Jisswel
> > but in that case use bash or ksh Hi Alan, to say the truth I never thought about "additional overhead of getting the input/output data transferred" because the suprocess itself will contain the (bash)pipe to redirect output to the next utility used not the python subprocess.PIPE pipe so it

Re: [Tutor] Anyone using tarfile?

2008-07-15 Thread Kent Johnson
On Tue, Jul 15, 2008 at 3:21 AM, Terry Carroll <[EMAIL PROTECTED]> wrote: > C:\test\freedb>playtar.py > Traceback (most recent call last): > File "C:\test\freedb\playtar.py", line 10, in >RC = tf.extract(sample) > File "C:\Python25\lib\tarfile.py", line 1495, in extract >self._extract_m

Re: [Tutor] manipulating a string

2008-07-15 Thread Mark Tolonen
"Bryan Fodness" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I have a string (column names) that I need to split. D_H = 'D 5 10 15 20 25 30 35 40 D Upper D Lower' I cannot do a simple list(D_H).split because the last two strings have a space between them (D Upper and D Lower a

Re: [Tutor] manipulating a string

2008-07-15 Thread Alan Gauld
"Bryan Fodness" <[EMAIL PROTECTED]> wrote I have a string (column names) that I need to split. D_H = 'D 5 10 15 20 25 30 35 40 D Upper D Lower' I assume you are reading this from a file or network and therefore don't actually know in advance what the list contains? (Otherwise just do it manu

Re: [Tutor] parsing sendmail logs

2008-07-15 Thread Alan Gauld
"Monika Jisswel" <[EMAIL PROTECTED]> wrote but if you want to go on your own I believe awk, grep, sort are extremely extremely extremely (yes 3 times !) powerfulI tools, so giving them up is a ... a python program that uses them thru subprocess module, I am a big fan of awk but I'd never w

[Tutor] Anyone using tarfile?

2008-07-15 Thread Terry Carroll
I'm trying to use tarfile with no luck. Anyone on this list used it successfully? Here's a sample program pared down to illustrate the error. I'm arbitrarily trying to extract the 4th TARred file in the tarball (a file that I know from other debugging efforts is data/c410951c, and that I can