"metaclass conflict" error: where is noconflict ?

2009-02-19 Thread Barak, Ron
;t seem able to find where to get the noconflict module from. Do any of you where noconflict could be downloaded/installed from ? Thanks, Ron. P.S.: I use Windows XP/cygwin, Python 2.5.2, wx-2.8-msw-unicode -- http://mail.python.org/mailman/listinfo/python-list

Regular expression bug?

2009-02-19 Thread Ron Garret
I'm trying to split a CamelCase string into its constituent components. This kind of works: >>> re.split('[a-z][A-Z]', 'fooBarBaz') ['fo', 'a', 'az'] but it consumes the boundary characters. To fix this I tried using lookahead and lookbehind patterns instead, but it doesn't work: >>> re.spli

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , MRAB wrote: > Ron Garret wrote: > > I'm trying to split a CamelCase string into its constituent components. > > This kind of works: > > > >>>> re.split('[a-z][A-Z]', 'fooBarBaz') > > ['fo', 'a&#x

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , Peter Otten <__pete...@web.de> wrote: > Ron Garret wrote: > > > I'm trying to split a CamelCase string into its constituent components. > > How about > > >>> re.compile("[A-Za-z][a-z]*").findall("fooBarBaz") > [&#

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , "andrew cooke" wrote: > i wonder what fraction of people posting with "bug?" in their titles here > actually find bugs? IMHO it ought to be an invariant that len(r.split(s)) should always be one more than len(r.findall(s)). > anyway, how about: > > re.findall('[A-Z]?[a-z]*', 'fo

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article , Albert Hopkins wrote: > On Thu, 2009-02-19 at 10:55 -0800, Ron Garret wrote: > > I'm trying to split a CamelCase string into its constituent components. > > This kind of works: > > > > >>> re.split('[a-z][A-Z]', 'fooBar

To unicode or not to unicode

2009-02-19 Thread Ron Garret
I'm writing a little wiki that I call µWiki. That's a lowercase Greek mu at the beginning (it's pronounced micro-wiki). It's working, except that I can't actually enter the name of the wiki into the wiki itself because the default unicode encoding on my Python installation is "ascii". So I'm

Re: To unicode or not to unicode

2009-02-20 Thread Ron Garret
In article , MRAB wrote: > Thorsten Kampe wrote: > > * Ron Garret (Thu, 19 Feb 2009 18:57:13 -0800) > >> I'm writing a little wiki that I call µWiki. That's a lowercase Greek > >> mu at the beginning (it's pronounced micro-wiki). > > &g

What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
I would have thought that the answer would be: the default encoding (duh!) But empirically this appears not to be the case: >>> unicode('\xb5') Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'ascii' codec can't decode byte 0xb5 in position 0: ordinal not in range(

Re: To unicode or not to unicode

2009-02-20 Thread Ron Garret
In article <499f0cf0.8070...@v.loewis.de>, "Martin v. Löwis" wrote: > MRAB wrote: > > Thorsten Kampe wrote: > >> * Ron Garret (Thu, 19 Feb 2009 18:57:13 -0800) > >>> I'm writing a little wiki that I call µWiki. That's a lowercase >

Re: What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
In article <499f18bd$0$31879$9b4e6...@newsspool3.arcor-online.net>, Stefan Behnel wrote: > Ron Garret wrote: > > I would have thought that the answer would be: the default encoding > > (duh!) But empirically this appears not to be the case: > > > >>&g

Re: What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
In article <499f3a8f.9010...@v.loewis.de>, "Martin v. Löwis" wrote: > > u'\xb5' > >> u'\xb5' > > print u'\xb5' > >> ? > > > > Unicode literals are *in the source file*, which can only have one > > encoding (for a given source file). > > > >> (That last character shows up as a micron si

Re: What encoding does u'...' syntax use?

2009-02-20 Thread Ron Garret
In article <499f397c.7030...@v.loewis.de>, "Martin v. Löwis" wrote: > > Yes, I know that. But every concrete representation of a unicode string > > has to have an encoding associated with it, including unicode strings > > produced by the Python parser when it parses the ascii string "u'\xb5'"

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: ch...@rebertia.com [mailto:ch...@rebertia.com] On > Behalf Of Chris Rebert > Sent: Thursday, February 19, 2009 22:58 > To: Barak, Ron > Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org > Subject: Re: "metaclass

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: Chris Rebert [mailto:c...@rebertia.com] > Sent: Sunday, February 22, 2009 11:48 > To: Barak, Ron > Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org > Subject: Re: "metaclass conflict" error: where is noco

Is there a way to ask a class what its metaclasses are ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: ch...@rebertia.com [mailto:ch...@rebertia.com] On > Behalf Of Chris Rebert > Sent: Sunday, February 22, 2009 13:57 > To: Barak, Ron > Cc: python-list@python.org > Subject: Re: "metaclass conflict" error: where is noconf

How to inherit from two classes without metaclass clashing ?

2009-02-22 Thread Barak, Ron
e) capabilities to this ListControl class. I changed the header of this class to be: class ListControl(wx.Frame, CopyAndPaste): But, the addition of CopyAndPaste to the class parents got me into this quagmire of metaclasses. Bye, Ron. > -Original Message- > From: Michele Simi

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
e a (non-strict) subclass of the metaclasses of all its bases So, obviously the line in blue is not to Python's liking. Bye, Ron. > -Original Message- > From: Hrvoje Niksic [mailto:hnik...@xemacs.org] > Sent: Sunday, February 22, 2009 14:05 > To: python-list@python.org &g

RE: can error messages be improved or can they be overridden ?

2009-02-22 Thread Barak, Ron
Hi Stef, You can do something like (not tested): try: self.Brick.Par [ self.EP[2] ]['FileName'] = filename except IndexError,e: msg = "%s: '%s %s %s %d" % (e.strerror,e.filename,self.EP,self.EP[2],len(self.Brick.Par)) print msg

RE: Is there a way to ask a class what its metaclasses are ?

2009-02-23 Thread Barak, Ron
> -Original Message- > From: ch...@rebertia.com [mailto:ch...@rebertia.com] On > Behalf Of Chris Rebert > Sent: Sunday, February 22, 2009 22:12 > To: Barak, Ron > Cc: python-list@python.org > Subject: Re: Is there a way to ask a class what its metaclasses are ? >

Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
ction towards a solution. Bye, Ron. $ cat -n metaclass_test01.py 1 #!/usr/bin/env python 2 3 import sys 4 import wx 5 import CopyAndPaste 6 7 #class ListControl(wx.Frame, CopyAndPaste): 8 class ListControl(wx.Frame):

Pyhon (with wxPython) on Windows' cygwin: can it be done fully ?

2008-11-25 Thread Barak, Ron
on25/python.exe). This means that pdb (and, for that matter any Python shell (like IDLE)) gets stuck upon invocation. I was wandering: is anybody able to use native Python on cygwin, or alternately, to use Windows Python under cygwin in IDLE/pdb ? Thanks, Ron. -Original Message- From: D

Simple ini Config parser examples needed

2008-12-02 Thread RON BRENNAN
Hello, I have a very simple ini file that I needs parsed. What is the best way I can parse an ini file that doesn't include sections? As in: person=tall height=small shoes=big Thats it. Can anyone help me? Thanks, Ron-- http://mail.python.org/mailman/listinfo/python-list

Announcement: MindTree for Python beta -- feedback appreciated

2008-12-04 Thread Ron Longo
the left and notes on the right. Some future plans for MindTree include ReStructured Text editing, improved text styling capabilities, Inclusion of structured text objects into articles such as lists and tables and customizable HTML generation. Thanks for you interest, Ron Longo -- View this

RE: tutorial on parser

2008-12-16 Thread Barak, Ron
Hi John, You may want to read http://nedbatchelder.com/text/python-parsers.html Bye, Ron. -Original Message- From: John Fabiani [mailto:jfabi...@yolo.com] Sent: Tuesday, December 16, 2008 08:47 To: python-list@python.org Subject: tutorial on parser Hi, I'm attempting to learn h

RE: String slices work only for first string character ?

2008-12-16 Thread Barak, Ron
Hi Mr. Cain, Mae culpa: obviously, I erroneously understood the number after the ':' as the string length. Thanks, Ron. -Original Message- From: D'Arcy J.M. Cain [mailto:da...@druid.net] Sent: Tuesday, December 16, 2008 15:45 To: Barak, Ron Cc: python-list@python.org Subj

String slices work only for first string character ?

2008-12-16 Thread Barak, Ron
print "|"+data[2:1]+"|" $ python `cygpath -w /tmp/tmp.py` F0023209006-0101 |F| || || $ Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: String slices work only for first string character ?

2008-12-16 Thread Barak, Ron
Thanks to all who pointed my wrong understanding of how string slices are defined. Bye, Ron. From: Barak, Ron [mailto:ron.ba...@lsi.com] Sent: Tuesday, December 16, 2008 15:35 To: python-list@python.org Subject: String slices work only for first string character

RE: Best Practice using Glade/Python (ericericaro: message 1 of 20)

2008-12-21 Thread Barak, Ron
self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged, self.tree) Bye, Ron. P.S.: I think you'd get better responses if you asked this question on wxpython-us...@lists.wxwidgets.org<mailto:wxpython-us...@lists.wxwidgets.org> From: Eric Atienza - e...

Basic misunderstanding of generators

2008-12-22 Thread Barak, Ron
Instead, I get: Could you tell me what I'm doing wrong (or point me to a URL that could set me straight) ? Thanks, Ron. $ cat LogManager_try.py #!/usr/bin/env python import gzip import os class LogStream(): """ """ def __init__

RE: Basic misunderstanding of generators - resolved

2008-12-22 Thread Barak, Ron
Hi Chris, Thanks for the super fast reply. I tried your fix (with a slight modification, namely, I changed your line to be: line_ = generator.next()) And I got the printout I expected. Many thanks, Ron. P.S.: My program looks like so, with your suggestion: $ cat LogManager_try.py #!/usr/bin

How to change a generator ?

2008-12-24 Thread Barak, Ron
line 24. Can you suggest how the generator could be changed, so it will allow me to get the current location in the file after each yield ? Thanks, Ron. $ cat -n generator.py # listing without line numbers is below 1 #!/usr/bin/env python 2 3 import gzip 4 from

RE: How to change a generator ? - resolved

2008-12-24 Thread Barak, Ron
Hi Gabriel, Your remarks fixed my problem. Now my code looks as below, and behaves as expected. Thanks Gabriel. Merry Christmas and Happy Hanukkah, Ron. $ cat generator.py #!/usr/bin/env python import gzip from Debug import _line as line class LogStream(): def __init__(self, filename

RE: os.system('cls')

2008-12-25 Thread Barak, Ron
Hi Dennis, print dir(os.system) print os.__dict__ might help Bye, Ron. From: Dennis van Oosterhout [mailto:de.slotenzwem...@gmail.com] Sent: Thursday, December 25, 2008 12:22 To: python-list@python.org Subject: os.system('cls') Hi there! I was

seek() returns unexpected results

2008-12-25 Thread Barak, Ron
0, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Thanks, Ron. $ cat -n generator.py 1 #!/usr/bin/env python 2 3 import gzip 4 import sys 5 from Debug import _line as line 6 7 class LogStream():

Question withdrawn: seek() returns unexpected results

2008-12-25 Thread Barak, Ron
Hi, Problem solved when strip() is being replaced by strip('\n'). Happy holidays, Ron. From: Barak, Ron Sent: Thursday, December 25, 2008 15:05 To: 'python-list@python.org' Subject: seek() returns unexpected results Hi, When using seek()

Need help getting MoinMoin to run under WSGI

2008-12-27 Thread Ron Garret
I successfully installed MoinMoin as a CGI according to the instructions on the moinmo.in site. But when I tried to switch over to running it under wsgi it failed thusly: [Sat Dec 27 21:44:14 2008] [error] [client 66.214.189.2] Traceback (most recent call last): [Sat Dec 27 21:44:14 2008] [err

Re: Need help getting MoinMoin to run under WSGI

2008-12-28 Thread Ron Garret
In article , Ron Garret wrote: > I successfully installed MoinMoin as a CGI according to the instructions > on the moinmo.in site. But when I tried to switch over to running it > under wsgi it failed thusly: > > [Sat Dec 27 21:44:14 2008] [error] [client 66.214.189.2]

Re: Need help getting MoinMoin to run under WSGI

2008-12-28 Thread Ron Garret
In article , Graham Dumpleton wrote: > On Dec 28, 7:22 pm, Ron Garret wrote: > > In article , > >  Ron Garret wrote: > > > > > > > > > I successfully installed MoinMoin as a CGI according to the instructions > > > on the moinmo.in s

Need help getting MoinMoin to run under SCGI

2008-12-28 Thread Ron Garret
So I have a MoinMoin installation running as a cgi and also under wsgi. Since I was on a roll I decided to press my luck and try running it under scgi. Following a suggestion in the following article: http://www.linuxjournal.com/article/9310 I wrote this little server adapter: from MoinMo

How to find the beginning of last line of a big text file ?

2009-01-01 Thread Barak, Ron
ll lines (ditto) ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: How to find the beginning of last line of a big text file ?

2009-01-04 Thread Barak, Ron
Hi Tim, Thanks for the solution (and effort), and for teaching me some interesting new tricks. Happy 2009! Ron. -Original Message- From: Tim Chase [mailto:python.l...@tim.thechases.com] Sent: Thursday, January 01, 2009 20:04 To: Sebastian Bassi Cc: python-list@python.org Subject: Re

Nubie question: how to not pass "self" in call to seek() function ?

2009-01-08 Thread Barak, Ron
ine_loc_and_contents self.input_file.seek(-1, 2) # grab the last character TypeError: seek() takes exactly 2 arguments (3 given) When I run the below code. I understand that the extra argument is the "self", but I don't know how to change my class to make the seek(-1,2) work. Co

RE: Nubie question: how to not pass "self" in call to seek() function ?

2009-01-08 Thread Barak, Ron
Hi Mark, I think my open_file() - that is called in __init__ - assures that self.input_file is a regular text file, regardless if filename is a gz or a regular text file. My Python is Python 2.5.2. Bye, Ron. -Original Message- From: Mark Tolonen [mailto:metolone+gm...@gmail.com] Sent

The recent SPAM messages, and a suggested solution

2008-10-06 Thread Barak, Ron
s may be a rather complete solution. Bye, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: Array of dict or lists or ....?

2008-10-07 Thread Barak, Ron
quot; struct["Nebraska"]["Wabash"]["Newville"]["Math"]["Max Allowed Students"] = 20 struct["Nebraska"]["Wabash"]["Newville"]["Math"]["Current enrolled Students"] = 0 ... Have an easy Yom Kippur, Ron. -

Error importing wxPython

2008-11-06 Thread ron . reidy
anyone had this problem and how can I resolve it? Thanks in advance. -- Ron Reidy -- http://mail.python.org/mailman/listinfo/python-list

Re: Error importing wxPython

2008-11-06 Thread Ron Reidy
m and how can I resolve it? >> >> Thanks in advance. >> > > downloading and installing this package should fix the problem: > > http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en > -- Ron Reidy -- http://mail.python.org/mailman/listinfo/python-list

What are the Python tools to mine data from log files ?

2008-11-09 Thread Barak, Ron
13 ssp8400 kernel: Dump for [IB_FCP SEST] xxx=0x1592 And then go forward/backwards in the log and get data related to the error message. Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

Log Manager application: are there components already built ?

2008-11-16 Thread Barak, Ron
her "wheels" already built that I could use and save me "reinventing" them? Namely, are there Python modules that could perform the above actions ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

Why is try...except in my code not working (gzip/text files) ?

2008-11-19 Thread Barak, Ron
ead self._read_gzip_header() File "c:\Python25\lib\gzip.py", line 164, in _read_gzip_header raise IOError, 'Not a gzipped file' IOError: Not a gzipped file Can you explain why the try...except in my code does not work ? Or, back to my original problem: how do I deal

Two functionaly identical functions -> different results ??!

2008-11-19 Thread Barak, Ron
, line 19, in read1 print fl.read() File "c:\Python25\lib\gzip.py", line 220, in read self._read(readsize) File "c:\Python25\lib\gzip.py", line 263, in _read self._read_gzip_header() File "c:\Python25\lib\gzip.py", line 164, in _read_gzip_header raise

RE: Why is try...except in my code not working (gzip/text files) ?

2008-11-19 Thread Barak, Ron
Thanks Gabriel, Okay, I get it: I was under the impression that the format check would be done on the open. Bye, Ron. -Original Message- From: Gabriel Genellina [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2008 02:06 To: python-list@python.org Subject: Re: Why is try...except

Solved: Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
Paste 6 7 class ListControl(wx.Frame, CopyAndPaste.CopyAndPaste): I'm getting no more Metaclass conflict TypeError exceptions :-) (a clear case of "The Devil Is In The ...") Thanks so much, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: get text from rogramms runn by subprocess.Popen immediatetly

2009-04-16 Thread Barak, Ron
Maybe try: p = Popen('./iodummy',stdin=PIPE, stdout=PIPE, stderr=PIPE).p (see "18.1.3.4. Replacing the os.spawn family" in http://docs.python.org/library/subprocess.html) Bye, Ron. > -Original Message- > From: Rüdiger Ranft [mailto:_r...@web.de] > Sent

How to Spawn a process with P_NOWAIT and pass it some data ?

2009-05-20 Thread Barak, Ron
' Can anyone suggest what is the correct way to implement P_NOWAIT and still be able to communicate with the child process ? (Or, is there a way to create a subprocess.Popen object from what I assume is the process handle integer ?) Thanks, Ron. The numbering of the scripts' lines:

A fast way to read last line of gzip archive ?

2009-05-21 Thread Barak, Ron
Hi, I need to read the end of a 20 MB gzip archives (To extract the date from the last line of a a gzipped log file). The solution I have below takes noticeable time to reach the end of the gzip archive. Does anyone have a faster solution to read the last line of a gzip archive ? Thanks, Ron

RE: A fast way to read last line of gzip archive ?

2009-05-23 Thread Barak, Ron
> -Original Message- > From: MRAB [mailto:goo...@mrabarnett.plus.com] > Sent: Thursday, May 21, 2009 19:02 > To: 'python-list@python.org' > Subject: Re: A fast way to read last line of gzip archive ? > > Barak, Ron wrote: > > Hi, > >

RE: wxpython and zoom/pan image

2009-05-24 Thread Barak, Ron
ouble-left-click) and create functions/class-instances that would perform the needed actions. I'd suggest reading "wxPython in Action" (ISBN 1-932394-62-1) as it would give you most of the answers you seek. Bye, Ron. > -Original Message- > From: rzzzwil...

RE: A fast way to read last line of gzip archive ?

2009-05-24 Thread Barak, Ron
> -Original Message- > From: garabik-news-2005...@kassiopeia.juls.savba.sk > [mailto:garabik-news-2005...@kassiopeia.juls.savba.sk] > Sent: Sunday, May 24, 2009 13:37 > To: python-list@python.org > Subject: Re: A fast way to read last line of gzip archive ? >

RE: A fast way to read last line of gzip archive ?

2009-05-24 Thread Barak, Ron
acceptable to (human) users. Bye, Ron. > -Original Message- > From: David Bolen [mailto:db3l@gmail.com] > Sent: Monday, May 25, 2009 01:58 > To: python-list@python.org > Subject: Re: A fast way to read last line of gzip archive ? > > "Barak, Ron" wr

How to pickle a 'PySwigObject' ?

2009-05-25 Thread Barak, Ron
l(None, -1),2) Any ideas what could be changed to let me pickle the class ? Thanks, Ron. $ cat -n pickle_test.py 1 #!/usr/bin/env python 2 3 #import pickle 4 import cPickle as pickle 5 import wx 6 7 class ListControl(wx.Frame): 8 9 def

RE: A fast way to read last line of gzip archive ?

2009-05-26 Thread Barak, Ron
Hi David, Thanks for the below solutions: most illuminating. I implemented your previous message suggestions, and already the processing time (on my datasets) is within acceptable human times. I'll try your suggestion below. Thanks again. Ron. > -Original Message- > From:

distutils extension configuration problem

2009-05-26 Thread Ron Garret
I'm trying to build PyObjC on an Intel Mac running OS X 10.5.7. The build is breaking because distutils seems to want to build extension modules as universal binaries, but some of the libraries it depends on are built for intel-only, i.e.: [...@mickey:~/Desktop/pyobjc-framework-ScreenSaver-2.2

Yet another unicode WTF

2009-06-04 Thread Ron Garret
Python 2.6.2 on OS X 10.5.7: [...@mickey:~]$ echo $LANG en_US.UTF-8 [...@mickey:~]$ cat frob.py #!/usr/bin/env python print u'\u03BB' [...@mickey:~]$ ./frob.py ª [...@mickey:~]$ ./frob.py > foo Traceback (most recent call last): File "./frob.py", line 2, in print u'\u03BB' UnicodeEncodeE

Re: Yet another unicode WTF

2009-06-04 Thread Ron Garret
In article , Lawrence D'Oliveiro wrote: > In message , Ron > Garret wrote: > > > Python 2.6.2 on OS X 10.5.7: > > Same result, Python 2.6.1-3 on Debian Unstable. My $LANG is en_NZ.UTF-8. > > > ... I always thought one of the fundamental > > invaria

Parsing MIME-encoded data in an HTTP request

2008-07-03 Thread Ron Garret
I'm writing a little HTTP server and need to parse request content that is mime-encoded. All the MIME routines in the Python standard library seem to have been subsumed into the email package, which makes this operation a little awkward. It seems I have to do the following: 1. Extract the co

Re: Parsing MIME-encoded data in an HTTP request

2008-07-04 Thread Ron Garret
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > On Jul 3, 3:59 pm, Ron Garret <[EMAIL PROTECTED]> wrote: > > I'm writing a little HTTP server and need to parse request content that > > is mime-encoded. All the MIME routines in the Python standa

Re: Parsing MIME-encoded data in an HTTP request

2008-07-04 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Michael Ströder <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > I'm writing a little HTTP server and need to parse request content that > > is mime-encoded. All the MIME routines in the Python standard library > > see

Re: Parsing MIME-encoded data in an HTTP request

2008-07-04 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Ron Garret <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Michael Ströder <[EMAIL PROTECTED]> wrote: > > > Ron Garret wrote: > > > I'm writing a little HTTP server and need to parse reque

Re: Parsing MIME-encoded data in an HTTP request

2008-07-06 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Michael Ströder <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > In article <[EMAIL PROTECTED]>, > > Ron Garret <[EMAIL PROTECTED]> wrote: > > > >> In article <[EMAIL PROTECTED]>, > >> M

Is there any interest in working on an application?

2008-07-16 Thread Ron Longo
sers can think of. If you're interested in more information or trying out this app (note that it's very immature and probably only worthy of being called an alpa) please don't hesitate to contact me. Thanks for reading, Ron-- http://mail.python.org/mailman/listinfo/python-list

Re: last mouse movment or keyboard hit

2008-03-28 Thread Ron Eggler
Diez B. Roggisch wrote: > Ron Eggler schrieb: >> Hi, >> >> I would like to get the time of the most recent human activity like a >> cursor movement or a key hit. >> Does anyone know how I can get this back to start some action after there >> has been no a

tkinter coordinates, conversion

2008-03-29 Thread Ron Provost
points 'p'. Which I wish to use to provided information back to the user. Thanks, Ron-- http://mail.python.org/mailman/listinfo/python-list

A "Fixed" Tk Text widget

2008-04-13 Thread Ron Provost
ove according to display lines rather than Paragraphs. This widget can be found here http://tkinter.unpythonic.net/wiki/EnhancedText. Thanks for any comments, bug reports, etc. Ron Longo-- http://mail.python.org/mailman/listinfo/python-list

Re: So you think PythonCard is old? Here's new wine in an old bottle.

2008-04-27 Thread Ron Stephens
John, This is very interesting! Please do make this available. I love PythonCard, but I am doing mainly web programming these days. I will mention this on my next podcast. Can you do a slider? Ron Stephens Python411 www.awaretek.com/python/index.html -- http://mail.python.org/mailman/listinfo

Sorting an array on the nth element in a list

2008-08-20 Thread Ron Brennan
Hello, I am trying to parse a log file. I want to sort based on the second element the list that is in the file. What is the best way to do this? The sort is just on the line itself where I want to re-organize the lines based on the second element of the csv file Thanks, Ron -- http

Multiple values for one key

2008-08-27 Thread Ron Brennan
Hello, How would I create a dictionary that contains multiple values for one key. I'd also like the key to be able to have duplicate entries. Thanks, Ron -- FYI, my email address is changing. My rogers account will be deactivated shortly. From now on please use: [EMAIL PROTECTED] --

Re: Multiple values for one key

2008-08-28 Thread Ron Brennan
I have another question. How would like to be able to add the contents on the values for one key. key['20001']:[978, 345] How can I do this? Thanks, Ron On Thu, Aug 28, 2008 at 11:56 AM, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > norseman a écrit : >

Multipart - Counting the amount of Values for One key

2008-08-29 Thread Ron Brennan
hello, I am trying to find the amount of values there are pertaining to one key. For example: - To find the average of the values pertaining to the key. - Use the amount of values to calculate a histogram Also, how do reference a specific value for a key in a multipart? Thanks, Ron -- FYI

"AttributeError: 'module' object has no attribute 'getdefaultlocale'" on Python start

2008-09-09 Thread Barak, Ron
uot; or "license" for more information. >>> Has anyone else gotten this error ? Could anyone suggest a solution ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

ImportError: No module named zipextimporter on py2exe when { "compressed": 0 }

2008-09-10 Thread Barak, Ron
ges\py2exe\mf.py", line 204, in find_head_package raise ImportError, "No module named " + qname ImportError: No module named zipextimporter My Setup.py (produced by GUI2Exe) is attached. Note that I set compressed to 0 in Setup.py (options = {"py2exe": {"compress

Configuration Parsers

2008-09-17 Thread Ron Brennan
Hello, I am trying to parse a shared config file which doesn't contail section headers. Is there a way I can still use ConfigParser()? If not what is a widely used parser available? Thanks, Ron -- http://mail.python.org/mailman/listinfo/python-list

CTypes on a 64 bit machine truncates pointers to 32 bits?

2008-09-18 Thread Ron Garret
CTypes on a 64-bit machine appears to be truncating pointers to 32 bits: [EMAIL PROTECTED]:~]$ uname -a Linux monster1 2.6.18-6-amd64 #1 SMP Mon Jun 16 22:30:01 UTC 2008 x86_64 GNU/Linux [EMAIL PROTECTED]:~]$ cat foo.c void* foo(void* x) { return x; } [EMAIL PROTECTED]:~]$ gcc -fPIC -shared foo.c

