Threads vs. processes, what to consider in choosing ?

2009-02-17 Thread Barak, Ron
What would you suggest I should consider in choosing between the two options ? Are there other options besides threads and multi-processing ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: Putting asterisks around text

2009-02-11 Thread Barak, Ron
[http://www.emofaces.com/en/emoticons/t/thumbs-up-emoticon.gif] -Original Message- From: D'Arcy J.M. Cain [mailto:da...@druid.net] Sent: Monday, February 09, 2009 20:21 To: todp...@hotmail.com Cc: python-list@python.org Subject: Re: Putting asterisks around text On Mon, 9 Feb 2009 10:09:2

RE: How to copy an instance without its cStringIO.StringO item ?

2009-02-09 Thread Barak, Ron
log_stream.__dict__[key] del for_pickle_log_stream.__dict__["input_file"] (i.e., log_stream is the source instance, and for_pickle_log_stream is the target) So, it seems to be in agreement with your suggestion. Thanks and bye, Ron. -Original Message- From: John

How to copy an instance without its cStringIO.StringO item ?

2009-02-08 Thread Barak, Ron
;start_time': '2009 Dec 15 16:17:24', 'volume_name': 'Domain 5:DVol1_2'}], 'end_timestamp': 1260886645L, 'file_pointer': 58180, 'filename_array': [ u'C:\\Documents and Settings\\rbarak\\rbarak_devel\

How to copy an instance without its cStringIO.StringO item ?

2009-02-08 Thread Barak, Ron
elegant way to do that, I thought of creating a "blank" target instance; then iterating over the __dict__ of the original, and manually copy the items to the target (while not copying the cStringIO.StringO to the target). Can you suggest a better way ? Thanks, Ron. Traceback (most r

Re: WebError documentation?

2009-02-07 Thread Ron Garret
In article <498de947$0$24412$426a7...@news.free.fr>, Bruno Desthuilliers wrote: > Ron Garret a écrit : > > In article , > > Chris Rebert wrote: > > > >> On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret wrote: > >>> Is there any? Where is it? Ex

Re: WebError documentation?

2009-02-07 Thread Ron Garret
In article , Chris Rebert wrote: > On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret wrote: > > Is there any? Where is it? Extensive Googling has proven fruitless. > > It's not a standard Python exception. A third-party library you're > using must be raising it. Check

WebError documentation?

2009-02-06 Thread Ron Garret
Is there any? Where is it? Extensive Googling has proven fruitless. Thanks, rg -- http://mail.python.org/mailman/listinfo/python-list

RE: How to find wxPython method documentation??

2009-02-05 Thread Barak, Ron
lso find Google invaluable in searching for wxPython knowledge, e.g., try http://www.google.com/search?q=wxpython+dialog. Bye, Ron. -- http://mail.python.org/mailman/listinfo/python-list

Re: Extreme Yaro weirdness

2009-02-02 Thread Ron Garret
In article , "Gabriel Genellina" wrote: > En Mon, 02 Feb 2009 06:59:16 -0200, Ron Garret > escribió: > > > I'm running the following WSGI app under Yaro: > > > > def error(req): > > try: > > req.non_existent_key > > e

Extreme Yaro weirdness

2009-02-02 Thread Ron Garret
I'm running the following WSGI app under Yaro: def error(req): try: req.non_existent_key except: try: return cgitb.html(sys.exc_info()) except: return 'foo' The result of running this is 'foo'. In other words, the reference to the non-existent key generates an except

Re: More mod_wsgi weirdness: process restarts on redirect

2009-01-30 Thread Ron Garret
In article <63cf7deb-f15c-4259-aa24-1b8da8468...@r41g2000prr.googlegroups.com>, Graham Dumpleton wrote: > On Jan 30, 11:01 am, Ron Garret wrote: > > In article , > >  Joshua Kugler wrote: > > > > > Ron Garret wrote: > > > > My question is:

Re: Sloooooowwwww WSGI restart

2009-01-30 Thread Ron Garret
In article <146f6796-37b5-4220-bdb1-5119cb3ac...@z6g2000pre.googlegroups.com>, Graham Dumpleton wrote: > On Jan 30, 9:53 am, Ron Garret wrote: > > In article <498171a5$0$3681$426a7...@news.free.fr>, > >  Bruno Desthuilliers > > > >  wrote: > &

Re: More mod_wsgi weirdness: process restarts on redirect

2009-01-29 Thread Ron Garret
In article , Joshua Kugler wrote: > Ron Garret wrote: > > My question is: is this supposed to be happening? Or is this an > > indication that something is wrong, and if so, what? > > You are probably just hitting a different instance of Apache, thus the > different

Re: More mod_wsgi weirdness: process restarts on redirect

2009-01-29 Thread Ron Garret
In article , Ron Garret wrote: > I'm running mod_wsgi under apache (on Debian etch so it's a somewhat out > of date version, though I doubt that has anything to do with this issue). > > I have a little test page that displays the process ID under which my > app is

More mod_wsgi weirdness: process restarts on redirect

2009-01-29 Thread Ron Garret
I'm running mod_wsgi under apache (on Debian etch so it's a somewhat out of date version, though I doubt that has anything to do with this issue). I have a little test page that displays the process ID under which my app is running, and some global state, so I can tell when the wsgi app gets re

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Ron Garret
In article <498170d4$0$23718$426a7...@news.free.fr>, Bruno Desthuilliers wrote: > Ron Garret a écrit : > > I'm running a WSGI app under apache/mod_wsgi and I've noticed that > > whenever I restart the server after making a code change it takes a very > >

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Ron Garret
In article <498171a5$0$3681$426a7...@news.free.fr>, Bruno Desthuilliers wrote: > Ron Garret a écrit : > > In article , > > Aleksandar Radulovic wrote: > (snip) > >> Secondly, why are you restarting apache after code changes? In normal > >> ci

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article <4cd232ff-ba8b-47aa-8ee6-d8d9712db...@s1g2000prg.googlegroups.com>, Graham Dumpleton wrote: > On Jan 29, 8:35 am, Ron Garret wrote: > > I'm running a WSGI app under apache/mod_wsgiand I've noticed that > > whenever I restart the server after makin

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article , Jean-Paul Calderone wrote: > On Wed, 28 Jan 2009 13:35:56 -0800, Ron Garret wrote: > >I'm running a WSGI app under apache/mod_wsgi and I've noticed that > >whenever I restart the server after making a code change it takes a very > >long time (like

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article , Aleksandar Radulovic wrote: > Hi there, > > On Wed, Jan 28, 2009 at 9:35 PM, Ron Garret wrote: > > I'm running a WSGI app under apache/mod_wsgi and I've noticed that > > Off the bat, there's no reason to run an app under apache/mod_wsgi &

Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
I'm running a WSGI app under apache/mod_wsgi and I've noticed that whenever I restart the server after making a code change it takes a very long time (like a minute) before the script is active again. In other words, I do an apachectl restart, reload the page in my browser, and one minute late

RE: How to execute a hyperlink?

2009-01-28 Thread Barak, Ron
Hi Muddy, http://docs.python.org/library/urllib2.html may help. Bye, Ron. -Original Message- From: Muddy Coder [mailto:cosmo_gene...@yahoo.com] Sent: Wednesday, January 28, 2009 03:00 To: python-list@python.org Subject: How to execute a hyperlink? Hi Folks, Module os provides a means

RE: How to print lambda result ?

2009-01-20 Thread Barak, Ron
Ah, okay. Now it's clear. Thanks Tino. Ron. -Original Message- From: Tino Wildenhain [mailto:t...@wildenhain.de] Sent: Tuesday, January 20, 2009 14:45 To: Barak, Ron Cc: python-list@python.org Subject: Re: How to print lambda result ? Barak, Ron wrote: > Thanks Tino: your s

RE: How to print lambda result ?

2009-01-20 Thread Barak, Ron
Thanks Tino: your solutions without the lambda work nicely. What I still don't understand is why the print does not execute the lambda and prints the result, instead of printing the lambda's object description. Bye, Ron. -Original Message- From: Tino Wildenhain

How to print lambda result ?

2009-01-20 Thread Barak, Ron
I get: 1 event at 0x00AFE670> 2 event at 0x00AFE670> 3 event at 0x00AFE6B0> Reading the first results of http://www.google.com/search?q=python+lambda didn't enlighten me. Could you point to a URL which could set me on the right path to get the expected output ? Thanks, Ron. --

wsgi silently swallows errors

2009-01-19 Thread Ron Garret
Consider the following wsgi app: def application(env, start_response): start_response('200 OK',[('Content-type','text/plain')]) yield "hello" x=1/0 yield "world" The result of this is that the web browser displays "hello" and an error message ends up in the web log. But there is no othe

Yaro vs WebOb

2009-01-19 Thread Ron Garret
I'm selecting infrastructure for a web development and I've found two lightweight frameworks that seem to offer a lot of bang-for-the-byte: Yaro and WebOb. I'm wondering if anyone here has used either or both and has opinions about them. What has been your experience with them? Which do you

Re: WSGI question: reading headers before message body has been read

2009-01-18 Thread Ron Garret
On Jan 18, 1:21 pm, Graham Dumpleton wrote: > On Jan 19, 6:01 am, Ron Garret wrote: > > > I'm writing a WSGI application and I would like to check the content- > > length header before reading the content to make sure that the content > > is not too big in order

Re: WSGI question: reading headers before message body has been read

2009-01-18 Thread Ron Garret
On Jan 18, 12:40 pm, "Diez B. Roggisch" wrote: > Ron Garret schrieb: > > > > > On Jan 18, 11:29 am, "Diez B. Roggisch" wrote: > >> Ron Garret schrieb: > > >>> I'm writing a WSGI application and I would like to check the conten

Re: WSGI question: reading headers before message body has been read

2009-01-18 Thread Ron Garret
On Jan 18, 11:43 am, Petite Abeille wrote: > On Jan 18, 2009, at 8:01 PM, Ron Garret wrote: > > > def application(environ, start_response): > >    status = "200 OK" > >    headers = [('Content-Type', 'text/html'), ] > >    start_res

Re: WSGI question: reading headers before message body has been read

2009-01-18 Thread Ron Garret
On Jan 18, 11:29 am, "Diez B. Roggisch" wrote: > Ron Garret schrieb: > > > > > I'm writing a WSGI application and I would like to check the content- > > length header before reading the content to make sure that the content > > is not too big in orde

WSGI question: reading headers before message body has been read

2009-01-18 Thread Ron Garret
I'm writing a WSGI application and I would like to check the content- length header before reading the content to make sure that the content is not too big in order to prevent denial-of-service attacks. So I do something like this: def application(environ, start_response): status = "200 OK"

RE: Could you suggest optimisations ?

2009-01-14 Thread Barak, Ron
Hi Terry, -Original Message- From: Terry Reedy [mailto:tjre...@udel.edu] Sent: Wednesday, January 14, 2009 01:57 To: python-list@python.org Subject: Re: Could you suggest optimisations ? Barak, Ron wrote: > Hi, > > In the attached script, the longest time is spent in the

Could you suggest optimisations ?

2009-01-13 Thread Barak, Ron
ations, so I could cut down on processing time, but got no inspiration. (I need the "print "%.2f%% \r" ..." line for user's feedback). Could you suggest any optimisations ? Thanks, Ron. P.S.: Examples of processing times are: * 2m42.782s on two files with combin

RE: Relative performance of comparable regular expressions

2009-01-13 Thread Barak, Ron
-zA-Z]{3}", or with "^\S{3}" ?): (2) I think you mean "^\s{3}" not "^\S{3}", I actually did meant to use \S, namely - a character that is not a white-space. Bye, Ron. -Original Message- From: John Machin [] Sent: Tuesday, January 13, 2009 11:15 To: pyth

Relative performance of comparable regular expressions

2009-01-13 Thread Barak, Ron
(if different at all): "\d\d" or "\d{2}" ? Also, would matching "." be different (performance-wise) than matching the actual character, e.g. matching ":" ? And lastly, at the end of a line, is there any performance difference between "(.+)$" and

Is negative seek() from EOF of a GzipFile supported on Python 2.5.2 ?

2009-01-11 Thread Barak, Ron
ive seek self.rewind() count = offset - self.offset for i in range(count // 1024): self.read(1024) self.read(count % 1024) Could any who're familiar with the inner working of gzip settle this issue ? Is seek from EOF supported for gzip files

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

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: 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

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

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

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

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]

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

Initializing GHC from Python

2008-12-27 Thread Ron de Bruijn
Hi, We have just published a small article on how one can initialize GHC from Python, with only optional use of C. You can read it at http://gamr7.com/blog/?p=65 . Best regards, Ron de Bruijn -- http://mail.python.org/mailman/listinfo/python-list

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()

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():

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

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

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: 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

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: 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...

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: 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: 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

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

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

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

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

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

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

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

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

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

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: 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. -

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

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

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

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

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

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

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

"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

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

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 : >

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] --

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

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: 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

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-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]>, [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

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: 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

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

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

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

Re: last mouse movment or keyboard hit

2008-03-26 Thread Ron Eggler
Gabriel Genellina wrote: >>> En Wed, 26 Mar 2008 00:38:08 -0300, Ron Eggler <[EMAIL PROTECTED]> >>> escribió: >>> >>> >> I would like to get the time of the most recent human activity like a >>> >> cursor >>> >> moveme

Re: last mouse movment or keyboard hit

2008-03-26 Thread Ron Eggler
time, count the interactions of key strokes and mouse > gestures. Apply some statistics and voila. there it is. But that wouldn't be system wide, would it? :o > On Mar 26, 3:28 pm, Ron Eggler <[EMAIL PROTECTED]> wrote: >> Gabriel Genellina wrote: >> > En Wed,

Re: last mouse movment or keyboard hit

2008-03-26 Thread Ron Eggler
Gabriel Genellina wrote: > En Wed, 26 Mar 2008 00:38:08 -0300, Ron Eggler <[EMAIL PROTECTED]> escribió: > >> 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 b

last mouse movment or keyboard hit

2008-03-25 Thread Ron Eggler
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 activity for X minutes/seconds? Thank you! -- chEErs roN -- http://mail.python.org/mailman/listinfo

New Full Tkinter document editor widget -- suggestions, comments, etc.

2008-03-24 Thread Ron Provost
using 'slant') Several previously existing options have some new values: 'spacing1', 'spacing2' and 'spacing3' may take 'None', 'Half Line', 'One Line' or 'Two Lines' in addition to any of the values acceptable b

Re: Removal of tkinter from python 3.0? [was: Fate of the repr module inPy3.0]

2008-03-20 Thread Ron Provost
I would really hate to see Tkinter removed from 3.0. Because it's part of the distribution and extremely easy to create simple GUIs I use it all the time. Isn't Python supposed to be a "Batteries Included" language? Can that be said anymore without a GUI library? And do we want to drop Tkint

Re: tab completion?

2008-03-04 Thread Ron DuPlain
http://ipython.scipy.org/ You can also get it by: $ easy_install ipython Run it using the command: $ ipython Is this what you want? Ron -- Ron DuPlain <[EMAIL PROTECTED]> http://www.linkedin.com/in/rduplain -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems Generating HTML With pydoc

2008-02-28 Thread Ron DuPlain
d. Yes, pydoc -g worked just fine for me before trying this workaround. If you'd like some more information, I created a pydoc example which you can browse/download. It also serves as an example of my interpretation of "Style Guide for Python Code" (PEP 8) and "Docstring

<    1   2   3   4   5   6   7   8   >