Survey: Python modules for Finance

2010-05-20 Thread Sridhar Ratnakumar
Working with Python modules for Finance? We`d love your feedback on our 2 minute poll about your Must-Have Python Packages for Finance. We`ll be posting the results in a few weeks and your contributions are greatly appreciated. Here`s the link: http://www.surveymonkey.com/s/may2010as --

KaPy -- Karlsruhe Python User Group meeting, 2010-05-21, 19:00

2010-05-20 Thread Jürgen Erhard
The Karlsruhe Python User Group (KaPy) meets again. Friday, 2010-04-16 (May 21st) at 19:00 (7pm) in the rooms of Entropia eV (the local affiliate of the CCC). See http://entropia.de/wiki/Anfahrt on how to get there. For your calendars: meetings are held monthly, on the 3rd Friday. Bye, J PS:

ANN: pycairo release 1.8.10 now available

2010-05-20 Thread Steve
Pycairo is a set of Python bindings for the multi-platform 2D graphics library cairo. http://cairographics.org http://cairographics.org/pycairo A new pycairo release 1.8.10 is now available from: http://cairographics.org/releases/pycairo-1.8.10.tar.gz

Re: Loading C extension from memory

2010-05-20 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/13/2010 06:14 AM, mk wrote: I wonder if there is a way to load C extension from in-memory object, not from the file on the disk? I'm asking bc I would like to download C extensions over network and load them into Python interpreter

Re: Loading C extension from memory

2010-05-20 Thread Christian Heimes
mk wrote: I wonder if there is a way to load C extension from in-memory object, not from the file on the disk? No, that's not possible since Python depends on the operating system. A lot of operating systems require a physical file to load the shared library from. Python uses dlopen() on

Re: What's the matter with docs.python.org?

2010-05-20 Thread Christian Mertes
On Mi, 2010-05-19 at 16:42 -0700, Aahz wrote: IPv6 has sometimes been problematical -- try disabling it. Wow, can I have that on a t-shirt? ;) Also, I think you need to pass the host HTTP header to access docs.python.org Look, I don't really want to read Python docs via telnet. I basically

Re: How to unescape a raw string?

2010-05-20 Thread Gary Herron
On 05/19/2010 08:34 PM, pyt...@bdurham.com wrote: How can I unescape a raw string so that it behaves as a non-raw string? For example, if I read the string \n\t A B C\ D E F \xa0 \u1234 from a text file, how can I convert (unescape?) this string so that \n, \t, \, \x, and \u get converted to a

helo

2010-05-20 Thread cosmeticsafrolatino
hi -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading data from a Microsoft Access 2003 database

2010-05-20 Thread Jimoid
Thanks to all for your helpful suggestions. So far I have installed and played around with mdbtools, and it appears that I can use this from the shell to extract the information I need, e.g. mdb-export for dumping an entire table or mdb-sql to run a query. I am also interested by mxODBC and

250

2010-05-20 Thread Martin P. Hellwig
On 05/20/10 07:51, cosmeticsafrolatino wrote: hi 250 locahost.local Hello WimaxUser3645-219.wateen.net [110.36.45.219], pleased to meet you -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading data from a Microsoft Access 2003 database

2010-05-20 Thread Jimoid
I've now had a closer look at both pyODBC and mxODBC and it seems to me that they both require the database to be running to be able to query it. Is this correct? If so I think I will have to use mdb-* as the database I want to query is not running. Cheers, Jimmy --

intervall of about 1 second for xmlrpc calls?

2010-05-20 Thread Thomas Lehmann
Hi, I'm wondering about the behavior. Running this example - it looks like - that each rpc call is triggered in a visible interval (about one second). What's wrong? Thomas APPENDIX: code import threading from xmlrpc.server import SimpleXMLRPCServer import xmlrpc.client class

Transferring an exception from one thread to an other.

2010-05-20 Thread Antoon Pardon
I have a numver of tarfiles on a remote host that I need to process and that I fetch via FTP. I wrote the following as a test to see how I would best approach this. (I'm using python 2.5) ftptst1 import tarfile as tar from ftplib

Re: intervall of about 1 second for xmlrpc calls?

2010-05-20 Thread Thomas Lehmann
What's wrong? Obviously there's a problem with localhost. When using the IP of my machine everything is working fast. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with an huge dictionary

2010-05-20 Thread Thomas Lehmann
The question is: Is there a limit on the number of entries a dictionary can have i jython? I wrote a little app where my data is stored in a huge dictionary (11746 entries) generated with a python script. When I try to import the dictionary, jython complains with the following message:

Drawing glyphs based on their index (NOT their character code)

2010-05-20 Thread Christian Stapfer
Here's an interesting little problem: I am given a master.ttf font file and a subset file subset.ttf of that font, and I am asked to map indices of all the glyphs in subset.ttf to the corresponding indices in master.ttf. The subset font file is the result of a pipeline of 3 tools (pdflatex,

Error regarding numpy

2010-05-20 Thread sanam singh
hi, when i import numpy i get following error import numpy Traceback (most recent call last): File /usr/lib/wingide-personal3.2/src/debug/tserver/_sandbox.py, line 1, in module # Used internally for debug sandbox under external interpreter File

Re: intervall of about 1 second for xmlrpc calls?

2010-05-20 Thread Adam Tauno Williams
On Thu, 2010-05-20 at 03:40 -0700, Thomas Lehmann wrote: What's wrong? Obviously there's a problem with localhost. When using the IP of my machine everything is working fast. You box may first be trying to connect to ::1 (ipv6) and when that fails it falls back to 127.0.0.1. Make sure IPv6

Import Module

2010-05-20 Thread Harikrishnan R
Hi , I have a file a.py contains from one.two import abc is there any way to find out one.two the import Path of abc. ? I don't want one.two.abc . Any function or attribute which directly give one.two ? -Regards -- Harikrishan R

why struct.pack behave like this

2010-05-20 Thread XieTian
Hi When I use struct to pack binary data, I found this interesting behaviour: import struct struct.pack('B', 1) '\x01' struct.pack('H', 200) '\xc8\x00' struct.pack('BH',1, 200) '\x01\x00\xc8\x00' struct.calcsize('BH') 4 Why does struct.pack('BH',1, 200) come out with an extra \x00? --

Re: Drawing glyphs based on their index (NOT their character code)

2010-05-20 Thread Christian Stapfer
Christian Stapfer nob...@nowhere.nil schrieb im Newsbeitrag news:b7256$4bf516e1$544ba447$20...@news.hispeed.ch... Here's an interesting little problem: I am given a master.ttf font file and a subset file subset.ttf of that font, and I am asked to map indices of all the glyphs in subset.ttf to

Re: Import Module

2010-05-20 Thread Gary Herron
On 05/19/2010 09:40 AM, Harikrishnan R wrote: Hi , I have a file a.py contains from one.two import abc is there any way to find out one.two the import Path of abc. ? I don't want one.two.abc . Any function or attribute which directly

Re: function that counts...

2010-05-20 Thread superpollo
Steven D'Aprano ha scritto: On Wed, 19 May 2010 22:58:22 +0200, superpollo wrote: In [266]: del(sum) del is a statement, not a function, so the brackets are pointless. This is like writing: x = (1) instead of x = 1 `del sum` is all you need. sorry about that, thanks a lot! bye --

Re: function that counts...

2010-05-20 Thread superpollo
Steven D'Aprano ha scritto: On Wed, 19 May 2010 21:58:04 +0200, superpollo wrote: ... how many positive integers less than n have digits that sum up to m: In [197]: def prttn(m, n): Does the name prttn mean anything? I'm afraid I keep reading it as a mispelling of print n. pArtItIOn

Re: function that counts...

2010-05-20 Thread superpollo
Richard Thomas ha scritto: For this kind of problem you should avoid all that stringification. I find it best to deal with sequences of digits of a fixed length and go from there. For example: def count1(m, n, cache={}): Number of digit sequences of length `n` summing to `m`. if n 0 or

Re: why struct.pack behave like this

2010-05-20 Thread Dave Angel
XieTian wrote: Hi When I use struct to pack binary data, I found this interesting behaviour: import struct struct.pack('B', 1) '\x01' struct.pack('H', 200) '\xc8\x00' struct.pack('BH',1, 200) '\x01\x00\xc8\x00' struct.calcsize('BH') 4

Re: Display file names in Tkinter Listbox

2010-05-20 Thread sit
On Thu, 20 May 2010 15:36:59 +1000, John McMonagle jmcmona...@no.spam.velseis.com.au wrote: r...@home.com wrote: Hello, My first attenpt at a simple python Tkinter application. I wanted to see how to load file names into a listbox from a menu. This is what I got until the part of

Re: function that counts...

2010-05-20 Thread Peter Pearson
On Wed, 19 May 2010 21:58:04 +0200, superpollo ute...@esempio.net wrote: ... how many positive integers less than n have digits that sum up to m: If it's important for the function to execute quickly for large n, you might get a useful speedup by testing only every ninth integer, since any two

Strange MySQL Problem

2010-05-20 Thread Victor Subervi
Hi; I have this code: #!/usr/bin/python import cgitb; cgitb.enable() import cgi import sys,os sys.path.append(os.getcwd()) import MySQLdb from login import login def create_edit_passengers4(): print Content-Type: text/html print print ''' !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0

Python 2.6.1 + wxPython 2.8.9.1 compiled form source

2010-05-20 Thread Angel
Hi, I have a Red Hat 4.6 machone and I compiled and installed python 2.6.1 from source. Then, I compiled wxPython 2.8.9.1 form source too. And then, when I try to run it: # python Python 2.6.1 (r261:67515, Mar 4 2009, 20:10:49) [GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2 Type help,

Re: function that counts...

2010-05-20 Thread superpollo
Peter Pearson ha scritto: On Wed, 19 May 2010 21:58:04 +0200, superpollo ute...@esempio.net wrote: ... how many positive integers less than n have digits that sum up to m: If it's important for the function to execute quickly for large n, you might get a useful speedup by testing only every

Re: function that counts...

2010-05-20 Thread Grant Edwards
On 2010-05-20, superpollo ute...@esempio.net wrote: Steven D'Aprano ha scritto: On Wed, 19 May 2010 21:58:04 +0200, superpollo wrote: ... how many positive integers less than n have digits that sum up to m: In [197]: def prttn(m, n): Does the name prttn mean anything? I'm afraid I keep

Re: Strange MySQL Problem

2010-05-20 Thread MRAB
Victor Subervi wrote: Hi; I have this code: #!/usr/bin/python import cgitb; cgitb.enable() import cgi import sys,os sys.path.append(os.getcwd()) import MySQLdb from login import login def create_edit_passengers4(): print Content-Type: text/html print print ''' !DOCTYPE html PUBLIC

Re: Strange MySQL Problem

2010-05-20 Thread Christian Heimes
MRAB wrote: I think you need to 'commit' any changes to do to the database. Yeah, you are right. Also some RDBMS don't support DDL and DML statements inside one transaction. You may need to commit and begin after the create table DDL. Christian --

Re: Strange MySQL Problem

2010-05-20 Thread Victor Subervi
On Thu, May 20, 2010 at 12:56 PM, MRAB pyt...@mrabarnett.plus.com wrote: When performing SQL operations, don't insert the values using Python's string formatting, because that makes it vulnerable to SQL-injection attacks, ie don't do this: cursor.execute(sql_command % values) do this:

Re: Global variables for python applications

2010-05-20 Thread TomF
On 2010-05-19 07:34:37 -0700, Steven D'Aprano said: # Untested. def verbose_print(arg, level, verbosity=1): if level = verbosity: print arg def my_function(arg): my_print(arg, level=2) return arg.upper() if __name__ == '__main__': if '--verbose' in sys.argv:

Re: function that counts...

2010-05-20 Thread superpollo
Grant Edwards ha scritto: On 2010-05-20, superpollo ute...@esempio.net wrote: Steven D'Aprano ha scritto: On Wed, 19 May 2010 21:58:04 +0200, superpollo wrote: ... how many positive integers less than n have digits that sum up to m: In [197]: def prttn(m, n): Does the name prttn mean

Re: 250

2010-05-20 Thread Emile van Sebille
On 5/20/2010 12:39 AM Martin P. Hellwig said... On 05/20/10 07:51, cosmeticsafrolatino wrote: hi 250 locahost.local Hello WimaxUser3645-219.wateen.net [110.36.45.219], pleased to meet you :) -- http://mail.python.org/mailman/listinfo/python-list

Re: function that counts...

2010-05-20 Thread Grant Edwards
On 2010-05-20, superpollo ute...@esempio.net wrote: Grant Edwards ha scritto: On 2010-05-20, superpollo ute...@esempio.net wrote: Steven D'Aprano ha scritto: On Wed, 19 May 2010 21:58:04 +0200, superpollo wrote: ... how many positive integers less than n have digits that sum up to m: Does

Infertility treatment for free

2010-05-20 Thread women
Infertility treatment for free Bearing and speed of fertilization http://echance.info/cj/fb.htm -- http://mail.python.org/mailman/listinfo/python-list

Bearing and speed of fertilization

2010-05-20 Thread women
Infertility treatment for free Bearing and speed of fertilization http://echance.info/cj/fb.htm -- http://mail.python.org/mailman/listinfo/python-list

download youtube free and fast

2010-05-20 Thread women
download youtube free and fast http://echance.info/cj/youtube.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: intervall of about 1 second for xmlrpc calls?

2010-05-20 Thread News123
Hi Adam, Adam Tauno Williams wrote: On Thu, 2010-05-20 at 03:40 -0700, Thomas Lehmann wrote: What's wrong? Obviously there's a problem with localhost. When using the IP of my machine everything is working fast. I think you're right. localhost with IPV6 was also a problem for me. At least

Re: intervall of about 1 second for xmlrpc calls?

2010-05-20 Thread Adam Tauno Williams
On Thu, 2010-05-20 at 22:46 +0200, News123 wrote: Hi Adam, Adam Tauno Williams wrote: On Thu, 2010-05-20 at 03:40 -0700, Thomas Lehmann wrote: What's wrong? Obviously there's a problem with localhost. When using the IP of my machine everything is working fast. I think you're right.

Re: What's the matter with docs.python.org?

2010-05-20 Thread David Bolen
Christian Mertes cmer...@techfak.uni-bielefeld.de writes: On Mi, 2010-05-19 at 16:42 -0700, Aahz wrote: Also, I think you need to pass the host HTTP header to access docs.python.org Look, I don't really want to read Python docs via telnet. I basically wanted to point out that there is

Re: Display file names in Tkinter Listbox

2010-05-20 Thread John McMonagle
s...@home.com wrote: I have made the modifications and it does print inside the listbox, however they are all printed on the same line. Sorry, I didn't realize askopenfilenames returned the filenames as a whitespace separated string, on my system they are returned as a tuple of strings.

RE: Picking a license

2010-05-20 Thread Delaney, Timothy (Tim)
From: Ben Finney This thread is already off-topic and too long. I'm conflicted about my role in that; I have endeavoured only to address falsehoods that IMO were not otherwise being addressed. So I'll try to keep this brief. Ethan Furman et...@stoneleaf.us writes: This doesn't make sense

Re: Display file names in Tkinter Listbox

2010-05-20 Thread sit
On Fri, 21 May 2010 08:02:30 +1000, John McMonagle jmcmona...@no.spam.velseis.com.au wrote: s...@home.com wrote: I have made the modifications and it does print inside the listbox, however they are all printed on the same line. Sorry, I didn't realize askopenfilenames returned the

starting repl programmatically

2010-05-20 Thread Brendan Miller
I have a python script that sets up some environmental stuff. I would then like to be able to change back to interactive mode and use that environment. What's the best way to do that? -- http://mail.python.org/mailman/listinfo/python-list

Re: starting repl programmatically

2010-05-20 Thread Brendan Miller
python -i myscript.py almost does what I want. The only problem is if I exit with exit(0) it does *not* enter interactive mode. I have to run off the end of the script as near as I can tell. Is there another way to exit without breaking python -i? On Thu, May 20, 2010 at 4:57 PM, Brendan Miller

Ugly modification of a class, can it be done better ?

2010-05-20 Thread Stef Mientki
hello, This might be a strange question, but as a practical guy, I'm not searching for the best solution, but for a practical solution. I've a class which I've used very extensively. Now I want to extend that class with an action on a double click event, but that action is determined by the main

Re: starting repl programmatically

2010-05-20 Thread Steven D'Aprano
On Thu, 20 May 2010 16:57:40 -0700, Brendan Miller wrote: I have a python script that sets up some environmental stuff. I would then like to be able to change back to interactive mode and use that environment. What's the best way to do that? On most(?) Linux distros, `man python` is your

Re: Ugly modification of a class, can it be done better ?

2010-05-20 Thread Jack Diederich
On Thu, May 20, 2010 at 8:13 PM, Stef Mientki stef.mien...@gmail.com wrote: hello, This might be a strange question, but as a practical guy, I'm not searching for the best solution, but for a practical solution. I've a class which I've used very extensively. Now I want to extend that class

Re: starting repl programmatically

2010-05-20 Thread Patrick Maupin
On May 20, 6:57 pm, Brendan Miller catph...@catphive.net wrote: I have a python script that sets up some environmental stuff. I would then like to be able to change back to interactive mode and use that environment. What's the best way to do that? import cmd class MyCmd(cmd.Cmd): ... def

Re: starting repl programmatically

2010-05-20 Thread Steven D'Aprano
On Thu, 20 May 2010 17:11:17 -0700, Brendan Miller wrote: python -i myscript.py almost does what I want. The only problem is if I exit with exit(0) it does *not* enter interactive mode. I have to run off the end of the script as near as I can tell. Is there another way to exit without

Re: Ugly modification of a class, can it be done better ?

2010-05-20 Thread Steven D'Aprano
Sorry for breaking threading, but Stef's original post has not come through to me. On Thu, May 20, 2010 at 8:13 PM, Stef Mientki stef.mien...@gmail.com wrote: So I want to change the behavior of the class dynamically. I've done it by adding a global variable (Base_Grid_Double_Click) in the

Re: function that counts...

2010-05-20 Thread D'Arcy J.M. Cain
On Thu, 20 May 2010 19:53:42 + (UTC) Grant Edwards inva...@invalid.invalid wrote: Since Python is interactive, and you don't get charged for each time you run your deck through the reader, that's easy enough to check: Whoa! For a moment there I thought it was 1969. :-) -- D'Arcy J.M.

optional argument to a subclass of a class

2010-05-20 Thread Alex Hall
Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft(): def __init__(self, name, isAircraft=False, id=helpers.id(), hits=0, weapons=[]): self.name=name self.id=id

Re: optional argument to a subclass of a class

2010-05-20 Thread Patrick Maupin
On May 20, 9:56 pm, Alex Hall mehg...@gmail.com wrote: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft():  def __init__(self,  name,  isAircraft=False,  

Re: optional argument to a subclass of a class

2010-05-20 Thread Alex Hall
On 5/20/10, Patrick Maupin pmau...@gmail.com wrote: On May 20, 9:56 pm, Alex Hall mehg...@gmail.com wrote: Hi all, I am now trying to allow my classes, all of which subclass a single class (if that is the term), to provide optional arguments. Here is some of my code: class Craft(): def

Re: optional argument to a subclass of a class

2010-05-20 Thread alex23
Patrick Maupin pmau...@gmail.com wrote: One thing you can do is in battleship, you can accept additional keyword arguments:     def __init__(self, name, ..., **kw): Then you could invoke the superclass's init:     Craft.__init__(self, name, **kw) _All_ of which is covered in the tutorial.

Re: optional argument to a subclass of a class

2010-05-20 Thread Patrick Maupin
On May 20, 10:35 pm, Alex Hall mehg...@gmail.com wrote: So how do I get at anything inside **kw? Is it a list? It's a dictionary. Use *args for a list. (As with self, the name is whatever you want to use, but some sort of consistency is nice.) One of the cool things about Python is how easy

Re: optional argument to a subclass of a class

2010-05-20 Thread Alex Hall
On 5/20/10, alex23 wuwe...@gmail.com wrote: Patrick Maupin pmau...@gmail.com wrote: One thing you can do is in battleship, you can accept additional keyword arguments: def __init__(self, name, ..., **kw): Then you could invoke the superclass's init: Craft.__init__(self, name,

[issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace

2010-05-20 Thread Sergey Kirillov
Changes by Sergey Kirillov s...@rainboo.com: -- nosy: +rushman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3073 ___ ___ Python-bugs-list mailing

[issue8774] 0xe7 in ``heapq.__about__`` causes badness

2010-05-20 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: This is the problem with module tabnanny, it always tries to read the py source file as a platform-dependent encoded text module, that is, open the file with builtin function open(), and with no encoding parameters. It doesn't parse the encoding

[issue8774] 0xe7 in ``heapq.__about__`` causes badness

2010-05-20 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: I add tim_one to nosy list since I found this name in Misc/maintainers:tabnanny. Sorry if I did something improper. If this is really a problem, I'm glad to apply a patch for it. Thanks! -- nosy: +tim_one

[issue8772] sysconfig: _get_default_scheme can be made public?

2010-05-20 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Its a good idea to have that API. Now for the subscheme, def get_current_scheme(subscheme=oneof('default', 'home', 'user')): This doesn't work because the installed Python has already chosen a scheme between default or home. So I'd

[issue8774] 0xe7 in ``heapq.__about__`` causes badness

2010-05-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: PEP 8, section “encodings”, tells that stdlib source code in 3.x should always use ASCII or UTF-8, without encoding magic comment (since UTF-8 is the default now and ASCII is a subset of UTF-8); it explicitly mentions author names in comments

[issue8559] test_gdb: test_strings() fails with ASCII locale

2010-05-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: r81375 improves unicode support of libpython.py. I hope that it will be enough to fix test_strings() failures. Ok, buildbots seem happy: alpha Debian 3.x is green again. Python 3.1 doesn't have libpython.py: commit blocked

[issue8775] Use locale encoding to decode sys.argv, not the file system encoding

2010-05-20 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: The file system is hardcoded to UTF-8 on Mac OS X, whereas the locale encoding... depends on the locale. See issue #4388 for the details. I think that we should use the locale encoding to encode and decode command line

[issue8776] Bytes version of sys.argv

2010-05-20 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: In some situations, the encoding of the command line is incorrect or unknown. sys.argv is decoded with the file system encoding which can be wrong. Eg. see issue #4388 (ok, it's a bug, it should be fixed). As os.environb, it

[issue8776] Bytes version of sys.argv

2010-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: sys.argv is decoded with the file system encoding IIRC this is not exact. Py_Main signature is Py_Main(int argc, wchar_t **argv) then PyUnicode_FromWideChar is used, and there is no conversion (except from UCS4 to UCS2). The

[issue8760] Python 2.6.5 fails to build on AIX 5.3

2010-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: There is a message:: 'import site' failed; use -v for traceback what do you get when you run ./python -v? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue8776] Bytes version of sys.argv

2010-05-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The wchar_t strings themselves are built with mbstowcs(), the file system encoding is not used. Oops sorry, you are right, and it's worse :-) sys.argv is decoded using the locale encoding, but subprocess cie use the file system

[issue4388] test_cmd_line fails on MacOS X

2010-05-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I created to related issues: - #8775: Use locale encoding to decode sys.argv, not the file system encoding - #8776: Bytes version of sys.argv If #8775 is fixed, it should fix this issue too. --

[issue1512] Removal of stale code in pyconfig.h

2010-05-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I think there is harm in removing this block; it would cause PY_LONG_LONG not to be defined anymore. Closing as invalid. -- resolution: - invalid status: open - closed ___ Python tracker

[issue1445781] install fails on hard link

2010-05-20 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1445781 ___

[issue1855] Codepage unset in msilib.init_database()

2010-05-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: [The original link seems down; I found a similar description at http://msdn.microsoft.com/en-us/library/aa372049%28VS.85%29.aspx] I think you are misinterpreting the documentation. It doesn't say that the codepage property is required (in

[issue1884] msilib.SetProperty(msilib.PID_CODEPAGE, '1252') raises 0x65d = type mismatch

2010-05-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I fail to see the bug in this report. As you found out, you need to set the codepage property before setting any of the string properties. This is a requirement imposed by Microsoft, and has nothing to do with Python. --

[issue4388] test_cmd_line fails on MacOS X

2010-05-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: What if os.system(), os.execvp() and friends used wcstombs (or locale.preferredencoding) to convert arguments from unicode to bytes? this would at least guarantee round-trip when spawning another python interpreter. An interesting

[issue1542] Ship 32 and 64bit libs with MSI installer

2010-05-20 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1542 ___

[issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.)

2010-05-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fix the title: sys.argv is already decoded using the locale encoding on Unix, the problem is that it uses a (possibly) different encoding to encode command line arguments: file system encoding. -- title: Use locale

[issue1566260] Better order in file type descriptions

2010-05-20 Thread Martin v . Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1566260 ___

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Dan Buch
Changes by Dan Buch daniel.b...@gmail.com: -- title: 0xe7 in ``heapq.__about__`` causes badness - tabnanny improperly handles non-ascii source files ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8774

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Dan Buch
Changes by Dan Buch daniel.b...@gmail.com: Removed file: http://bugs.python.org/file17413/françois-pinard-killed-my-tabnanny.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8774 ___

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Dan Buch
Dan Buch daniel.b...@gmail.com added the comment: removed patch because the fix should be made to tabnanny itself -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8774 ___

[issue8739] Update to smtpd.py to RFC 5321

2010-05-20 Thread Alberto Trevino
Alberto Trevino albe...@byu.edu added the comment: I have attached a version 2 of the patch. This patch includes everything in the first version, and adds the following: - Support for help arguments (HELP MAIL, for example) - Support for setting the maximum message size from the command

[issue3132] implement PEP 3118 struct changes

2010-05-20 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: is that correct, or should the production list be something like: Yup, you are right. I will change the grammar. Whether these cases are valid or not (personally, I think they should be), we should add some tests for them. '' *is*

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-05-20 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: After looking in #4352 deep I figured out what true separation of filesystem default encoding and utf8 python namespace is really too complicated. For example import call stack chain converts module name from utf-8 to filesystem in

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-05-20 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8611 ___ ___

[issue3132] implement PEP 3118 struct changes

2010-05-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The possibility of mixing native size/alignment with standard size/alignment in a single format string makes me a bit uneasy I agree. It is hard for me to see how this might be used. Without having anything more constructive to add, I

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-20 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Thanks for the review. I incorporated the check re-orderings. I am also writing more tests. Which already exposed a subtly that I was not expecting: Python 3.2a0 (py3k:81284M, May 20 2010, 09:08:20) [GCC 4.2.1 (Apple Inc. build 5646)] on

[issue3132] implement PEP 3118 struct changes

2010-05-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the new patch. ... If un-aligned, native data-types are requested, then the endian specification is '^'. However, I am not quite sure how to interpret the last sentence. Hmm. Seems like the PEP authors are proposing a new

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It seems as if 'complex(n + delta) == n + delta' when 'delta' is even. For n = 2**53, and 0 = delta = 2**53, this sounds about right; the reason is that the numbers in the range [2**53, 2**54] that are exactly representable as an IEEE 754

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-05-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: As I wrote, I have an huge patch somewhere in my harddrive fixing this issue. But I don't want to publish it because it's really huge. I prefer to fix the problem step by step. I fixed most related issues: see the dependency list

[issue8771] Socket freezing under load issue on Mac.

2010-05-20 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@twistedmatrix.com added the comment: Have you looked at the number of TIME_WAIT sockets you have on the system when your benchmark gets to the 16000 request mark? This looks exactly like a regular TCP limitation to me. You'll find the limit on any platform, not

[issue8772] sysconfig: _get_default_scheme can be made public?

2010-05-20 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: On 2010-05-20, at 2:45 AM, Tarek Ziadé wrote: So I'd rather have two APIs answering to that: - get_current_scheme() : what's the default scheme for this python installation ? - get_current_user_scheme() : what's the default

[issue8765] Tests unwillingly writing unicocde to raw streams

2010-05-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The initial problem here is that we can't write unicode to a buffered binary stream (TypeError), but we can do it with an unbufferred raw stream - as the C implementation of the latter does string coercion instead of raising TypeError.

[issue8772] sysconfig: _get_default_scheme can be made public?

2010-05-20 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: removing 2.7 as a target -- it's too late If contribute a patch to `get_current_scheme` and `get_current_user_scheme`, will be accepted as part of 2.7? Roughly I would do something like this: scheme = os.name

[issue3132] implement PEP 3118 struct changes

2010-05-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: After a bit more thought (and after soliciting a couple of opinions on #python-dev), I'm convinced that endianness changes within a substruct should be local to that substruct: - it makes the meaning of '2T{HH}' both unsurprising and easy

  1   2   3   >