Re: CTypes on a 64 bit machine truncates pointers to 32 bits?

2008-09-18 Thread Ron Garret
In article <[EMAIL PROTECTED]>, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > foolib = cdll.LoadLibrary('foo.so') > foolib.foo(0xF) > > 0 > > Shouldn't you tell ctypes that the argument and the result > of foo is a pointer? Yeah... that's it. Default return type is int, whic

Multimapping and string converting

2008-09-19 Thread Ron Brennan
5 567 898 Can anyone see the errors of my ways? Thanks, Ron -- http://mail.python.org/mailman/listinfo/python-list

How to copy a GUI2exe project - to serve as basis for new project ?

2008-09-24 Thread Barak, Ron
Hi, In GUI2exe, I'd like to create a project that is different from an existing project only in a few details (e.g., the location of the 'dist' directory). Is there a way to copy a current project - so it would serve as a basis for a new project ? Bye, Ron. -- http://mail.pyt

Re: Cheese Shop: some history for the new-comers

2006-03-12 Thread Ron Adam
Fredrik Lundh wrote: > Tim Parkin wrote: >> Also 'Foundation' could be confused with 'beginners' or 'basic'. > > while "PSF" is completely incomprehensible for someone who doesn't > already know what it is... why even keep it on the front page ? Looks like a good place for a tool tip, PSF is o

