October 16 Scientific Computing with Python Webinar: Traits

2009-10-10 Thread Amenity Applewhite
Having trouble viewing this email? Click here Friday, October 16: Traits SCIENTIFIC COMPUTING WITH PYTHON WEBINAR Hello! It's already time for our October Scientific Computing with Python webinar! This month we'll be handling Traits, one of our most popular training topics. Traits:

rst2pdf version 0.12 released!

2009-10-10 Thread Roberto Alsina
It's my pleasure to announce the release of rst2pdf version 0.12, available at http://code.google.com/p/rst2pdf/downloads/list Rst2pdf is a tool to generate PDF files directly from restructured text sources via reportlab. Rst2pdf aims to support the full restructured text feature set, and is

Re: A new Internet-search website written in Python

2009-10-10 Thread John Nagle
hrg...@gmail.com wrote: The purpose of this email is to inform the Python-list mailing-list subscribers of an Internet-search website that is run by software written in Python. All the site seems to do is frame the results from other search engines. What does the Python code do?

Re: rfc: a self-editing script

2009-10-10 Thread Steven D'Aprano
On Fri, 09 Oct 2009 23:30:16 +, gb345 wrote: The following fragment is from a tiny maintenance script that, among other things, edits itself, by rewriting the line that ends with '### REPLACE'. ## import re import

Re: Python 2.5 execfile() works only once, why ?

