Recall: How to add a library path to pythonpath ?

2010-03-18 Thread Barak, Ron
Barak, Ron would like to recall the message, How to add a library path to pythonpath ?. -- http://mail.python.org/mailman/listinfo/python-list

RE: How to add a library path to pythonpath ?

2010-03-17 Thread Barak, Ron
-Original Message- From: Dave Angel [mailto:da...@ieee.org] Sent: Tuesday, March 16, 2010 6:24 PM To: Barak, Ron Cc: Pablo Recio Quijano; python-list@python.org Subject: Re: How to add a library path to pythonpath ? Barak, Ron wrote: -Original Message- From: Dave

RE: How to add a library path to pythonpath ?

2010-03-17 Thread Barak, Ron
-Original Message- From: Mark Hammond [mailto:skippy.hamm...@gmail.com] Sent: Wednesday, March 17, 2010 2:08 AM To: Barak, Ron Cc: Pablo Recio Quijano; python-list@python.org Subject: Re: How to add a library path to pythonpath ? On 17/03/2010 1:26 AM, Barak, Ron wrote

How to add a library path to pythonpath ?

2010-03-16 Thread Barak, Ron
\\lib-tk', 'c:\\Python26', 'c:\\Python26\\lib\\site-packages', 'c:\\Python26\\lib\\site-packages\\wx-2.8-msw-unicode'] $ What am I doing wrong ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

RE: How to add a library path to pythonpath ?

2010-03-16 Thread Barak, Ron
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\version\PythonPath\ as C:\Python26\Lib;C:\Python26\DLLs;C:\views\cc_view\TS_svm_ts_tool\SVMInspector\lib\;C:\Python26\Lib\lib-tk; However, even with all the above, the SVMInspecor modules are not found. Bye, Ron. From: Pablo Recio

RE: How to add a library path to pythonpath ?

2010-03-16 Thread Barak, Ron
-Original Message- From: Dave Angel [mailto:da...@ieee.org] Sent: Tuesday, March 16, 2010 5:04 PM To: Barak, Ron Cc: Pablo Recio Quijano; python-list@python.org Subject: RE: How to add a library path to pythonpath ? Barak, Ron wrote: Thanks for the suggestion Pable

[issue2001] Pydoc interactive browsing enhancement

2010-03-09 Thread Ron Adam
Changes by Ron Adam ron_a...@users.sourceforge.net: Removed file: http://bugs.python.org/file16411/pydoc_gui.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2001

[issue2001] Pydoc interactive browsing enhancement

2010-03-09 Thread Ron Adam
Ron Adam ron_a...@users.sourceforge.net added the comment: Missed a buffer write in the gettopic() method. Fixed. Plus some minor doc string changes. Can someone change the stage to patch review. I can't do that myself. Or is there something else I need to do first? -- Added file

Re: python admin abuse complaint

2010-02-06 Thread Ron Adam
it. Regards, Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-26 Thread Ron
On Jan 26, 10:59 am, CM cmpyt...@gmail.com wrote: On Jan 24, 10:18 pm, Ron ursusmaxi...@gmail.com wrote: Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT open source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI based app

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Ron
is non-deterministic. I am in the analog engineering world and simple, deterministic black and white situations are all fine and useful, but I can see this very easy to use and simple technology being useful also ;-)) All of the above apps are but a few lines of code. Ron -- http://mail.python.org

Re: Sikuli: the coolest Python project I have yet seen...

2010-01-25 Thread Ron
OK, here's an idea. I used to do screen scraping scripts and run them as CGI scripts with an HTMl user interface. Why not run Sikuli on Jython on a JVM running on my server, so that I can do my screen scraping with Sikuli? I can take user inputs by using CGI forms from a web client, process the

Sikuli: the coolest Python project I have yet seen...