Re: Cheese Shop: some history for the new-comers

2006-03-12 Thread Ron Adam
Fredrik Lundh wrote: > Ron Adam wrote: > >> I think the PSF is important enough to have a link on *every* page. It >> doesn't need a lot of space, but it should be easy to get to from >> anywhere on the web site. > > a copyright blurb at the bottom of the page

Re: Cheese Shop: some history for the new-comers

2006-03-12 Thread Ron Adam
f cheese". Now if you want silliness, then the correct establishment for that is "The Ministry of Silly Walks". ;) Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this possible in Python?

2006-03-13 Thread Ron Garret
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Hi > > I wonder if Python is capable of the following: define a function which > returns its argument. > I mean: > def magic_function(arg): > .. some magic code ... > > that behaves the following way: > > assert magic_funct

Re: pretty print, tidy, reindent.py

2006-03-15 Thread Ron Adam
o clean a lot of it up. I > wonder if there is a reformatter/pretty printer that like perl tidy > that might help. I see i have tabnanny, but that only complains... i > want something that fixes automagically. > > -kp8-- What you're looking for is in "Python24/Tools/Scripts"

Re: My Generator Paradox!

2006-03-17 Thread Ron Adam
eld 'hello' >>> g.next() after yield before yield 'hello' When the next() method is called the generator runs until it reaches a yield. At which point it's rests until the next() method is called again. Although there are times when I wish it could run (as a

