GZRBOT 0.1 released

2009-12-23 Thread Bart Thate
Hi world ! First of all happy christmas and a happy new year to all of you. I want to release GZRBOT to the world. This is a rename of the CMNDBOT bot, since this name matches the one of GOZERBOT the best and thats what this bot is best described .. GOZERBOT on the Google Application Engine. So

force non-exponential representation for Decimal?

2009-12-23 Thread jholg
(re-posting this because of missing subject - sorry for the hassle) Hi, I need to convert Python decimal.Decimal data to the XMLSchema xs:decimal datatype. This is reasonably straightforward, but there are some corner cases. In particular, xs:decimal does not allow exponential notation like:

Ironpython experience

2009-12-23 Thread Lev
I'm an on and off Python developer and use it as one of the tools. Never for writing full-blown applications, but rather small, one-of- a-kind utilities. This time I needed some sort of backup and reporting utility, which is to be used by the members of our team once or twice a day. Execution time

Re: syntax error : first python program

2009-12-23 Thread Bearophile
Ben Finney: bash# /usr/bin/python sample.py   File sample.py, line 2     name = blah     ^ SyntaxError: invalid syntax Indentation is syntax in Python. But I agree, a little better error message may help there, something that contains indentation in it :-) Bye, bearophile --

Re: Python (and me) getting confused finding keys

2009-12-23 Thread John
The lesson of this? Do not make mutable classes hashable. That could be it! I'll try. Thanks a lot! The obvious follow-up is to ask how to make an immutable class. http://northernplanets.blogspot.com/2007/01/immutable-instances-in-python.h tml --

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Peter Otten
jh...@gmx.de wrote: I need to convert Python decimal.Decimal data to the XMLSchema xs:decimal datatype. This is reasonably straightforward, but there are some corner cases. In particular, xs:decimal does not allow exponential notation like: print

Re: Retrieving exception value in C

2009-12-23 Thread Gabriel Genellina
En Wed, 23 Dec 2009 04:24:04 -0300, swapnil swapnil...@gmail.com escribió: I am trying to retrieve the value of the exception (the message part) raised in python, in C. But if I run (actually import) the script from within a C code (embedding python in C), I am able to get the exception

Problem with Dynamically unloading a module

2009-12-23 Thread lordofcode
Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I need to dynamically load a module and unload it

Re: syntax error : first python program

2009-12-23 Thread Anssi Saari
Ben Finney ben+pyt...@benfinney.id.au writes: bash# /usr/bin/python sample.py File sample.py, line 2 name = blah ^ SyntaxError: invalid syntax Indentation is syntax in Python. At least here with Python 2.5.2 I get IndentationError: unexpected indent. I'm just wondering why would

mayavi2 install win32

2009-12-23 Thread Paz
I have been using mayavi2 for a while on my linux box but I would like to install it on my laptop (win32) so I can work from home and I am having trouble with vtk or its bindings. Has anybody had the same problem and managed to get round that ? Thanks, Paz --

Re: force non-exponential representation for Decimal?

2009-12-23 Thread jholg
(cc-ing the list) Is there a convenient way to force a decimal.Decimal representation to not use exponential representation? Which Python version are you using? For Python 2.6 (and 3.1), the answer's yes. For earlier Python verions, I don't think so. In Python 2.6, use new-style

Re: Strange Problem