2009-10-10 Thread Steven D'Aprano
On Fri, 09 Oct 2009 20:15:48 +0200, Stef Mientki wrote: [...] The above code (with or without the stdout redirection), works perfect, ... the first time ... but does (almost?) nothing (doesn't crash, try / except around execfile), although the source file self.Edit.Filename has changed.

Re: Tree Structure

2009-10-10 Thread Shakeeb Alireza
Is there any python class to display the drive and folder structure as a tree(As you see in the windows explorer window)?? http://wiki.wxpython.org/TreeControls S -- http://mail.python.org/mailman/listinfo/python-list

Re: organizing your scripts, with plenty of re-use

2009-10-10 Thread Steven D'Aprano
On Fri, 09 Oct 2009 16:37:28 -0700, Buck wrote: Here's a scenario. A user does a cvs checkout into some arbitrary directory and sees this: project/ +-- python/ +-- animals.py +-- mammals/ +-- horse.py +-- otter.py +-- reptiles/ +-- gator.py

Re: can i use the browser to show the result of python

2009-10-10 Thread Hacken
On Oct 5, 5:16 pm, catafest catalinf...@gmail.com wrote: On Sep 25, 12:41 pm, Hacken taoke...@gmail.com wrote: I have write some python script i want to use browser(IE or FF) to call it, an show the returns! how to? Python script running under web browsers only like:  python + website

Re: Persistent Distributed Objects

2009-10-10 Thread OdarR
On 10 oct, 05:39, bouncy...@gmail.com bouncy...@gmail.com wrote: Sorry about being interpreted as being vague. `et me try to narrow it down. program a creates objects b c d which each need to use 1 disk space 2 ram 3 processor time. I would like to create a heckpoint which would save the work

Re: datetime.datetime. or datetime. ?

2009-10-10 Thread niklasr
On Oct 8, 7:34 pm, Diez B. Roggisch de...@nospam.web.de wrote: niklasr schrieb: On Oct 8, 5:25 pm, Diez B. Roggisch de...@nospam.web.de wrote: NiklasRTZ schrieb: Hello, my basic question is which recommendation is after slight restructuring datetime.datetime to datetime Both works

Re: datetime.datetime. or datetime. ?

2009-10-10 Thread niklasr
On Oct 8, 10:17 pm, Carl Banks pavlovevide...@gmail.com wrote: On Oct 8, 3:11 pm, niklasr nikla...@gmail.com wrote: On Oct 8, 5:25 pm, Diez B. Roggisch de...@nospam.web.de wrote: NiklasRTZ schrieb: Hello, my basic question is which recommendation is after slight restructuring

Re: Persistent Distributed Objects

2009-10-10 Thread OdarR
On 10 oct, 05:39, bouncy...@gmail.com bouncy...@gmail.com wrote: Sorry about being interpreted as being vague. `et me try to narrow it down. program a creates objects b c d which each need to use 1 disk space 2 ram 3 processor time. I would like to create a heckpoint which would save the work

Re: datetime.datetime. or datetime. ?

2009-10-10 Thread niklasr
On Oct 8, 8:33 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 08 Oct 2009 19:11:04 -0300, niklasr nikla...@gmail.com escribió: On Oct 8, 5:25 pm, Diez B. Roggisch de...@nospam.web.de wrote: NiklasRTZ schrieb: Hello, my basic question is which recommendation is after slight

Re: Persistent Distributed Objects

2009-10-10 Thread Laszlo Nagy
Sorry about being interpreted as being vague. You wasn't vague. I'm sorry! `et me try to narrow it down. program a creates objects b c d which each need to use 1 disk space 2 ram 3 processor time. I would like to create a checkpoint which would save the work of the object to be later used

Re: rfc: a self-editing script

2009-10-10 Thread garabik-news-2005-05
Steven D'Aprano st...@remove-this-cybersource.com.au wrote: ... But if you absolutely have to write to the program file, then append your data to the end of the file (as a comment) and later read that, rather than modifying the actual code in place. That is, you fetch the LAST_VERSION by

ANN: yappi 0.1 beta : Yet Another Python Profiler

2009-10-10 Thread k3xji
Hi all, After implementing a game server on which 100k people playing games per-day, it turns out to be that continuous and efficient profiling is key to improve an long-running applications like these. With this idea in mind, I am motivated to write a profiler. I am not a Python expert or even

New hire

2009-10-10 Thread Emeka
Hello All, I am new to python , and my aim is to use it to write sugar-based applications on XO(OLPC). I am not new to programming in general, I would want to know the best route to take in learning python. I have background in FP and Imperative languages. Regards, Emeka --

Re: Enormous Input and Output Test

2009-10-10 Thread Irmen de Jong
John Yeung wrote: P.S. I hope people realize that the concise, intuitive, readable answers we all tried in our first couple of (failed) attempts are much more Pythonic than the beasts that were created just for SPOJ. Well, it is not often that we need to micro optimize stuff (or how would you

Re: No threading.start_new_thread(), useful addition?

2009-10-10 Thread Laszlo Nagy
Christian Heimes wote: Laszlo Nagy wrote: IMHO it is much cleaner to implement this as a decorator. Pro: transparent passing of positional and keyword arguments, keeps function documentation. You are entitled to your opinion but I STRONGLY recommend against your decorator. You MUST

Re: How to find number of line that is currently executing?

2009-10-10 Thread koranthala
On Oct 10, 8:54 am, Chris Rebert c...@rebertia.com wrote: On Fri, Oct 9, 2009 at 8:46 PM, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: I would like to put a statement on line N of my program that prints the line number that is currently executing. This may sound fairly trivial, but I

Re: easy install

2009-10-10 Thread Ethan Furman
Ethan Furman wrote: A puzzlement: I used easy_install the other day to get xlutils on my system. It automatically installed xlrd and xlwt as well. This is cool. What's not so cool are my tracebacks. E.g. Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on

Syntax question

2009-10-10 Thread Helmut Jarausch
Hi, I'm trying to build the recent Python-3.2a (SVN). It fails in Lib/tokenize.py (line 87) 85 def group(*choices): return '(' + '|'.join(choices) + ')' 86 def any(*choices): return group(*choices) + '*' 87 def maybe(*choices): return group(*choices) + '?' with: TypeError: group()

Re: Looking for Python Developers in Jakarta, Indonesia

2009-10-10 Thread marmo
On Sep 23, 3:11 pm, kugutsumen kugutsu...@gmail.com wrote: Responsibilities: You will be part of a team responsible for implementing and supporting a Google App Engine based application. Requirements: Professional: University bachelor's degree in computer science or related discipline

Re: Zip Question

2009-10-10 Thread Victor Subervi
Ah! Thanks :) V On Fri, Oct 9, 2009 at 1:10 PM, Stephen Hansen apt.shan...@gmail.comwrote: On Fri, Oct 9, 2009 at 11:04 AM, Victor Subervi victorsube...@gmail.comwrote: So, because the results in sstp were duplicates ( ['prescriptions', 'prescriptions'] ) it only returned one result in

Re: Nested Menus

2009-10-10 Thread Victor Subervi
in line responses... On Thu, Oct 8, 2009 at 5:58 PM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote: On Thu, 8 Oct 2009 10:38:02 -0500, Victor Subervi victorsube...@gmail.com declaimed the following in gmane.comp.python.general: First suggestion... Get rid of the confusing dat[0] and

Re: Syntax question

2009-10-10 Thread Benjamin Peterson
Helmut Jarausch jarausch at skynet.be writes: Hi, I'm trying to build the recent Python-3.2a (SVN). It fails in Lib/tokenize.py (line 87) How are you invoking it? -- http://mail.python.org/mailman/listinfo/python-list

Re: Syntax question

2009-10-10 Thread Helmut Jarausch
Benjamin Peterson wrote: Helmut Jarausch jarausch at skynet.be writes: Hi, I'm trying to build the recent Python-3.2a (SVN). It fails in Lib/tokenize.py (line 87) How are you invoking it? As I said, it's 'make' in Python's source directory (SVN revision 75309 Last Changed Date:

Re: Syntax question

2009-10-10 Thread Benjamin Peterson
Helmut Jarausch jarausch at skynet.be writes: As I said, it's 'make' in Python's source directory (SVN revision 75309 Last Changed Date: 2009-10-10) I can't reproduce your failure. What are the exact commands you are using? -- http://mail.python.org/mailman/listinfo/python-list

Re: Persistent Distributed Objects

2009-10-10 Thread Simon Forman
On Fri, Oct 9, 2009 at 1:11 AM, John Haggerty bouncy...@gmail.com wrote: I am interested in seeing how it would be possible in python to have persistent objects (basically be able to save objects midway through a computation, etc) and do so across multiple computers. Something that would

Re: Syntax question

2009-10-10 Thread Helmut Jarausch
Benjamin Peterson wrote: Helmut Jarausch jarausch at skynet.be writes: As I said, it's 'make' in Python's source directory (SVN revision 75309 Last Changed Date: 2009-10-10) I can't reproduce your failure. What are the exact commands you are using? CFLAGS='-O3 -mtune=native -msse2 -pipe'

Re: organizing your scripts, with plenty of re-use

2009-10-10 Thread Gabriel Genellina
En Sat, 10 Oct 2009 05:57:08 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au escribió: On Fri, 09 Oct 2009 16:37:28 -0700, Buck wrote: Here's a scenario. A user does a cvs checkout into some arbitrary directory and sees this: project/ +-- python/ +-- animals.py +--

Re: organizing your scripts, with plenty of re-use

2009-10-10 Thread Gabriel Genellina
En Sat, 10 Oct 2009 05:57:08 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au escribió: On Fri, 09 Oct 2009 16:37:28 -0700, Buck wrote: Here's a scenario. A user does a cvs checkout into some arbitrary directory and sees this: project/ +-- python/ +-- animals.py +--

[OT] vim clientserver [was: best vi / emacs python features]

2009-10-10 Thread Chris Jones
On Thu, Oct 08, 2009 at 12:59:00AM EDT, TerryP wrote: On Oct 8, 3:29 am, Chris Jones cjns1...@gmail.com wrote: [..] It's most valuable for sending data to an existing instance of vim, by name. Both files and keystrokes can be sent fwiw. [..] On top of that, I sometimes group instances of

Best way to handle changing list of class imports

2009-10-10 Thread Scott Grant
Hi there, I'd like to set up a framework in which I can add or remove new classes of a given expected subclass to my package, and have the system load that set at runtime and be able to use them. In essence, if I have a class X, and subclasses A, B, and C that derive from X, what's the most

Re: Best way to handle changing list of class imports

2009-10-10 Thread Diez B. Roggisch
Scott Grant schrieb: Hi there, I'd like to set up a framework in which I can add or remove new classes of a given expected subclass to my package, and have the system load that set at runtime and be able to use them. In essence, if I have a class X, and subclasses A, B, and C that derive from

Re: Best way to handle changing list of class imports

2009-10-10 Thread Scott Grant
On Oct 10, 2:42 pm, Diez B. Roggisch de...@nospam.web.de wrote: Scott Grant schrieb: Hi there, I'd like to set up a framework in which I can add or remove new classes of a given expected subclass to my package, and have the system load that set at runtime and be able to use them.  In

Re: rfc: a self-editing script

2009-10-10 Thread gb345
In 0059c2b1$0$26930$c3e8...@news.astraweb.com Steven D'Aprano st...@remove-this-cybersource.com.au writes: But if you absolutely have to write to the program file... No, don't have to, beyond the urge to satisfy a very idiosyncratic aesthetic imperative... then append your data to the end of

The rap against while True: loops

2009-10-10 Thread kj
I'm coaching a group of biologists on basic Python scripting. One of my charges mentioned that he had come across the advice never to use loops beginning with while True. Of course, that's one way to start an infinite loop, but this seems hardly a sufficient reason to avoid the construct

Re: The rap against while True: loops

2009-10-10 Thread Stephen Hansen
I use while True-loops often, and intend to continue doing this while True, but I'm curious to know: how widespread is the injunction against such loops? The injunction is nonexistent (save perhaps in people coming from another language who insist that Python just /must/ have a proper

Re: The rap against while True: loops

2009-10-10 Thread Boris Arloff
I agree there is no rap against while True-loops.  As an example these are very useful especially when receiving continuous data over a queue, pipe socket, or over any other connection.  You set to block, receive data, then process data and finally loop around to wait for next data segment.  Of

Re: The rap against while True: loops

2009-10-10 Thread Mensanator
On Oct 10, 3:15�pm, kj no.em...@please.post wrote: I'm coaching a group of biologists on basic Python scripting. �One of my charges mentioned that he had come across the advice never to use loops beginning with while True. �Of course, that's one way to start an infinite loop, but this seems

No module named os

2009-10-10 Thread smitty
'import site' failed; use -v for traceback Traceback (most recent call last): File ./setup.py, line 3, in module import sys, os, glob ImportError: No module named os I'm trying to build a small program and I get the above error. I have had this error popup in the past while trying to build

Re: The rap against while True: loops

2009-10-10 Thread kj
In 01ccc46d-5ea9-4dfe-ba22-699c6b859...@v36g2000yqv.googlegroups.com Mensanator mensana...@aol.com writes: On Oct 10, 3:15=EF=BF=BDpm, kj no.em...@please.post wrote: I'm coaching a group of biologists on basic Python scripting. =EF=BF=BDOn= e of my charges mentioned that he had come across the

Re: How to find number of line that is currently executing?

2009-10-10 Thread ryles
On Oct 9, 11:46 pm, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: I would like to put a statement on line N of my program that prints the line number that is currently executing. inspect.currentframe().f_lineno http://docs.python.org/library/inspect.html --

Re: The rap against while True: loops

2009-10-10 Thread Björn Lindqvist
I have many times screwed up while True-loops. When I thought I had a safe exit condition which turned out to be never reached in some rare corner cases. Leading to weird bugs with hanging threads. I have seen colleges screw up in the same way too. Often it is possible to reformulate while True to

Re: The rap against while True: loops

2009-10-10 Thread Mensanator
On Oct 10, 5:02�pm, kj no.em...@please.post wrote: In 01ccc46d-5ea9-4dfe-ba22-699c6b859...@v36g2000yqv.googlegroups.com Mensanator mensana...@aol.com writes: On Oct 10, 3:15=EF=BF=BDpm, kj no.em...@please.post wrote: I'm coaching a group of biologists on basic Python scripting.

Re: Best way to handle changing list of class imports

2009-10-10 Thread Dave Angel
Scott Grant wrote: On Oct 10, 2:42 pm, Diez B. Roggisch de...@nospam.web.de wrote: Scott Grant schrieb: Hi there, I'd like to set up a framework in which I can add or remove new classes of a given expected subclass to my package, and have the system load that set at runtime

Re: Best way to handle changing list of class imports

2009-10-10 Thread Scott Grant
On Oct 10, 6:44 pm, Dave Angel da...@ieee.org wrote: Scott Grant wrote: On Oct 10, 2:42 pm, Diez B. Roggisch de...@nospam.web.de wrote: Scott Grant schrieb: Hi there, I'd like to set up a framework in which I can add or remove new classes of a given expected subclass to my package,

Re: No threading.start_new_thread(), useful addition?

2009-10-10 Thread Carl Banks
On Oct 9, 3:45 pm, Christian Heimes li...@cheimes.de wrote: Laszlo Nagy wrote: IMHO it is much cleaner to implement this as a decorator. Pro: transparent passing of positional and keyword arguments, keeps function documentation. You are entitled to your opinion but I STRONGLY recommend

Re: vim clientserver [was: best vi / emacs python features]

2009-10-10 Thread TerryP
On Oct 10, 6:13 pm, Chris Jones cjns1...@gmail.com wrote: Hmm.. On *nix systems, decent applications understand the $EDITOR environment variable - don't know about gnome friends, though. I tend to write programs that understand EDITOR, BROWSER, etc; wish the rest of the world did. So what

Re: organizing your scripts, with plenty of re-use

2009-10-10 Thread Ethan Furman
Gabriel Genellina wrote: En Sat, 10 Oct 2009 05:57:08 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au escribió: On Fri, 09 Oct 2009 16:37:28 -0700, Buck wrote: Here's a scenario. A user does a cvs checkout into some arbitrary directory and sees this: project/ +-- python/

Re: No module named os

2009-10-10 Thread Benjamin Peterson
smitty at home.com writes: I'm trying to build a small program and I get the above error. I have had this error popup in the past while trying to build other programs. What can I do? You're python is apparently not finding the standard library. --

code in a module is executed twice (cyclic import problems) ?

2009-10-10 Thread Stef Mientki
hello, I always thought code in a module was only executed once, but doesn't seem to be true. I'm using Python 2.5. And this is the example: == A.py == My_List = [] == B.py == from A import * My_List.append ( 3 ) print 'B', My_List import C == C.py == from A import * from B import * print

Re: The rap against while True: loops

2009-10-10 Thread Peter Billam
On 2009-10-10, kj no.em...@please.post wrote: I use while True-loops often, and intend to continue doing this while True, but I'm curious to know: how widespread is the injunction against such loops? Has it reached the status of best practice? This trend is ironic; I remember in the

except KeyError: print(this was not a key error?)

2009-10-10 Thread gert
http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi I screwed up some sql statement INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME('NOW')), (v['pid']),s.UID) bid does not exist anymore, but why does the KeyError exception occur when only my sql statement is

Re: No module named os

2009-10-10 Thread Scott David Daniels
smi...@home.com wrote: 'import site' failed; use -v for traceback Traceback (most recent call last): File ./setup.py, line 3, in module import sys, os, glob ImportError: No module named os I'm trying to build a small program and I get the above error. I have had this error popup in the

Re: code in a module is executed twice (cyclic import problems) ?

2009-10-10 Thread Benjamin Peterson
Stef Mientki stef.mientki at gmail.com writes: Why is the B.py executed twice ? Because it's executed once as a script and once as a module. -- http://mail.python.org/mailman/listinfo/python-list

What happened to python-list archives?

2009-10-10 Thread David W.
Hey there, I just noticed http://mail.python.org/pipermail/python-list/ is lacking archives prior to December 2005. Is something broken? I see Google search results from 2003, so it seems something has changed. David. -- http://mail.python.org/mailman/listinfo/python-list

Re: code in a module is executed twice (cyclic import problems) ?

2009-10-10 Thread Stephen Hansen
On Sat, Oct 10, 2009 at 4:36 PM, Stef Mientki stef.mien...@gmail.comwrote: hello, I always thought code in a module was only executed once, but doesn't seem to be true. This is one of the reasons why that whole big mess of a ton separate scripts that all call each-other and are sometimes

Re: datetime.datetime. or datetime. ?

2009-10-10 Thread Carl Banks
On Oct 10, 2:26 am, niklasr nikla...@gmail.com wrote: On Oct 8, 10:17 pm, Carl Banks pavlovevide...@gmail.com wrote: On Oct 8, 3:11 pm, niklasr nikla...@gmail.com wrote: On Oct 8, 5:25 pm, Diez B. Roggisch de...@nospam.web.de wrote: NiklasRTZ schrieb: Hello, my basic question

Re: Concept of God in islam

2009-10-10 Thread John Ladasky
On Oct 10, 12:25 pm, omer azazi omariman...@gmail.com wrote: Sorry for not sending anything related to this group but it might be something new to you. [198 lines deleted] Reported to GMail admins for spam. -- http://mail.python.org/mailman/listinfo/python-list

Script to complete web form fields

2009-10-10 Thread Feyo
How can I use Python to complete web form fields automatically? My work web-based email time-out is like 15 seconds. Every time I need to access my calendar, address book, or email, I have to type in my username and password. I'm just tired of it. I found the ClientForm module and have been

Re: The rap against while True: loops

2009-10-10 Thread Terry Reedy
kj wrote: I use while True-loops often, and intend to continue doing this while True, Me too. Of course, in Python, 'while True' actually means 'while ^C not pressed and window not closed and process not killed:', whereas in old mainframe Fortran the equivalent might have meant 'while my

Re: except KeyError: print(this was not a key error?)

2009-10-10 Thread Michel Alexandre Salim
On Oct 10, 7:59 pm, gert gert.cuyk...@gmail.com wrote: http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi I screwed up some sql statement INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME('NOW')), (v['pid']),s.UID) bid does not exist anymore, but why does the

[issue1724822] provide a shlex.split alternative for Windows shell syntax

2009-10-10 Thread Philip Jenvey
Philip Jenvey pjen...@underboss.org added the comment: FYI I've implemented a Windows command line parser for use by subprocess on Jython, it's available here: http://fisheye3.atlassian.com/browse/jython/trunk/jython/Lib/subprocess. py?r=6636#l554 tests:

[issue4064] distutils.util.get_platform() is wrong for universal builds on macosx

2009-10-10 Thread Michael Wise
Michael Wise michael.w...@uwa.edu.au added the comment: Dear Ronald Not that simple. I had, for the first time, installed Python 2.6.3 via the .dmg rather than compiled from scratch, and then numpy, again via the .dmg. I was trying to compile biopython from scratch using disutils when the

[issue4064] distutils.util.get_platform() is wrong for universal builds on macosx

2009-10-10 Thread Ned Deily
Ned Deily n...@acm.org added the comment: gcc-4.0 -arch ppc -arch i386 -fno-strict-aliasing ... followed, unsurprisingly, by: gcc-4.0: installation problem, cannot exec 'i686-apple-darwin8-gcc-4.0.0': No such file or directory From at least OS X 10.4 on, Xcode installs both variants of

[issue7060] test_multiprocessing dictionary changed size errors and hang

2009-10-10 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Interesting. I don't have a linux machine to debug this. My patch appears harmless enough. We are only storing an exception _object_, not any tracebacks or such. If this were happening on my windows machine I would put in

[issue4064] distutils.util.get_platform() is wrong for universal builds on macosx

2009-10-10 Thread Michael Wise
Michael Wise michael.w...@uwa.edu.au added the comment: Dear Ned Odd you should say that. The system is the latest version of 10.4 (10.4.11), but I did notice that the compiler assumed 10.3. The version of Xcode on this PowerBook G4 is 2.0 (quite old), so perhaps it has OSX 10.3 wired in.

[issue7055] Automatic test___all__

2009-10-10 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'm glad someone with more roundtuits than I had the same idea after the logging error in 2.6.3 :) The regrtest change isn't needed any more since RDM checked that concept in separately - the test update itself looks fine though (and applies

[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-10-10 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: The thread safety problem comes from the fact that performing file IO as mimetypes.init() does will release the GIL - if you want to ensure thread safety in that context, you have to do your own locking. mimetypes ignore this thread

[issue6626] show Python mimetypes module some love

2009-10-10 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Putting this here for the record rather than leaving it in Rietveld: I appreciate the desire for a cleaner API for handling mimetypes, but this isn't the way to get it. Finding projects that have their own mimetypes implementations, asking them

[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-10-10 Thread Leonardo Santagada
Leonardo Santagada santag...@gmail.com added the comment: I'm on os x 10.6 where threadboom.py doesn't segfault anymore at least on the system provided python. The problem that I see is that it shouldn't be segfaulting on mac os x 10.5 with the default recursion limit (I think it is 1000) with 2

[issue4064] distutils.util.get_platform() is wrong for universal builds on macosx

2009-10-10 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Michael: Again, please file a new issue for your problem because it is not related to this one. I'm removing myself from the nosy-list for this bug. -- ___ Python tracker

[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-10-10 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I have tried to apply the patches to python's trunk, but they don't apply cleanly at all. Could you please rework the patches into a single larger patch that applies to the trunk. -- ___

[issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc)

2009-10-10 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Knew I forgot to mention something - I'm not on OS X at all (Linux, Ubuntu 8.04). I was only looking at this bug because RDM cross-linked it to the mimetypes patch I was reviewing this evening. Running the threadboom code, it passes fine for me

[issue7097] urlparse.urljoin of simple http:// and somedomain.com produces incorrect result

2009-10-10 Thread steve steiner
New submission from steve steiner sstei...@users.sourceforge.net: Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type help, copyright, credits or license for more information. from urlparse import urljoin urljoin(http://;, somedomain.com)

[issue7098] g formatting for decimal types should always strip trailing zeros.

2009-10-10 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: Type 'g' formatting for Decimal instances doesn't behave in the same way as for floats when an explicit precision is given. It should strip all trailing zeros from the result: Python 2.7a0 (trunk:75309, Oct 10 2009, 13:44:18) [GCC 4.0.1

[issue7097] urlparse.urljoin of simple http:// and somedomain.com produces incorrect result

2009-10-10 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: urlparse.urljoin() is meant to join together a base URL with other URL parts. The protocol is part of the base URL and thus not supported by urlparse.urljoin(). -- nosy: +brett.cannon resolution: - invalid status: open - closed

[issue6075] Patch for IDLE/OS X to work with Tk-Cocoa

2009-10-10 Thread Kevin Walzer
Kevin Walzer wordt...@users.sourceforge.net added the comment: Single revised diff, tkcocoa.diff, attached, applied against Python trunk. Have not tested against Python trunk, nor do I believe it solves the issue with the extra menu items appearing when a window is closed. But hopefully this

[issue7099] Decimal.is_normal should return True even for numbers with exponent Emax

2009-10-10 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: Noticed by Stefan Krah: Python 2.7a0 (trunk:75309, Oct 10 2009, 13:44:18) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type help, copyright, credits or license for more information. from decimal import * x = Decimal('9.e+1000')

[issue7098] g formatting for decimal types should always strip trailing zeros.

2009-10-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch for trunk. -- keywords: +patch nosy: +eric.smith stage: test needed - patch review Added file: http://bugs.python.org/file15097/issue7098.patch ___ Python tracker

[issue7098] g formatting for decimal types should always strip trailing zeros.

2009-10-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It should strip all trailing zeros from the result: Hmm. Thinking about this some more, I don't think this is true: format() shouldn't be throwing away significant information (in Decimal the number of trailing zeros *is* significant

[issue1625] bz2.BZ2File doesn't support multiple streams

2009-10-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As far as I can tell, the patch looks mostly good. I just wonder, in Util_HandleBZStreamEnd(), why you don't set self-mode to MODE_CLOSED if BZ2_bzReadOpen() fails. As a sidenote, the bz2 module implementation seems to have changed quite a bit

[issue7086] logging.handlers.SysLogHandler with TCP support

2009-10-10 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into trunk and py3k. -- resolution: - fixed stage: test needed - status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7086

[issue7100] test_xmlrpc: global name 'stop_serving' is not defined

2009-10-10 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This happens at least on the py3k branch, I haven't checked other branches. test test_xmlrpc failed -- Traceback (most recent call last): File /home/antoine/py3k/bz-multistream/Lib/test/test_xmlrpc.py, line 344, in tearDown

[issue7055] Automatic test___all__

2009-10-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Committed in r75312, r75314. I'm not sure this should be backported to 2.6 and 3.1 (although it might be useful). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7101] tarfile: OSError with TarFile.add(..., recursive=True) about non-existing file

2009-10-10 Thread Denis Martinez
New submission from Denis Martinez deuns.marti...@gmail.com: I have written a server backup script (file attached) which archives a list of directories with tarfile and uploads the file to FTP. Today, the script hanged, with an exception: Exception in thread Thread-1: Traceback (most recent

[issue7084] printing a list releases the GIL carelessly

2009-10-10 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: I've attached a patch that fixes this issue by grabbing a reference to the item to be printed just before releasing the GIL. -- keywords: +patch nosy: +scott.dial Added file: http://bugs.python.org/file15099/list_print-r75317.patch

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-10-10 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Thanks to some hints by eric.smith, I've run the regression tests with this patch applied. It turns out there are still some outstanding issues with draft 9. One issue was in test_glob.py where broken symlinks would fail to be matched by

[issue6894] urllib2 doesn't respect no_proxy environment (python2.6.2)

2009-10-10 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Fixed in trunk and Committed revision 75333. -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6894 ___

[issue4064] distutils.util.get_platform() is wrong for universal builds on macosx

2009-10-10 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- nosy: -loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4064 ___ ___ Python-bugs-list

[issue6894] urllib2 doesn't respect no_proxy environment (python2.6.2)

2009-10-10 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: merged into py3k revision 75334 merged into release-26maint revision 75335. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6894 ___