Re: My Generator Paradox!

2006-03-17 Thread Ron Adam
t;>> g.next() 'hello' >>> g.next() all done Traceback (most recent call last): File "", line 1, in ? StopIteration This is the signal to indicate iteration is finished. You don't see it when you are using generators as iterators because it's usu

Re: strange math?

2006-03-18 Thread Ron Adam
Hmm. I know, I > know, why am I sending it a 01,02, or a 010 to begin with? Like I > said, it was an accident, but now i'm curious. I'm not a computer > science major so please be kind with any explanations. Number beginning with the digit '0' are octal (base 8

Re: Can I use a conditional in a variable declaration?

2006-03-19 Thread Ron Adam
rue: "go ahead", False: "stop"} answer = answers[a == "yes"] This is also sometimes useful when you want to alternate between two values. values = {'a':'b', 'b':'a'} # define outside loop while 1: v = valu

Re: Initializing a list of lists

2006-03-19 Thread Ron Adam
].append(1) >>>> x > [[0, 1], [0, 1], [0, 1]] > > Is there a simple way to create a list of independent lists? Try this... x, y, value = 3, 3, 0 L = [[value]*x for i in xrange(y)] Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there such an idiom?

2006-03-19 Thread Ron Adam
= set([4,5,6,7,8,9]) >>> s.intersection(t) set([4, 5, 6]) >>> len(s.intersection(t)) 3 Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there such an idiom?

2006-03-19 Thread Ron Adam
Per wrote: > Thanks Ron, > surely set is the simplest way to understand the question, to see > whether there is a non-empty intersection. But I did the following > thing in a silly way, still not sure whether it is going to be linear > time. > def foo(): > l = [...] >

Re: ** Operator

2006-03-20 Thread Ron Adam
". If it's hard to read and understand, then that can and should be fixed. It probably should be moved to a position before the library reference manual and after the tutorial. Looking over the language reference manual will help in understanding the library reference manual I think. Cheers, Ron -- http://mail.python.org/mailman/listinfo/python-list

<    2   3   4   5   6   7   8   >