execnet-1.0.0b1: connecting Py2/Py3/Jython interpreters

2009-11-04 Thread holger krekel
Hi everybody! i just uploaded a first public release of execnet, namely 1.0.0b1 to PyPI. Grab it with easy_install/pip on your favourite Python environment (also works by unpacking the tarball with or without plain distutils). execnet allows to ad-hoc instantiate local and remote Python

[ANN] Pyjamas 0.7pre1 Web Widget Set and python-to-javascript Compiler released

2009-11-04 Thread Luke Kenneth Casson Leighton
Current Release: 0.7~pre1 --- This is a 0.7 prerelease of Pyjamas, to invite users to help test the latest version. The latest svn is regularly but informally tested against the regression tests and the examples, and used in production, but not extensively tested against all known

PyCon 2010: Poster sessions

2009-11-04 Thread Aahz
PyCon 2010: Poster sessions === Due date: November 30, 2009 PyCon 2010 introduces a new type of presentation, the poster session. Poster sessions consist of two pieces: * A display space where you can put up information about a topic

using csv dictreader in python

2009-11-04 Thread Siva Subramanian
Hello all, I am now trying to access the csv file using dictreader. import csv r25 = csv.DictReader(open('Report_ 25', 'rb'), delimiter=',') rownum = 1 for row in r25: # Save header row. if rownum == 0: header = row else: colnum = 0 for col in row: This

How to print zero-padded floating point numbers in python 2.6.1

2009-11-04 Thread Lorenzo Di Gregorio
Hello, I thought that I could zero-pad a floating point number in 'print' by inserting a zero after '%', but this does not work. I get: print '%2.2F' % 3.5 3.50 print '%02.2F' % 3.5 3.50 How can I get print (in a simple way) to print 03.50? Best Regards, Lorenzo --

Re: comparing alternatives to py2exe

2009-11-04 Thread Rüdiger Ranft
Maxim Khitrov schrieb: 1. I don't think cx_freeze supports single exe. I haven't even been able to get it to append the generated library.zip file to the executable using documented options. Other things like .pyd files always seem to be separate. At the same time, singe executables

python compare and process a csv file

2009-11-04 Thread Siva Subramanian
Hello all, nbsp; I am new on this list and computer programming nbsp; I have two distinct statistical files (both csv) 1.nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; Report_2_5 – this is a report dump containing over a 10 million records and is different every day 2.nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;

Re: Pyfora, a place for python

2009-11-04 Thread Lorenzo Gatti
On Nov 3, 11:37 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Tue, 03 Nov 2009 02:11:59 -0800, Lorenzo Gatti wrote: [...] Are you saying that now that comp.lang.python and stackoverflow exists, there no more room in the world for any more Python forums? I think that's

Re: Pyfora, a place for python