2009-12-23 Thread Victor Subervi
On Tue, Dec 22, 2009 at 5:14 PM, Dave Angel da...@ieee.org wrote: Victor Subervi wrote: Hi; I have the following code: print 'printTheForm: ', descrProds, 'br /' for value in descrProds: print 'value: ', value, 'br /' which prints this: printTheForm: [['ID', 'tinyint', '5', '0',

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Mark Dickinson
On Dec 23, 10:03 am, jh...@gmx.de wrote: (cc-ing the list) Thanks. Looks like I'm still having trouble distinguishing between 'Reply' and 'Reply to author'. I'll have to work on my reading abilities over the break... Is there a convenient way to force a decimal.Decimal representation to

Re: Ironpython

2009-12-23 Thread Propad
On Dec 23, 6:20 am, Lev elbert...@hotmail.com wrote: Is this a correct group to talk about Ironpython? If not, please tell which is? The group for IronPython specific issues is: http://lists.ironpython.com/listinfo.cgi/users-ironpython.com It's quite active and helpfull. Cheers, Nenad --

Re: numpy performance and random numbers

2009-12-23 Thread Peter Pearson
On Sun, 20 Dec 2009 21:02:02 -0800, Rami Chowdhury wrote: On Dec 20, 2009, at 17:41 , Peter Pearson wrote: Why not use a good cipher, such as AES, to generate a pseudorandom bit stream by encrypting successive integers? Isn't the Fortuna PRNG based around that approximate concept? Yes,

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Lie Ryan
On 12/23/2009 8:41 PM, lordofcode wrote: Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I need

Re: Problem with win32ui

2009-12-23 Thread Marc Grondin
On 22/12/2009 1:05 PM, Gabriel Genellina wrote: En Tue, 22 Dec 2009 12:31:37 -0300, Marc Grondin marcg...@gmail.com escribió: Hello everyone, So i have been building an app with python(and learning as i go along) my knowledge of python is still kinda limited but the app work on my pc. I have

Re: python gtk: input box and enter

2009-12-23 Thread Nobody
On Tue, 22 Dec 2009 23:41:31 -0800, edgue wrote: How do I use gtk to enter a (hidden) text press ENTER ... done? Connect the gtk.Entry's activate signal to the click() method: self.entry.connect(activate, self.click) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with win32ui

2009-12-23 Thread Simon Hibbs
On 23 Dec, 11:10, Marc Grondin marcg...@gmail.com wrote: On 22/12/2009 1:05 PM, Gabriel Genellina wrote: En Tue, 22 Dec 2009 12:31:37 -0300, Marc Grondin marcg...@gmail.com escribi : Hello everyone, So i have been building an app with python(and learning as i go along) my knowledge of

Re: python gtk: input box and enter

2009-12-23 Thread edgue
On Dec 23, 12:33 pm, Nobody nob...@nowhere.com wrote: self.entry.connect(activate, self.click) Does the job. Thank you very much! -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax error : first python program

2009-12-23 Thread Ben Finney
Anssi Saari a...@sci.fi writes: At least here with Python 2.5.2 I get IndentationError: unexpected indent. I'm just wondering why would the OP get a SyntaxError? $ python2.4 -c ' pass' File string, line 1 pass ^ SyntaxError: invalid syntax $ python2.5 -c ' pass' File string, line

code review

2009-12-23 Thread Zubin Mithra
Hello, I`m pretty new to developing applications using python and i would like advance on this script i recently created which helps linux programmers on the linux terminal. The code is very simple to understand(i hope) and serves a simple purpose; however i am not sure if my way of scripting is

Re: code review

2009-12-23 Thread Jean-Michel Pichavant
Zubin Mithra wrote: Hello, I`m pretty new to developing applications using python and i would like advance on this script i recently created which helps linux programmers on the linux terminal. The code is very simple to understand(i hope) and serves a simple purpose; however i am not sure if

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
lordofcode wrote: Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I need to dynamically load a

GZRBOT 0.1 released

2009-12-23 Thread Bart Thate
Hi world ! First of all happy christmas and a happy new year to all of you. I want to release GZRBOT to the world. This is a rename of the CMNDBOT bot, since this name matches the one of GOZERBOT the best and thats what this bot is best described .. GOZERBOT on the Google Application Engine. So

Re: Re: force non-exponential representation for Decimal?

2009-12-23 Thread jholg
-- sorry if this comes out-of-thread-line but I forgot to enable mailing list delivery :-( -- I can't help wondering what you're doing with numbers that small. 2.34e-19 looks an awful lot like 0 for many practical purposes... Just an arbitrary example to show the behaviour. As I don't have

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
Jean-Michel Pichavant wrote: lordofcode wrote: Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module.

ImportError in eric4

2009-12-23 Thread rhill
I am new to Linux/Python/Eric4 (not in development though). So I am trying to start a small application as per tutorial found at eric-ide.python-projects.org: http://eric-ide.python-projects.org/tutorials/LogParser/chap1.html My application is similarly structured. Final step, I try to

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: 3/ if you really need to unload the previous module, it's a little bit tedious. import mod1 del mod1 sys.modules['mod1'] = None Assigning sys.modules[name] to None is not the same as deleting the entry. None has special

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 01:41:27 -0800, lordofcode wrote: I need to dynamically load a module and unload it and load another module. Why bother unloading it? Unless you're programming for an embedded device, it's highly unlikely that you're so strapped for memory that a module will make any real

Re: ImportError in eric4

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 11:02:25 -0200, rhill wrote: Why is the file ./ui/MainWindow.py not seen by the python interpreter? My wild guess is that you haven't set up a package correctly. You need to include a file __init__.py in the ui folder for Python to recognise it correctly. Note that the

ANNOUNCE: libmsgque-4.1, PLMK-1.2, NHI1-0.3

2009-12-23 Thread Andreas Otto
Dear User, ANNOUNCE: Christmas-Present-Release libmsgque: Application-Server-Toolkit for C, C++, JAVA, C#, TCL, PERL, PYTHON, VB.NET PLMK: Programming-Language-Microkernel NHI1: Non-Human-Intelligence #1 SUMMARY ===

Re: ImportError in eric4

2009-12-23 Thread rhill
Steven D'Aprano wrote: On Wed, 23 Dec 2009 11:02:25 -0200, rhill wrote: Why is the file ./ui/MainWindow.py not seen by the python interpreter? My wild guess is that you haven't set up a package correctly. You need to include a file __init__.py in the ui folder for Python to recognise it

Re: code review

2009-12-23 Thread Lie Ryan
On 12/23/2009 11:02 PM, Zubin Mithra wrote: Hello, I`m pretty new to developing applications using python and i would like advance on this script i recently created which helps linux programmers on the linux terminal. The code is very simple to understand(i hope) and serves a simple purpose;

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: But believe me, you don't want to mess up with the python import mechanism. Unless you understand how it works. Let me quote the OP: 'Not an expert in Python' I was just answering the OP

Mechanize/ClientForm - How to select IgnoreControl button and submit form

2009-12-23 Thread Brian D
All, I'm hoping to implement a project that will be historically transformational by mapping inequalities in property assessments. I'm stuck at step one: Scrape data from http://www.opboa.org. The site uses a bunch of hidden controls. I can't find a way to get past the initial disclaimer page

Re: Clustering technique

2009-12-23 Thread Taliesin Nuin
Luca wrote: Dear all, excuse me if i post a simple question.. I am trying to find a software/algorythm that can cluster simple data on an excel sheet Example: Variable a Variable b Variable c Case 11 0 0 Case 20

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: 3/ if you really need to unload the previous module, it's a little bit tedious. import mod1 del mod1 sys.modules['mod1'] = None Assigning sys.modules[name] to None is not the same as deleting

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread J Kenneth King
Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: A programmer that lacks critical thinking is a bad programmer. The language they use has no bearing on such human facilities. That's nonsense, and I can demonstrate it by

More On the Strange Problem

2009-12-23 Thread Victor Subervi
I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10', '/mm/dd', None], Since this is the first datetime that is passed, it would appear to be associated with such values, which are processed thus:

cannot import glib in python shell

2009-12-23 Thread uticdmarceau2...@yahoo.ca
Hello everyone, I'm trying to document a recipe to get the anomos python sources running on winxp Pentium3 laptop. I've installed the latest 2.6 python/mingw/msys/gtk and related binaries(glib, etc...) This link has all the information about running anomos python sources on a linux box:

Re: More On the Strange Problem

2009-12-23 Thread Victor Subervi
On Wed, Dec 23, 2009 at 2:21 PM, Victor Subervi victorsube...@gmail.comwrote: I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10', '/mm/dd', None], Since this is the first datetime that is passed,

Re: More On the Strange Problem

2009-12-23 Thread MRAB
Victor Subervi wrote: I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10', '/mm/dd', None], Since this is the first datetime that is passed, it would appear to be associated with such values, which

Re: More On the Strange Problem

2009-12-23 Thread Carsten Haese
Victor Subervi wrote: [...] If in fact the problem has to do with the None value, how can I easily substitute a different value? I tried: if theVal == None: theVal = '' but that didn't capture it. That indicates one of two things: * Your problem is not caused by the None value. * Your

Re: More On the Strange Problem

2009-12-23 Thread Emile van Sebille
On 12/23/2009 10:21 AM Victor Subervi said... snip printed out. This is the code: print 'printTheForm: ', descrProds, 'br /' for value in descrProds: print 'value: ', value, 'br /' Why not try this in a fashion more likely to succeed... import cgi for value in descrProds: print

Re: More On the Strange Problem

2009-12-23 Thread Victor Subervi
On Wed, Dec 23, 2009 at 3:03 PM, MRAB pyt...@mrabarnett.plus.com wrote: Victor Subervi wrote: I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10', '/mm/dd', None], Since this is the first

Re: [gtk-win32] cannot import glib in python shell

2009-12-23 Thread Tor Lillqvist
, but when I do import glib ERROR!!! My Python knowledge is next to nil. You might get more help on some Python-specific list. Or even a pygtk-specific list. if I cd to a certain dir in glib sources, there were two .py files, Wrong approach. And anyway, I find four .py files in current GLib

Re: More On the Strange Problem

2009-12-23 Thread uticdmarceau2...@yahoo.ca
Victor Subervi wrote: On Wed, Dec 23, 2009 at 2:21 PM, Victor Subervi victorsube...@gmail.comwrote: I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed: ['LastDatePrice', 'date', '10', '/mm/dd', None], Since this is the first

creating ZIP files on the cheap

2009-12-23 Thread samwyse
I've got an app that's creating Open Office docs; if you don't know, these are actually ZIP files with a different extension. In my case, like many other people, I generating from boilerplate, so only one component (content.xml) of my ZIP file will ever change. Instead of creating the entire ZIP

Re: [pygtk] cannot import glib in python shell

2009-12-23 Thread John Stowers
I think ideally what I'm requesting is to have the mingw/python/gtk environments to be harmonized. I'm close. I can do the following: python import sys import gtk blah = gtk.Window(0) blah.show() , but when I do import glib ERROR!!! if I cd to a certain dir in glib sources, there

Re: Python-list Digest, Vol 75, Issue 226

2009-12-23 Thread r0g
Gabriel Genellina wrote: En Tue, 22 Dec 2009 16:30:58 -0300, r0g aioe@technicalbloke.com escribió: Gabriel Genellina wrote: En Mon, 21 Dec 2009 16:30:13 -0300, Pulkit Agrawal thatguypul...@gmail.com escribió: I am writing a script wherein I need to merge files into existing tar.gz

Re: creating ZIP files on the cheap

2009-12-23 Thread uticdmarceau2...@yahoo.ca
samwyse wrote: I've got an app that's creating Open Office docs; if you don't know, these are actually ZIP files with a different extension. In my case, like many other people, I generating from boilerplate, so only one component (content.xml) of my ZIP file will ever change. Instead of

Re: More On the Strange Problem

2009-12-23 Thread MRAB
Victor Subervi wrote: On Wed, Dec 23, 2009 at 3:03 PM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: Victor Subervi wrote: I've isolated the problem in the print-out at the bottom of this post. It occurs when these values are passed:

Re: force non-exponential representation for Decimal?

2009-12-23 Thread Mensanator
On Dec 23, 4:03 am, jh...@gmx.de wrote: (cc-ing the list) Is there a convenient way to force a decimal.Decimal representation to not use exponential representation? Which Python version are you using?  For Python 2.6 (and 3.1), the answer's yes.  For earlier Python verions, I don't

ISO all functions+methods+classes without docstring

2009-12-23 Thread kj
I'm looking for a good way to get a listing of all the undocumented (i.e. docstring-less) functions, classes, and methods as defined in a (largish) library of files. What's a good way to get this information? TIA! -Kynn -- http://mail.python.org/mailman/listinfo/python-list

Re: More On the Strange Problem

2009-12-23 Thread Lie Ryan
On 12/24/2009 8:00 AM, MRAB wrote: print first_twin == second_twin True err... I don't think there is any situation where first_twin == second_twin wouldn't be considered a bug. They look similar, they act similar, and they quack the same; though you can almost always treat them the same

Re: creating ZIP files on the cheap

2009-12-23 Thread Lie Ryan
On 12/24/2009 7:34 AM, samwyse wrote: I've got an app that's creating Open Office docs; if you don't know, these are actually ZIP files with a different extension. In my case, like many other people, I generating from boilerplate, so only one component (content.xml) of my ZIP file will ever

Re: ISO all functions+methods+classes without docstring

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 21:08:02 +, kj wrote: I'm looking for a good way to get a listing of all the undocumented (i.e. docstring-less) functions, classes, and methods as defined in a (largish) library of files. What's a good way to get this information? list_of_modules = [] for

Re: More On the Strange Problem

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 19:03:36 +, MRAB wrote: if whatDo == 'insert': theVal = defaultVal val = defaultVal What's the difference between theVal and val? The names don't help me! Oh MRAB! Isn't it obvious? theVal has a leading definite article while val doesn't! Really

python 2.x and running shell command

2009-12-23 Thread tekion
All, some of the servers I have run python 2.2, which is a drag because I can't use subprocess module. My options that I know of is popen2 module. However, it seems it does not have io blocking capabilities. So every time run a command I have open and close a file handle. I have command that

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 10:55:19 -0500, J Kenneth King wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: A programmer that lacks critical thinking is a bad programmer. The language they use has no bearing on such

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 15:31:53 +0100, Jean-Michel Pichavant wrote: Steven D'Aprano wrote: On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: But believe me, you don't want to mess up with the python import mechanism. Unless you understand how it works. Let me

strange geometry problem

2009-12-23 Thread Nick Buchholz
Hi all, I'm doing a GUI for describing connectors and the signals attached. the system runs on CentOS release 5.2 (FINAL) using python 2.5 and tcl/tk 8.4 I have a class Pin that contains two class attributes that are dialogs. They are built by a helper routine as follows: if

Re: python 2.x and running shell command

2009-12-23 Thread Sean DiZazzo
On Dec 23, 1:57 pm, tekion tek...@gmail.com wrote: All, some of the servers I have run python 2.2, which is a drag because I can't use subprocess module.  My options that I know of is popen2 module.  However, it seems it does not have io blocking capabilities.   So every time run a command I

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Carl Banks
On Dec 23, 7:40 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 23 Dec 2009 13:37:06 +0100, Jean-Michel Pichavant wrote: 3/ if you really need to unload the previous module, it's a little bit tedious. import mod1 del mod1 sys.modules['mod1'] = None Assigning

RE: Ironpython experience

2009-12-23 Thread Dino Viehland
Lev wrote: I'm an on and off Python developer and use it as one of the tools. Never for writing full-blown applications, but rather small, one-of- a-kind utilities. This time I needed some sort of backup and reporting utility, which is to be used by the members of our team once or twice a

Re: creating ZIP files on the cheap

2009-12-23 Thread John Machin
On Dec 24, 7:34 am, samwyse samw...@gmail.com wrote: I've got an app that's creating Open Office docs; if you don't know, these are actually ZIP files with a different extension.  In my case, like many other people, I generating from boilerplate, so only one component (content.xml) of my ZIP

Re: creating ZIP files on the cheap

2009-12-23 Thread Emile van Sebille
On 12/23/2009 3:47 PM John Machin said... Is it maintainable? I.e. pretend that the next person to maintain your code knows where you live and owns a chainsaw. Oooh... that's much better than the finger guillotine and annual holiday-party finger count I normally threaten with... Emile --

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Terry Reedy
Instead the accepted, idiomatic Python way of writing this was to use short-circuit booleans: result = condition and x or y However this idiom is buggy! If x is a false-value (say, 0) then result gets set to y no matter what the value of condition. This is only a bug if one expects

Re: Problem with Dynamically unloading a module

2009-12-23 Thread lordofcode
Hi All, Thanks you all for your replies ,cleared quiet a few doubts about importing modules and namespace references . Currently am going with static importing of all modules. But it may not be efficient in future as the number of interchangeable modules that I have to import may run in

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 15:18:10 -0800, Carl Banks wrote: # will unload mod1 assuming mod1 was the only reference to that module. Which is highly unlikely. Any classes or functions from the module will keep the module alive. Actually, they won't. Neither classes nor functions directly

wave robot notes

2009-12-23 Thread Aaron Watters
I implemented a Google Wave Robot which annotates BNF syntax rules using railroad diagram images. I put notes about the implementation process here for the benefit of posterity. http://listtree.appspot.com/firstWaveRobot The robot Id is whiff-gae-tutor...@appspot.com -- if you are

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 20:11:25 -0500, Terry Reedy wrote: Instead the accepted, idiomatic Python way of writing this was to use short-circuit booleans: result = condition and x or y However this idiom is buggy! If x is a false-value (say, 0) then result gets set to y no matter what the value

Re: Threading with queues

2009-12-23 Thread Gib Bogle
Lie Ryan wrote: On 12/22/2009 10:47 AM, Gib Bogle wrote: This is indented over one indentation level too much. You want it to be at the same level as the for above. Here, its at the same level with t -- meaning this entire loop gets repeated five times. I sorta really recommend a tab width of

Re: Problem with Dynamically unloading a module

2009-12-23 Thread Steve Holden
lordofcode wrote: Hi All Not an expert in Python, so sorry if this sounds like a silly question. I went through other few threads in the mailing list but they are not helping me much. I have run into a problem related to dynamically loading and unloading a module. I need to dynamically

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-12-23 Thread Daniel
Daniel daniel.mon...@free.fr added the comment: Hello, I confirm : Python3.1.1 .../... running build running build_py running build_ext building 'cx_Freeze.util' extension error: Unable to find vcvarsall.bat I've got the r73896 file correction. :( D. -- nosy: +Daniel26 versions:

[issue1747858] chown broken on 64bit

2009-12-23 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: indeed, those were missed. fixed in trunk r77007 and release26-maint r77008. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1747858

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-12-23 Thread Eric Devolder
Eric Devolder eric.devol...@gmail.com added the comment: Will send you the trick (file) to make it work, but I can't do it from here (at work - access restrictions) - please wait until Tonight :-) Cheers Eric 2009/12/23 Daniel rep...@bugs.python.org Daniel daniel.mon...@free.fr added the

[issue1811] True division of integers could be more accurate

2009-12-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Stealing this from Tim, with the intention of acting on it in the next couple of weeks. -- assignee: tim_one - mark.dickinson ___ Python tracker rep...@bugs.python.org

[issue7417] open builtin has no signature in docstring

2009-12-23 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Added signature from msg95885 in r77009. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7417 ___

[issue6873] posix_lchown: possible overflow of uid, gid

2009-12-23 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: I applied the same fix that was applied to chown in trunk r77007 for lchown and fchown. Could you test it on a platform where it previously failed? The existing code might still have issues if there are platforms where uid_t and gid_t are

[issue7562] Custom order for the subcommands of build

2009-12-23 Thread Jari Pennanen
Jari Pennanen jari.penna...@gmail.com added the comment: Note that I don't think that just providing an alternative order of build_py and build_ext would solve the SWIG issue - e.g. build_py wouldn't know about the new files SWIG generates unless the SWIG build process explicitly tells the

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-23 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I briefly looked at how PyByteArray_AS_STRING() is used in other places. A similar segfault can be provoked in long_new(): int(bytearray(b''), 10) Then, there are a couple of places where pointer arithmetic is used with the NULL

[issue7561] PyByteArray_AS_STRING used unsafely

2009-12-23 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- components: +Interpreter Core priority: high - critical title: Filename-taking functions in posix segfault when called with a bytearray arg. - PyByteArray_AS_STRING used unsafely ___ Python

[issue7568] Spelling error in imaplib module docs

2009-12-23 Thread Mike Putnam
New submission from Mike Putnam m...@theputnams.net: The documentation string within the IMAP4.thread function incorrectly spells the threading_algorithm arg as threading_alogrithm Appears to affect imaplib.py ver. 2.55 2.58 Could not find other versions to examine. Starting in:

[issue1811] True division of integers could be more accurate

2009-12-23 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's an updated patch, against py3k. On my machine, a/b is a touch faster with this patch when abs(a), abs(b) are smaller than 1e15 or so; it's (inevitably) slower than the existing implementation for larger a and b. For 'random' a

[issue7568] Spelling error in imaplib module docs

2009-12-23 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 2.4, Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7568 ___ ___

[issue7568] Spelling error in imaplib module docs

2009-12-23 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7568 ___ ___

[issue7568] Spelling error in imaplib module docs

2009-12-23 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7568 ___ ___

[issue7566] Add ntpath.sameopenfile support for Windows

2009-12-23 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: That's an excellent idea. I had searched briefly for a more correct solution, but did not find one at the time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7566

[issue7566] Add ntpath.sameopenfile support for Windows

2009-12-23 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7566 ___ ___ Python-bugs-list mailing

[issue7569] ctypes doc improvement: c_char_p

2009-12-23 Thread Nikolaus Rath
New submission from Nikolaus Rath nikol...@rath.org: It would be great if the documentation of c_char_p (http://docs.python.org/library/ctypes.html#ctypes.c_char_p) could be reformulated as follows (would have saved me quite some time): class ctypes.c_char_p¶ Represents the C char *

[issue7570] Error in urllib2 example

2009-12-23 Thread Manuel Muradás
New submission from Manuel Muradás mmura...@dieresys.com.ar: We've found an error in an urllib2 example with Proxy Basic authentication. This is the example with the error: {{{ This example replaces the default ProxyHandler with one that uses programmatically-supplied proxy URLs, and adds proxy

[issue7291] urllib2 cannot handle https with proxy requiring auth

2009-12-23 Thread Manuel Muradás
Manuel Muradás mmura...@dieresys.com.ar added the comment: Hi! 2.6 backport is missing an argument in _set_tunnel definition. It should be: def _set_tunnel(self, host, port=None, headers=None): -- nosy: +dieresys ___ Python tracker

[issue7291] urllib2 cannot handle https with proxy requiring auth

2009-12-23 Thread Manuel Muradás
Manuel Muradás mmura...@dieresys.com.ar added the comment: The patch fixes only when you pass the authentication info in the proxy handler's URL. Like: proxy_handler = urllib2.ProxyHandler({'https': 'http://user:p...@proxy-example.com:3128/'}) But setting the authentication using a

[issue7544] Fatal error on thread creation in low memory condition

2009-12-23 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: multiprocessing.Pool(): Fatal Python error: PyEval_AcquireThread: NULL new thread state - Fatal error on thread creation in low memory condition ___ Python tracker

[issue7291] urllib2 cannot handle https with proxy requiring auth

2009-12-23 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Thanks for the note, Manuel. Fixed it in revision 77013. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7291 ___

[issue7570] Error in urllib2 example

2009-12-23 Thread Senthil Kumaran
Changes by Senthil Kumaran orsent...@gmail.com: -- assignee: georg.brandl - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7570 ___

[issue7570] Error in urllib2 example

2009-12-23 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Fixed it in r77018 and merges. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7570 ___

[issue6873] posix_lchown: possible overflow of uid, gid

2009-12-23 Thread Boya Sun
Boya Sun boya@case.edu added the comment: Gregory, I discovered this bug by static analysis, so I do not have a system that this bug is actually triggered. But I am happy to see the fix applied since this makes code safer. It would be great if anyone could write a test case that cause

  1   2   >