2010-01-24 Thread Ron
Sikuli is the coolest Python project I have ever seen in my ten year hobbyist career. An MIT oepn source project, Sikuli uses Python to automate GUI tasks (in any GUI or GUI baed app that runs the JVM) by simply drag and dropping GUI elements into Python scripts as function arguments. Download at

Re: TypeError: startView() takes exactly 1 argument (3 given)

2009-12-30 Thread Ron Croonenberg
Dave Angel wrote: Ron Croonenberg wrote: div class=moz-text-flowed style=font-family: -moz-fixedHello, I am trying to write a plugin for Rhythmbox in python and run into a 'strange' problem. For a method (an action for clicking a button) I started a method and however many arguments I use

Solved: TypeError: startView() takes exactly 1 argument (3 given)

2009-12-30 Thread Ron Croonenberg
wrote: Ron Croonenberg wrote: div class=moz-text-flowed style=font-family: -moz-fixedHello, I am trying to write a plugin for Rhythmbox in python and run into a 'strange' problem. For a method (an action for clicking a button) I started a method and however many arguments I use, it keeps giving

Re: I think I found a bug in Python 2.6.4 (in the inspect module)

2009-12-30 Thread Ron Croonenberg
hello, is there a way, in python, to create a splash window and when the program has completed disappears by sending a msg to it? (I tried creating two gtk windows but gtk_main doesn't seem to return unless it gets closed.) tia Ron -- http://mail.python.org/mailman/listinfo/python-list

whoops: create a splash window in python

2009-12-30 Thread Ron Croonenberg
sorry about posting with the wrong subject... * hello, is there a way, in python, to create a splash window and when the program has completed disappears by sending a msg to it? (I tried creating two gtk windows but gtk_main doesn't seem to return unless it gets closed.) tia Ron

TypeError: startView() takes exactly 1 argument (3 given)

2009-12-29 Thread Ron Croonenberg
)' does someone have any pointers or tips?, thanks; Ron here is the code I have the problem with: import rb import pygtk import gtk, gobject pygtk.require('2.0') class tb_button (rb.Plugin): # # the init thing # def __init__(self): rb.Plugin.__init__(self) # # the activate thing

Recall: How to log messages _only once_ from all modules ?

2009-11-24 Thread Barak, Ron
Barak, Ron would like to recall the message, How to log messages _only once_ from all modules ?. -- http://mail.python.org/mailman/listinfo/python-list

How to log messages _only once_ from all modules ?

2009-11-24 Thread Barak, Ron
should I change in the above scripts so that the log messages would appear only once ? Thanks, Ron. inline: image001.jpginline: image003.jpg client.log Description: client.log client.py Description: client.py server.py Description: server.py -- http://mail.python.org/mailman/listinfo/python

How to log messages _only once_ from all modules ?

2009-11-24 Thread Barak, Ron
should I change in the above scripts so that the log messages would appear only once ? Thanks, Ron. server.py Description: server.py client.py Description: client.py client.log Description: client.log -- http://mail.python.org/mailman/listinfo/python-list

Re: How to log messages _only once_ from all modules ?

2009-11-24 Thread Ron Barak
On Nov 24, 3:45 pm, Soltys sol...@noabuse.com wrote: Barak, Ron pisze: Hi, I'm trying to add the logging module to my application, but I seem to be missing something. My application (a wxPython one) has a main script that calls various helper classes. I want the log messages

Re: How to log messages _only once_ from all modules ?

2009-11-24 Thread Ron Barak
On Nov 24, 5:08 pm, Soltys sol...@noabuse.com wrote: Ron Barak pisze: On Nov 24, 3:45 pm, Soltys sol...@noabuse.com wrote: Barak, Ron pisze: Hi, I'm trying to add the logging module to my application, but I seem to be missing something. My application (a wxPython one) has

RE: Run pyc file without specifying python path ?

2009-08-02 Thread Barak, Ron
-Original Message- From: Dave Angel [mailto:da...@dejaviewphoto.com] Sent: Thursday, July 30, 2009 20:08 To: Barak, Ron Cc: 'python-list@python.org' Subject: Re: Run pyc file without specifying python path ? Barak, Ron wrote: Hi Dave, On second thoughts, I may have

RE: Run pyc file without specifying python path ?

2009-07-31 Thread Barak, Ron
-Original Message- From: Dave Angel [mailto:da...@dejaviewphoto.com] Sent: Thursday, July 30, 2009 16:03 To: Barak, Ron Cc: 'Dave Angel'; 'python-list@python.org' Subject: RE: Run pyc file without specifying python path ? Barak, Ron wrote: -Original Message- From

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Barak, Ron
-Original Message- From: Dave Angel [mailto:da...@ieee.org] Sent: Wednesday, July 29, 2009 21:05 To: Barak, Ron Cc: 'python-list@python.org' Subject: Re: Run pyc file without specifying python path ? Barak, Ron wrote: Hi, I wanted to make a python byte-code file executable

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Barak, Ron
From: PythonAB [mailto:pyt...@rgbaz.eu] Sent: Thursday, July 30, 2009 12:18 To: Barak, Ron Cc: 'Dave Angel'; 'python-list@python.org' Subject: Re: Run pyc file without specifying python path ? Hi Dave, Your solution sort of defeats my intended purpose (sorry

RE: Run pyc file without specifying python path ?

2009-07-30 Thread Barak, Ron
, Ron. -Original Message- From: Dave Angel [mailto:da...@dejaviewphoto.com] Sent: Thursday, July 30, 2009 16:03 To: Barak, Ron Cc: 'Dave Angel'; 'python-list@python.org' Subject: RE: Run pyc file without specifying python path ? Barak, Ron wrote: -Original Message- From

Run pyc file without specifying python path ?

2009-07-29 Thread Barak, Ron
file without specifying the python path ? Bye, Ron. -- http://mail.python.org/mailman/listinfo/python-list

Re: If Scheme is so good why MIT drops it?

2009-07-22 Thread Ron Garret
In article urr9m.6558$ze1.5...@news-server.bigpond.net.au, Neil Hodgson nyamatongwe+thun...@gmail.com wrote: milanj: and all of them use native threads (python still use green threads ?) Python uses native threads. But then it adds the global interpreter lock, which completely

What are the limitations of cStringIO.StringIO() ?

2009-07-01 Thread Barak, Ron
suggest a better way to create a string that contains the concatenation of several big files ? Thanks, Ron. -- http://mail.python.org/mailman/listinfo/python-list

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 module print u'\u03BB'

Re: Yet another unicode WTF

2009-06-04 Thread Ron Garret
In article h09ten$5q...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message rnospamon-e7e08b.18181804062...@news.gha.chartermi.net, 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

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

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

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

2009-05-25 Thread Barak, Ron
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 ron.ba...@lsi.com writes: I thought maybe someone has

How to pickle a 'PySwigObject' ?

2009-05-25 Thread Barak, Ron
, -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 __init__(self

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

2009-05-24 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, I need to read the end of a 20 MB gzip archives

RE: wxpython and zoom/pan image

2009-05-24 Thread Barak, Ron
-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...@gmail.com [mailto:rzzzwil...@gmail.com

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 ? Barak, Ron ron.ba...@lsi.com

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

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

2009-05-20 Thread Barak, Ron
is the process handle integer ?) Thanks, Ron. The numbering of the scripts' lines: $ cat -n subprocess_sender.py 1 #!/usr/bin/env python 2 3 import subprocess 4 5 proc = subprocess.Popen([python, -u, subprocess_receiver.py], stdin=subprocess.PIPE, shell=True).pid 6

[issue5430] imaplib: must not replace LF or CR by CRLF in literals

2009-04-26 Thread Ron DuPlain
Ron DuPlain ron.dupl...@gmail.com added the comment: Module imaplib has pretty sparse test code. There is only 1 test case, for imaplib.Time2Internaldate. trunk/Lib/test/test_imaplib.py The attached patch tests for LF, CR preservation with regard to the IMAP4.append method, but more testing

[issue5430] imaplib: must not replace LF or CR by CRLF in literals

2009-04-25 Thread Ron DuPlain
Ron DuPlain ron.dupl...@gmail.com added the comment: It looks like the IMAP4.append method is responsible for the CRLF substitution (trunk/Lib/imaplib.py). # defined near top of module: MapCRLF = re.compile(r'\r\n|\r|\n') # in append method: self.literal = MapCRLF.sub(CRLF, message) I'll work

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: Thursday, April 16, 2009 14:13

[issue4535] Build / Test Py3K failed on Ubuntu 8.10

2009-03-30 Thread Ron DuPlain
Ron DuPlain ron.dupl...@gmail.com added the comment: For what it's worth, I ran these tests on Ubuntu 8.10 with Python trunk (2.7) r70765 (svn). All tests passed. Output is attached (cleaned out ref counts). --rduplain -- nosy: +rduplain Added file: http://bugs.python.org/file13503

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 ? On Sun, Feb 22, 2009 at 5:14 AM

Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
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): 9

Solved: Metaclass conflict TypeError exception: problem demonstration script

2009-02-23 Thread Barak, Ron
much, Ron. -- http://mail.python.org/mailman/listinfo/python-list

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 conflict error: where

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 noconflict ? On Sun, Feb 22, 2009 at 1

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 noconflict ? On Sun, Feb 22, 2009 at 3:31 AM

How to inherit from two classes without metaclass clashing ?

2009-02-22 Thread Barak, Ron
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 Simionato [mailto:michele.simion

RE: metaclass conflict error: where is noconflict ?

2009-02-22 Thread Barak, Ron
) 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 Subject: Re: metaclass conflict error

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 Bye, Ron

Re: To unicode or not to unicode

2009-02-20 Thread Ron Garret
In article mailman.373.1235153296.11746.python-l...@python.org, MRAB goo...@mrabarnett.plus.com 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

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 stdin, line 1, in module UnicodeDecodeError: 'ascii' codec can't decode byte 0xb5 in position 0: ordinal not in

Re: To unicode or not to unicode

2009-02-20 Thread Ron Garret
In article 499f0cf0.8070...@v.loewis.de, Martin v. Löwis mar...@v.loewis.de 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 Greek mu at the beginning (it's pronounced micro-wiki

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 stefan...@behnel.de 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: unicode('\xb5') Traceback (most

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

2009-02-20 Thread Ron Garret
In article 499f3a8f.9010...@v.loewis.de, Martin v. Löwis mar...@v.loewis.de 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 sign despite the

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

2009-02-20 Thread Ron Garret
In article 499f397c.7030...@v.loewis.de, Martin v. Löwis mar...@v.loewis.de 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

metaclass conflict error: where is noconflict ?

2009-02-19 Thread Barak, Ron
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: Regular expression bug?

2009-02-19 Thread Ron Garret
In article mailman.281.1235073821.11746.python-l...@python.org, MRAB goo...@mrabarnett.plus.com 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', 'az

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article gnkdal$bcq$0...@news.t-online.com, 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) ['foo', 'Bar', 'Baz'] That's very clever. Thanks

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article mailman.277.1235073073.11746.python-l...@python.org, andrew cooke and...@acooke.org 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

Re: Regular expression bug?

2009-02-19 Thread Ron Garret
In article mailman.273.1235071607.11746.python-l...@python.org, Albert Hopkins mar...@letterboxes.org 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

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

Threads vs. processes, what to consider in choosing ?

2009-02-17 Thread Barak, Ron
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

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

2009-02-09 Thread Barak, Ron
.__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 Machin [mailto:sjmac

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

2009-02-08 Thread Barak, Ron
no 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 recent call

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

2009-02-08 Thread Barak, Ron
': cStringIO.StringO object at 0x01B3D700, 'last_line_offset': 58181, 'log_stream_array': [LogStream.LogStream instance at 0x01B87350]} (the red item is not needed in the target object). Thanks, Ron. Traceback (most recent call last): File c:\Documents and Settings\rbarak\rbarak_devel\LogManager

Re: WebError documentation?

2009-02-07 Thread Ron Garret
In article mailman.9037.1233981452.3487.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret rnospa...@flownet.com wrote: Is there any? Where is it? Extensive Googling has proven fruitless. It's not a standard Python exception. A third

Re: WebError documentation?

2009-02-07 Thread Ron Garret
In article 498de947$0$24412$426a7...@news.free.fr, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Ron Garret a écrit : In article mailman.9037.1233981452.3487.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: On Thu, Feb 5, 2009 at 12:52 PM, Ron Garret

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

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

Re: Extreme Yaro weirdness

2009-02-02 Thread Ron Garret
In article mailman.8612.1233589195.3487.python-l...@python.org, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Mon, 02 Feb 2009 06:59:16 -0200, Ron Garret rnospa...@flownet.com escribió: I'm running the following WSGI app under Yaro: def error(req): try

Re: Sloooooowwwww WSGI restart

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

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 graham.dumple...@gmail.com wrote: On Jan 30, 11:01 am, Ron Garret rnospa...@flownet.com wrote: In article mailman.8321.1233272610.3487.python-l...@python.org,  Joshua Kugler jos

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Ron Garret
In article 498171a5$0$3681$426a7...@news.free.fr, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Ron Garret a écrit : In article mailman.8228.1233179089.3487.python-l...@python.org, Aleksandar Radulovic a...@a13x.net wrote: (snip) Secondly, why are you

Re: Sloooooowwwww WSGI restart

2009-01-29 Thread Ron Garret
In article 498170d4$0$23718$426a7...@news.free.fr, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid 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

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: More mod_wsgi weirdness: process restarts on redirect

2009-01-29 Thread Ron Garret
In article rnospamon-a73662.15010729012...@news.gha.chartermi.net, Ron Garret rnospa...@flownet.com 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

Re: More mod_wsgi weirdness: process restarts on redirect

2009-01-29 Thread Ron Garret
In article mailman.8321.1233272610.3487.python-l...@python.org, Joshua Kugler jos...@joshuakugler.com 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

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

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

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article mailman.8228.1233179089.3487.python-l...@python.org, Aleksandar Radulovic a...@a13x.net wrote: Hi there, On Wed, Jan 28, 2009 at 9:35 PM, Ron Garret rnospa...@flownet.com wrote: I'm running a WSGI app under apache/mod_wsgi and I've noticed that Off the bat, there's no reason

Re: Sloooooowwwww WSGI restart

2009-01-28 Thread Ron Garret
In article mailman.8227.1233179051.3487.python-l...@python.org, Jean-Paul Calderone exar...@divmod.com wrote: On Wed, 28 Jan 2009 13:35:56 -0800, Ron Garret rnospa...@flownet.com wrote: I'm running a WSGI app under apache/mod_wsgi and I've noticed that whenever I restart the server after

Re: Sloooooowwwww WSGI restart

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

How to print lambda result ?

2009-01-20 Thread Barak, Ron
at 0x00AFE670 2 eventfunction lambda at 0x00AFE670 3 eventfunction lambda 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. -- http

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 [mailto:t

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 solutions

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

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 other

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: 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 de...@nospam.web.de 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 order to prevent denial-of-service attacks

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 petite.abei...@gmail.com 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_response(status, headers)    if int(environ

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 de...@nospam.web.de wrote: Ron Garret schrieb: On Jan 18, 11:29 am, Diez B. Roggisch de...@nospam.web.de wrote: Ron Garret schrieb: I'm writing a WSGI application and I would like to check the content- length header before reading the content

<    1   2   3   4   5   6   7   8   9   10   >