2009-11-04 Thread Ben Finney
Daniel Fetchinson fetchin...@googlemail.com writes: Probably this thread is going by far too far :) Agreed. -- \德不孤、必有鄰。 (The virtuous are not abandoned, they shall | `\ surely have neighbours.) —孔夫子 Confucius, 551 BCE – 479 BCE | _o__)

Re: self.__dict__ tricks

2009-11-04 Thread Ben Finney
Simon Brunning si...@brunningonline.net writes: 2009/11/1 Steven D'Aprano st...@remove-this-cybersource.com.au: The only stupid question is the one you are afraid to ask. I was once asked, and I quote exactly, are there any fish in the Atlantic sea? That's pretty stupid. ;-) Not at

Re: Pyfora, a place for python

2009-11-04 Thread Steven D'Aprano
On Tue, 03 Nov 2009 02:11:59 -0800, Lorenzo Gatti wrote: On Nov 1, 8:06 am, Saketh saketh.bhamidip...@gmail.com wrote: Hi everyone, I am proud to announce the release of Pyfora (http://pyfora.org), an online community of Python enthusiasts to supplement comp.lang.python and #python. While

Re: How to print zero-padded floating point numbers in python 2.6.1

2009-11-04 Thread Lutz Horn
Lorenzo Di Gregorio schrieb: print '%2.2F' % 3.5 3.50 print '%02.2F' % 3.5 3.50 How can I get print (in a simple way) to print 03.50? print '%05.2F' % 3.5 Lutz -- http://mail.python.org/mailman/listinfo/python-list

Re: Win XP: How to hide command window for sub processes?

2009-11-04 Thread Rüdiger Ranft
klausfpga schrieb: On Oct 29, 11:25 am, Rüdiger Ranft _r...@web.de wrote: Thanks Ruediger, I'll try that immediately tomorrow, when working again on a windows host. Good to know, that the Python API supports this. though this feature was not that easy to be found in the doc. Well,

Re: How to print zero-padded floating point numbers in python 2.6.1

2009-11-04 Thread Chris Rebert
On Wed, Nov 4, 2009 at 12:04 AM, Lorenzo Di Gregorio lorenzo.digrego...@gmail.com wrote: Hello, I thought that I could zero-pad a floating point number in 'print' by inserting a zero after '%', but this does not work. I get: print '%2.2F' % 3.5 3.50 print '%02.2F' % 3.5 3.50 How can I

Re: python compare and process a csv file

2009-11-04 Thread Chris Rebert
On Tue, Nov 3, 2009 at 7:43 AM, Siva Subramanian elpost...@rediffmail.com wrote: Hello all, I am new on this list and computer programming I have two distinct statistical files (both csv) 1.   Report_2_5 – this is a report dump containing over a 10 million records and is different

Re: Tkinter callback arguments

2009-11-04 Thread Gabriel Genellina
En Wed, 04 Nov 2009 04:50:42 -0300, Alf P. Steinbach al...@start.no escribió: * Gabriel Genellina: I don't understand either. R1 and R2 have *different* semantics. Assume that they have the very exact same semantics -- like two TV sets that look the same and work the same except when

Re: Tkinter callback arguments

2009-11-04 Thread Alf P. Steinbach
* Gabriel Genellina: En Wed, 04 Nov 2009 04:50:42 -0300, Alf P. Steinbach al...@start.no escribió: * Gabriel Genellina: I don't understand either. R1 and R2 have *different* semantics. Assume that they have the very exact same semantics -- like two TV sets that look the same and work

Re: python compare and process a csv file

2009-11-04 Thread Peter Otten
Chris Rebert wrote: On Tue, Nov 3, 2009 at 7:43 AM, Siva Subramanian elpost...@rediffmail.com wrote: Hello all, I am new on this list and computer programming I have two distinct statistical files (both csv) 1. Report_2_5 – this is a report dump containing over a 10 million

Re: import bug

2009-11-04 Thread Mark Leander
On Oct 31, 5:12 pm, kj no.em...@please.post wrote: I give up: what's the trick? (Of course, renaming ham/re.py is hardly the trick. It's rather Procrustes' Bed.) I realize that this is probably not the answer you were looking for, but: $ python -m ham.spam or == ./spammain.py == import

restricted mode???

2009-11-04 Thread Robin Becker
A reportlab user running via mod_python+django (Python 2.5.2 and mod_python 3.3.1) reports a strange intermittent error involving failure to read files which are known to be present. After some debugging efforts we got this clearer error message File

Re: using csv dictreader in python

2009-11-04 Thread Johann Spies
On Wed, Nov 04, 2009 at 01:25:16PM +0530, Siva Subramanian wrote: This only gets me the following output {'FieldName1': '4', 'FieldName2': '0.00', 'FieldName3': '4001433', 'FieldName4': '759'} 1. How do i access the 4, 0.00, ... the values ? a= {'FieldName1': '4', 'FieldName2': '0.00',

Re: unable to compile Python 2.6.4 on AIX using gcc

2009-11-04 Thread Mark Dickinson
On Nov 3, 10:40 pm, chuck nospam_chuckwhi...@charter.net wrote: Hello -- I am trying to compile Python 2.6.4 on a Power 5 PC with AIX 5.3.  Here are the settings: export OBJECT_MODE=64 export AR=ar -X64 export MAKE=/usr/bin/gmake export CC=gcc export CFLAGS=-maix64 -O2 -g -mcpu=power5

Re: comparing alternatives to py2exe

2009-11-04 Thread Vesa Köppä
iu2 wrote: Another thing that I think is of interest is whether the application support modifying the version and description of the exe (that is, on Windows, when you right-click on an application and choose 'properties' you view the version number and description of the application, it is a

problem in installing wxwidgets for python..

2009-11-04 Thread Jebagnana Das
Hello friends, I've tried to install wxwidgets in my mandriva 2009 spring for GUI interaction with python. In the installation instruction it said that i need gtk+ library. So i downloaded GTK+. When i configured GTK+ i got the message checking for BASE_DEPENDENCIES...

Re: substituting list comprehensions for map()

2009-11-04 Thread Tim Chase
Steven D'Aprano wrote: On Tue, 03 Nov 2009 22:43:45 -0600, Robert Kern wrote: Or use the appropriate libraries: from numpy import dot scalar = dot(vec1, vec2) Why would I want to use an already existing library that is fast, well- written and well-supported, when I can toss together a

Re: substituting list comprehensions for map()

2009-11-04 Thread Ben Finney
Steven D'Aprano ste...@remove.this.cybersource.com.au writes: On Tue, 03 Nov 2009 22:43:45 -0600, Robert Kern wrote: from numpy import dot scalar = dot(vec1, vec2) Why would I want to use an already existing library that is fast, well- written and well-supported, when I can toss

Re: problem in installing wxwidgets for python..

2009-11-04 Thread Ishwor Gurung
Hi, 2009/11/4 Jebagnana Das jebagnana...@gmail.com: Hello friends,   I've tried to install wxwidgets in my mandriva 2009 spring for GUI interaction with python. In the installation instruction it said that i need gtk+ library. So i downloaded GTK+. When i configured GTK+ i got

Re: Handling large datastore search

2009-11-04 Thread Dave Angel
(This reply was offline, but I forwarded parts so that others with Google App Engine experience might jump in) Ahmed Barakat wrote: snip... but I was trying to make use of everything provided by App engine. snip On Wed, Nov 4, 2009 at 1:27 AM, Dave Angel da...@ieee.org wrote: Ahmed

Re: Pyfora, a place for python

2009-11-04 Thread Daniel Fetchinson
I was referring to this comment by Ben: Suggestion: Please don't make efforts to fragment the community. This IMHO is hostile, because it presupposes that the mere goal of the OP is fragmenting the community It presupposes nothing of any goal. It describes a predictable result of the OP's

Re: Pyfora, a place for python

2009-11-04 Thread Daniel Fetchinson
Hi everyone, I am proud to announce the release of Pyfora (http://pyfora.org), an online community of Python enthusiasts to supplement comp.lang.python and #python. While the site is small right now, please feel free to register and post any questions or tips you may have. I'll feel free

python 3.1.1 and --libdir option broken.

2009-11-04 Thread Todd Lovette
I've been trying to install Python 3.1.1 into /usr/lib64 via the configure script option --libdir, but it is ignored and Python 3.1.1 is installed in /usr/lib. Has anyone ran into this problem and solved it? Looking at the Makefile is seems as thought /lib in hard coded into the file. Any

Re: Pyfora, a place for python

2009-11-04 Thread Dotan Cohen
My personal preference would be a link in each sub-paragraph in the official documentation to a wiki page devoted to that specific aspect of the Python language. A place were users could augment the documentation by providing sample code and by expanding out the documentation for those of us

How to test urllib|urllib2-using code?

2009-11-04 Thread kj
I want to write some tests for code that uses both urllib and urllib2. I would like to be able to run these tests locally. Are there modules to facilitate the writing of such tests (e.g. for setting up a mock web server locally, etc.)? BTW, in the Perl world, one very easy way to learn how

Re: elementtree XML() unicode

2009-11-04 Thread Stefan Behnel
John Machin, 04.11.2009 02:56: On Nov 4, 12:14 pm, Kee Nethery wrote: The reason I am confused is that getResponse2 is classified as an str in the Komodo IDE. I want to make sure I don't lose the non- ASCII characters coming from the URL. str is all about 8-bit bytes. True in Py2.x,

Re: How do I install libxml2 and libxslt?

2009-11-04 Thread Stefan Behnel
Kevin Ar18, 02.11.2009 21:44: According to the lxml installation instructions you linked=2C the windows lxml binary is statically linked and you do not need to install the libraries separately. The install instructions say You need libxml2 and libxslt and then links= to where to download

Re: Cast into custom type

2009-11-04 Thread Henning Bredel
Gabriel, thanks for your reply. See my comments below. On Tue, 03 Nov 2009 21:31:27 -0300, Gabriel Genellina wrote: En Tue, 03 Nov 2009 09:07:01 -0300, Henning Bredel henning.bre...@gmx.de escribió: On Tue, 03 Nov 2009 10:18:29 +, Steven D'Aprano wrote: Then forget about the code you

Re: how to remove the same words in the paragraph

2009-11-04 Thread S.Selvam
On Wed, Nov 4, 2009 at 4:27 AM, Tim Chase python.l...@tim.thechases.comwrote: kylin wrote: I need to remove the word if it appears in the paragraph twice. could some give me some clue or some useful function in the python. Sounds like homework. To fail your class, use this one: p = one

Re: unittest setup

2009-11-04 Thread Joe Riopel
On Tue, Nov 3, 2009 at 11:02 PM, Jonathan Haddad j...@jonhaddad.com wrote: I've got a class, in the constructor it loads a CSV file from disc.  I'd like only 1 instance of the class to be instantiated.  However, when running multiple unit tests, multiple instances of the class are created. 

Re: How to test urllib|urllib2-using code?

2009-11-04 Thread Lutz Horn
Hi, kj wrote: I want to write some tests for code that uses both urllib and urllib2. Take a look at the discussion under the title How can one mock/stub python module like urllib at stackoverflow: http://stackoverflow.com/questions/295438/how-can-one-mock-stub-python-module-like-urllib Lutz

Request for comments - concurrent ssh client

2009-11-04 Thread mk
Hello everyone, Since I'm not happy with shmux or pssh, I wrote my own concurrent ssh program for parallel execution of SSH commands on multiple hosts. Before I release program to the wild, I would like to hear (constructive) comments on what may be wrong with the program and/or how to fix

Re: substituting list comprehensions for map()

2009-11-04 Thread J Kenneth King
Steven D'Aprano ste...@remove.this.cybersource.com.au writes: On Tue, 03 Nov 2009 10:22:28 -0500, J Kenneth King wrote: However in this case the procedure by which we derive the value is not important or even interesting. It is much more succinct to think of the operation as a value and

Re: Pyfora, a place for python

2009-11-04 Thread Ethan Furman
Daniel Fetchinson wrote: I was referring to this comment by Ben: Suggestion: Please don't make efforts to fragment the community. This IMHO is hostile, because it presupposes that the mere goal of the OP is fragmenting the community It presupposes nothing of any goal. It describes a

Calling a method with a variable name

2009-11-04 Thread Simon Mullis
Hi All, I'm collating a bunch of my utility scripts into one, creating a single script to which I will symbolic link multiple times. This way I only have to write code for error checking, output-formatting etc a single time. So, I have ~/bin/foo -

Re: Calling a method with a variable name

2009-11-04 Thread Diez B. Roggisch
Simon Mullis wrote: Hi All, I'm collating a bunch of my utility scripts into one, creating a single script to which I will symbolic link multiple times. This way I only have to write code for error checking, output-formatting etc a single time. So, I have ~/bin/foo -

Re: C api and exception handling

2009-11-04 Thread lallous
Thanks for your help Carl as usual. Will go with the getattr override method which is cleaner as you explained. Regards, Elias Carl Banks pavlovevide...@gmail.com wrote in message news:f02c069c-e536-4c6b-b114-2215aa611...@k17g2000yqh.googlegroups.com... On Nov 2, 7:16 am, lallous

Re: Calling a method with a variable name

2009-11-04 Thread Carsten Haese
Simon Mullis wrote: def main(): stats_obj = Statistic() name = re.sub([^A-Za-z], , sys.argv[0]) method = getattr(stats_obj, name, None) if callable(method): stats_obj.name() # HERE else: print nope, not sure what you're

Re: how to remove the same words in the paragraph

2009-11-04 Thread Tim Chase
Can we use inp_paragraph.count(iter_word) to make it simple ? It would work, but the performance will drop off sharply as the length of the paragraph grows, and you'd still have to keep track of which words you already printed so you can correctly print the first one. So you might as well

Re: Calling a method with a variable name

2009-11-04 Thread Simon Mullis
May I be the first to say Doh! Problem solved, many thanks to both Carsten and Diez! SM 2009/11/4 Carsten Haese carsten.ha...@gmail.com: Simon Mullis wrote: def main():     stats_obj = Statistic()     name = re.sub([^A-Za-z], , sys.argv[0])     method = getattr(stats_obj, name, None)    

Re: self.__dict__ tricks

2009-11-04 Thread Ethan Furman
Dennis Lee Bieber wrote: Perfectly valid answer -- there are no fish as there is no Atlantic sea G Steven D'Aprano wrote: Once in the distant past, there were no fish in what would become the Atlantic Ocean (not sea) What's with the bias against the word 'sea'? sea –noun 1. the salt

Re: About one class/function per module

2009-11-04 Thread Bruno Desthuilliers
Ben Finney a écrit : Diez B. Roggisch de...@nospam.web.de writes: Don't get me wrong - innovation often comes from scratching ones personal itch. But you seem to be suffering from a rather bad case of neurodermatitis. +1 QOTW Make it +2 QOTW !-) --

Re: About one class/function per module

2009-11-04 Thread Bruno Desthuilliers
Peng Yu a écrit : On Mon, Nov 2, 2009 at 3:03 AM, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Peng Yu a écrit : (snip) I prefer organized my code one class/function per file (i.e per module in python). I know the majority of programmers don't use this approach.

regexp help

2009-11-04 Thread Nadav Chernin
Hello all, I'm trying to write regexp that find all files that are not with next extensions: exe|dll|ocx|py, but can't find any command that make it. Please, help me Nadav -- http://mail.python.org/mailman/listinfo/python-list

Re: Calendar Problem

2009-11-04 Thread Carsten Haese
Victor Subervi wrote: That's what I initially had. My server, that I am in the process of leaving, rejected that syntax. What version of Python does that server use? The calendar.Calendar class first appeared in Python 2.5. I suspect your server is using an older version. -- Carsten Haese

Re: regexp help

2009-11-04 Thread Simon Brunning
2009/11/4 Nadav Chernin nada...@qualisystems.com: I’m trying to write regexp that find all files that are not with next extensions:  exe|dll|ocx|py,  but can’t find any command that make it. http://code.activestate.com/recipes/499305/ should be a good start. Use the re module and your regex

Re: Pyfora, a place for python

2009-11-04 Thread Valentina Boycheva
Daniel Fetchinson fetchin...@googlemail.com writes: Probably this thread is going by far too far :) Ben Finney [ben+pyt...@benfinney.id.au] writes: Agreed. I was following this discussion first with curiosity and then with increasing disbelief. As a scientist and a programmer, I always

Re: Web development with Python 3.1

2009-11-04 Thread rustom
On Oct 30, 6:23 pm, Dotan Cohen dotanco...@gmail.com wrote: The point is that I want to use only _Python_ features, not Django/Mako/whatever features. Pure python has a builtin templating system -- its called % See http://simonwillison.net/2003/Jul/28/simpleTemplates/ --

RE: regexp help

2009-11-04 Thread Nadav Chernin
Thanks, but my question is how to write the regex. -Original Message- From: simon.brunn...@gmail.com [mailto:simon.brunn...@gmail.com] On Behalf Of Simon Brunning Sent: ד 04 נובמבר 2009 18:44 To: Nadav Chernin; Python List Subject: Re: regexp help 2009/11/4 Nadav Chernin

Re: regexp help

2009-11-04 Thread Simon Brunning
2009/11/4 Nadav Chernin nada...@qualisystems.com: Thanks, but my question is how to write the regex. re.match(r'.*\.(exe|dll|ocx|py)$', the_file_name) works for me. -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: regexp help

2009-11-04 Thread Carsten Haese
Nadav Chernin wrote: Thanks, but my question is how to write the regex. See http://www.amk.ca/python/howto/regex/ . -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

RE: regexp help

2009-11-04 Thread Nadav Chernin
No, I need all files except exe|dll|ocx|py -Original Message- From: simon.brunn...@gmail.com [mailto:simon.brunn...@gmail.com] On Behalf Of Simon Brunning Sent: ד 04 נובמבר 2009 19:13 To: Nadav Chernin Cc: Python List Subject: Re: regexp help 2009/11/4 Nadav Chernin

Re: regexp help

2009-11-04 Thread Simon Brunning
2009/11/4 Nadav Chernin nada...@qualisystems.com: No, I need all files except exe|dll|ocx|py not re.match(r'.*\.(exe|dll|ocx|py)$', the_file_name) Now that wasn't so hard, was it? ;-) -- Cheers, Simon B. -- http://mail.python.org/mailman/listinfo/python-list

Re: unable to compile Python 2.6.4 on AIX using gcc

2009-11-04 Thread chuck
Thanks Mark. That was indeed very helpful. Here's the current status: === 1. applied changes suggested by Bob Atkins in that thread. 2. setting env variables. export OBJECT_MODE=64 export CC=gcc export CFLAGS=-maix64 -mcpu=power5 export LDFLAGS=-maix64 -L/usr/lib64

Re: Request for comments - concurrent ssh client

2009-11-04 Thread MRAB
mk wrote: Hello everyone, Since I'm not happy with shmux or pssh, I wrote my own concurrent ssh program for parallel execution of SSH commands on multiple hosts. Before I release program to the wild, I would like to hear (constructive) comments on what may be wrong with the program and/or

[ANN] Pyjamas 0.7pre1 Web Widget Set and python-to-javascript Compiler released

2009-11-04 Thread Luke Kenneth Casson Leighton
Current Release: 0.7~pre1 --- This is a 0.7 prerelease of Pyjamas, to invite users to help test the latest version. The latest svn is regularly but informally tested against the regression tests and the examples, and used in production, but not extensively tested against all known

a is b

2009-11-04 Thread Sebastian
I have a question from the pyar list that may have been discussed on this list, but i didn't catch it. Have some common objects been somewhat hardcoded into python, like some integers as shown in the examples below? What other object have been hardcoded (strings ,etc) and what was the criteria

Re: a is b

2009-11-04 Thread Chris Rebert
On Wed, Nov 4, 2009 at 10:37 AM, Sebastian seb...@gmail.com wrote: I have a question from the pyar  list that may have been discussed on this list, but i didn't catch it. Have some common objects been somewhat hardcoded into python, like some integers as shown in the examples below? What other

Re: Tkinter callback arguments

2009-11-04 Thread Terry Reedy
Alf P. Steinbach wrote: However, the natural semantics is that various logical properties, such as left, top, right, bottom, width and height, can be varied independently. But they *CANNOT* be varied independently. A rectangle with side parallel to the axes has exactly 4 degress of freedom,

Re: import from a string

2009-11-04 Thread Terry Reedy
Gabriel Genellina wrote: En Wed, 04 Nov 2009 02:45:23 -0300, iu2 isra...@elbit.co.il escribió: On Nov 4, 3:10 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: txt = def foo(x): print 'x=', x def bar(x): return x + x py namespace = {} py exec txt in namespace py namespace.keys()

Re: How do I install dlls and exes for libtidy and others?

2009-11-04 Thread Kevin Ar18
Lme clarify my problems. My earlier emails were pretty vague... so this should help. Problem: I have been wanting to try out many libraries that use Python to C/C++ app bindings. This means I install the Python library using easy_install and then install the pre-compiled Windows binaries

Re: Pyfora, a place for python

2009-11-04 Thread Terry Reedy
Valentina Boycheva wrote: I was following this discussion first with curiosity and then with increasing disbelief. So stop following it. Really. As a scientist and a programmer, I always considered myself belonging to a group of people who are broad-minded and task-oriented. Ditto. I

Re: comparing alternatives to py2exe

2009-11-04 Thread Jorge
Hi, in this discussion I read that we con create a bundle executable for our application, since I'm having troubles with create a exe due problems with kinterbasdb, can you show me tutorials for creating exe from bundle. thanks in advance. On Wed, Nov 4, 2009 at 11:21 AM, Vesa Köppä

Using logging module for conditional nested logs

2009-11-04 Thread Reckoner
Hi, I am getting started with your logging module and I went through the tutorial and know-how to create a top-level 'root' logger with the appropriate handlers. I have a number of functions,say, def foo1() def foo2() ... foo1() # foo2 calls foo1 and I know how to connect each of these

Re: regexp help

2009-11-04 Thread Dave Angel
Simon Brunning wrote: 2009/11/4 Nadav Chernin nada...@qualisystems.com: Thanks, but my question is how to write the regex. re.match(r'.*\.(exe|dll|ocx|py)$', the_file_name) works for me. How about: os.path.splitext(x)[1] in (.exe, .dll, .ocx, .py): DaveA --

Re: Tkinter callback arguments

2009-11-04 Thread Alf P. Steinbach
* Terry Reedy: Alf P. Steinbach wrote: However, the natural semantics is that various logical properties, such as left, top, right, bottom, width and height, can be varied independently. But they *CANNOT* be varied independently. A rectangle with side parallel to the axes has exactly 4

Re: Using logging module for conditional nested logs

2009-11-04 Thread Vinay Sajip
On Nov 4, 7:40 pm, Reckoner recko...@gmail.com wrote: I hope that made some sense. Not especially :-( Sorry I don't understand exactly what you mean, because I find your terminology confusing. For example, logger that is attached to foo2 - loggers are not attached to functions. It responds to

Re: python os.path.exists failure

2009-11-04 Thread Aahz
In article 9aaf6a31-a34e-454b-a8f0-e206ad9b7...@t2g2000yqn.googlegroups.com, koranthala koranth...@gmail.com wrote: path = r'C:/Program Files/testfolder/2.3/test.txt' if os.path.lexists(path): print 'Path Exists' else: print 'No file found in path - %s' %path print Popen(path,

Re: disable image loading to speed up webpage load

2009-11-04 Thread Irmen de Jong
On 4-11-2009 8:32, elca wrote: Diez B. Roggisch-2 wrote: Use urllib2. you can show me some more specific sample or demo? It's not even more than 1 click away in the Python standard lib documentation... how hard can it be? http://docs.python.org/library/urllib2.html#examples -irmen --

Re: problem in installing wxwidgets for python.

2009-11-04 Thread Threader Slash
This additional links should come in hand: http://www.gossamer-threads.com/lists/python/python/785413?page=last http://www.daniweb.com/forums/thread235862.html# http://forum.amule.org/index.php?topic=11728.0

Re: Pyfora, a place for python

2009-11-04 Thread Alan Franzoni
On 11/2/09 3:44 PM, Diez B. Roggisch wrote: Being from germany, I can say that we *have* this fragmentation, and frankly: I don't like it. I prefer my communication via NNTP/ML, and not with those visually rather noisy and IMHO suboptimal forums. E.g. it That's right... forums, although more

Re: restricted mode???

2009-11-04 Thread Martin v. Löwis
I thought that restricted mode died ages ago. Any ideas what could be causing this? Restricted mode is still available, and activated whenever a frame's builtins directory is different from the interpreter's; see PyFrame_IsRestricted. Regards, Martin --

Re: Using logging module for conditional nested logs

2009-11-04 Thread Reckoner
On Nov 4, 1:30 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Nov 4, 7:40 pm, Reckoner recko...@gmail.com wrote: I hope that made some sense. Not especially :-( Sorry I don't understand exactly what you mean, because I find your terminology confusing. For example, logger that is

Python 3 [was Re: substituting list comprehensions for map()]

2009-11-04 Thread Steven D'Aprano
On Wed, 04 Nov 2009 23:08:54 +1100, Ben Finney wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: On Tue, 03 Nov 2009 22:43:45 -0600, Robert Kern wrote: from numpy import dot scalar = dot(vec1, vec2) Why would I want to use an already existing library that is fast,

Re: How to test urllib|urllib2-using code?

2009-11-04 Thread Steven D'Aprano
On Wed, 04 Nov 2009 15:06:45 +0100, Lutz Horn wrote: Hi, kj wrote: I want to write some tests for code that uses both urllib and urllib2. Take a look at the discussion under the title How can one mock/stub python module like urllib at stackoverflow:

module imports and st_mtime

2009-11-04 Thread tow
I'm seeing a very strange effect which is confusing me - in brief, one python process appears to temporarily affect the os.stat results of another - perhaps someone can enlighten me. This is on Mac OS X Leopard, using the system python (2.5) The issue arises using Django. The default Django http

Re: Tkinter callback arguments

2009-11-04 Thread Steven D'Aprano
On Wed, 04 Nov 2009 08:50:42 +0100, Alf P. Steinbach wrote: * Gabriel Genellina: I don't understand either. R1 and R2 have *different* semantics. Assume that they have the very exact same semantics Why would we assume that when you have explicitly told us that they don't? You stated

Re: module imports and st_mtime

2009-11-04 Thread Carl Banks
On Nov 4, 4:08 pm, tow toby.o.h.wh...@googlemail.com wrote: Does anyone have any ideas what might be going on, or where further to look? I'm at a bit of a loss. Does Mac OS have a concept of process-local filesystem modification? I.e. when loading the library does it create a process-local copy

Re: set pdb break condition based upon number of hits?

2009-11-04 Thread Diez B. Roggisch
Reckoner schrieb: Is it possible to set pdb break condition based upon number of hits? I mean something like (Pdb) break line_number (number_of_hits_for_this_breakpoint 10) any help appreciated. MY_GLOBAL_COUNTER = 0 MY_GLOBAL_COUNTER += 1 if MY_GLOBAL_COUNTER = 10: import pdb;

Re: Tkinter callback arguments

2009-11-04 Thread Alf P. Steinbach
* Steven D'Aprano: On Wed, 04 Nov 2009 08:50:42 +0100, Alf P. Steinbach wrote: * Gabriel Genellina: I don't understand either. R1 and R2 have *different* semantics. Assume that they have the very exact same semantics Why would we assume that when you have explicitly told us that they

Re: multicast

2009-11-04 Thread Seb
Forgot the code... doh! :) #! /usr/bin/env python import socket import time class MulticastSender(object): def __init__(self, MCAST_ADDR = 224.168.2.9, MCAST_PORT = 1600): self.MCAST_ADDR = MCAST_ADDR self.MCAST_PORT = MCAST_PORT ANY =

Re: Pyfora, a place for python

2009-11-04 Thread Ned Deily
In article zenim.90683$9f6.106...@twister1.libero.it, Alan Franzoni doesnotex...@franzoni.invalid wrote: On 11/2/09 3:44 PM, Diez B. Roggisch wrote: Being from germany, I can say that we *have* this fragmentation, and frankly: I don't like it. I prefer my communication via NNTP/ML, and not

Re: Pyfora, a place for python

2009-11-04 Thread Ben Finney
Alan Franzoni doesnotex...@franzoni.invalid writes: That's right... forums, although more accessible to all the people who can't/doesn't want to use specific email or nntp clients, are quite slow to use. But I think Ubuntu forums support threads and are kind of channeled between ML and

Re: Python 3

2009-11-04 Thread Ben Finney
Steven D'Aprano ste...@remove.this.cybersource.com.au writes: On Wed, 04 Nov 2009 23:08:54 +1100, Ben Finney wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: Why would I want to use an already existing library that is fast, well- written and well-supported, when I can

Re: Tkinter callback arguments

2009-11-04 Thread Alf P. Steinbach
* Alf P. Steinbach: * Steven D'Aprano: On Wed, 04 Nov 2009 08:50:42 +0100, Alf P. Steinbach wrote: * Gabriel Genellina: I don't understand either. R1 and R2 have *different* semantics. Assume that they have the very exact same semantics Why would we assume that when you have explicitly

Re: Python 3

2009-11-04 Thread Steven D'Aprano
On Thu, 05 Nov 2009 13:27:09 +1100, Ben Finney wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: On Wed, 04 Nov 2009 23:08:54 +1100, Ben Finney wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: Why would I want to use an already existing library that

Re: Pyfora, a place for python

2009-11-04 Thread alex23
Daniel Fetchinson fetchin...@googlemail.com wrote: Yes, this is about the right kind of response I think everybody deserves who puts energy/enthusiasm/effort/time into putting together a python-related forum. So what's the right kind of response deserved by those who put energy/

Re: Python 3

2009-11-04 Thread Alf P. Steinbach
* Steven D'Aprano: On Thu, 05 Nov 2009 13:27:09 +1100, Ben Finney wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: On Wed, 04 Nov 2009 23:08:54 +1100, Ben Finney wrote: Steven D'Aprano ste...@remove.this.cybersource.com.au writes: Why would I want to use an already

[issue4652] IDLE does not work with Unicode

2009-11-04 Thread Jean-Christophe Helary
Jean-Christophe Helary jean.christophe.hel...@gmail.com added the comment: I've installed Python 3.1.1 on OSX today. 1) When I use the Japanese input from OSX, IDLE interprets any character I attempt to type as a space. 2) When I paste a Japanese string from a different place, it is correctly

[issue7257] Improve documentation of list.sort and sorted()

2009-11-04 Thread Ole Laursen
Ole Laursen o...@iola.dk added the comment: OK, thanks! :) Sorry about the unintended nosy list removal, my browser got me there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7257 ___

[issue7261] Document 2.x - 3.x round changes in Whats New documents.

2009-11-04 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: The round builtin function changed in three fairly significant ways between 2.x and 3.x: (1) In 2.x, halfway cases are rounded using the round-half-away-from-zero rule, while in 3.x they're rounded using round-half-to-even. (2) The

[issue7261] Document 2.x - 3.x round changes in What's New documents.

2009-11-04 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- title: Document 2.x - 3.x round changes in Whats New documents. - Document 2.x - 3.x round changes in What's New documents. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7261

  1   2   >