ANN: Shed Skin 0.6

2010-10-23 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.6, an optimizing (restricted-)Python-to-C++ compiler. Most importantly, this release comes with a substantial scalability improvement. It should now be possible to compile programs into several thousands of lines, as shown by the new Commodore 64 emulator

Request for comments on a design

2010-10-23 Thread TomF
I have a program that manipulates lots of very large indices, which I implement as bit vectors (via the bitarray module). These are too large to keep all of them in memory so I have to come up with a way to cache and load them from disk as necessary. I've been reading about weak references

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-23 Thread Lawrence D'Oliveiro
In message mailman.128.1287758336.2218.python-l...@python.org, Tim Golden wrote: If you were to rename the .py to a .pyw it would run without a console window showing up. Presumably the “w” stands for “window”. Wouldn’t it be less confusing if it was the other way round? --

Re: pythagorean triples exercise

2010-10-23 Thread Lawrence D'Oliveiro
In message 8idui6f21...@mid.individual.net, Peter Pearson wrote: Is it important to let a range all the way up to b, instead of stopping at b-1? (tongue in cheek) Makes no difference. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-23 Thread Chris Rebert
On Sat, Oct 23, 2010 at 12:32 AM, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.128.1287758336.2218.python-l...@python.org, Tim Golden wrote: If you were to rename the .py to a .pyw it would run without a console window showing up. Presumably the “w” stands

Re: Request for comments on a design

2010-10-23 Thread Peter Otten
TomF wrote: I have a program that manipulates lots of very large indices, which I implement as bit vectors (via the bitarray module). These are too large to keep all of them in memory so I have to come up with a way to cache and load them from disk as necessary. I've been reading about

Re: Python has a really hidden encapsulation?

2010-10-23 Thread dmytro starosud
:-0 very interesting! I've tried to run something like this: . class en_property(property): ptr_pget = None ptr_pset = None def pset(self, _class, value): if (self.ptr_pset is None or type(value) == tuple):

Re: Has Next in Python Iterators

2010-10-23 Thread Alexander Gattin
Hello, On Thu, Oct 21, 2010 at 12:26:50PM +, Steven D'Aprano wrote: I know what you're thinking: it's easy to cache the next result, and return it on the next call. But iterators can also be dependent on the time that they are called, like in this example: def evening_time():

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-23 Thread Lawrence D'Oliveiro
In message mailman.150.1287821953.2218.python-l...@python.org, Chris Rebert wrote: On Sat, Oct 23, 2010 at 12:32 AM, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.128.1287758336.2218.python-l...@python.org, Tim Golden wrote: If you were to rename the .py

mro() or __mro__?

2010-10-23 Thread Hrvoje Niksic
The documentation of the mro() method on the class object says: class.mro() This method can be overridden by a metaclass to customize the method resolution order for its instances. It is called at class instantiation, and its result is stored in __mro__. Am I interpreting it

ANN: Shed Skin 0.6

2010-10-23 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.6, an optimizing (restricted-)Python-to-C++ compiler. Most importantly, this release comes with a substantial scalability improvement. It should now be possible to compile programs into several thousands of lines, as shown by the new Commodore 64 emulator

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-23 Thread Dave Angel
On 2:59 PM, Lawrence D'Oliveiro wrote: In messagemailman.128.1287758336.2218.python-l...@python.org, Tim Golden wrote: If you were to rename the .py to a .pyw it would run without a console window showing up. Presumably the “w” stands for “window”. Wouldn’t it be less confusing if it was

Re: A good decorator library

2010-10-23 Thread Michele Simionato
On Oct 22, 10:42 pm, Felipe Bastos Nunes felipe.bast...@gmail.com wrote: Hi! I was looking for a good decorator library to study and make my own decorators. I've read the Bruce Eckel's blog at artima dot com. But I need some more examples. I'm building a WSN simulator like SHOX is in java, but

How to make a method into a property without using the @property decorator

2010-10-23 Thread Phlip
Pythonistas: Here's the property decorator: @property def foo(self): return 'bar' If I generate foo dynamically, how to I make it a property? setattr(self, 'foo', property(lambda: 'bar')) Variations of that are apparently not working. (I'm heading for a proxy pattern, where if you

Re: How to make a method into a property without using the @property decorator

2010-10-23 Thread Peter Otten
Phlip wrote: Pythonistas: Here's the property decorator: @property def foo(self): return 'bar' If I generate foo dynamically, how to I make it a property? setattr(self, 'foo', property(lambda: 'bar')) Variations of that are apparently not working. You have to put the

==Get an Internship in the United States ==

2010-10-23 Thread neha shena
==Get an Internship in the United States == Internships are practical experiences that bridge the gap between the educational world and the real world allowing students to understand what is really like to work in the industry of their choice. International internships offer much more than the

Re: mro() or __mro__?

2010-10-23 Thread Peter Otten
Hrvoje Niksic wrote: The documentation of the mro() method on the class object says: class.mro() This method can be overridden by a metaclass to customize the method resolution order for its instances. It is called at class instantiation, and its result is stored in __mro__.

measuring python code efficiency

2010-10-23 Thread n.a.s
Hi all, I use to program in many languages ,currently i 'm working in python ,i wonder if their is any way-program to measure my code , for example memory usage , cpu speed - because of the ability to write one program in many ways , how i can evaluate my code? Many thanks, n.a.s --

Re: IDLE debugger questions

2010-10-23 Thread Roger Davis
Thanks for that info, Ned, I can now get the sys.argv[] list I need, that's a big help! However, is there any other way to set a breakpoint in idle that will work on Mac OS X, maybe entering a manual command somewhere with a specified line number? Inability to set a breakpoint is an absolute

Re: Strong typing vs. strong testing [OT]

2010-10-23 Thread Mark Wooding
Steven D'Aprano steve-remove-t...@cybersource.com.au writes: Well, what is the definition of pi? Is it: the ratio of the circumference of a circle to twice its radius; the ratio of the area of a circle to the square of its radius; 4*arctan(1); the complex logarithm of -1 divided by the

Re: ftplib - Did the whole file get sent?

2010-10-23 Thread Sean DiZazzo
On Oct 22, 10:48 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 22 Oct 2010 22:03:38 -0700, Sean DiZazzo wrote: How can I assure him (and the client) that the transfer completed successfully like my log shows? It has worked well for many years, there are no

Re: measuring python code efficiency

2010-10-23 Thread Felipe Bastos Nunes
Theres the time module and the timeit() function to evaluate time to execute. For memory usage and cpu usage i can't remember exactly. I read the profile and cprofile documentation, and, in my opinion, help in somethings you wanna do. 2010/10/23, n.a.s nn.r...@gmail.com: Hi all, I use to

Re: pywebkit - python bindings for webkit DOM (alpha)

2010-10-23 Thread deostroll
Okay found the instruction to build the project on the site http://www.gnu.org/software/pythonwebkit/ Not sure how to apply the patch. I already have an installation of pythonwebkit. Should I uninstall it, download the source from http://code.google.com/p/pywebkitgtk and then apply the patch.

MATLAB:matplotlib::Mathematica::???

2010-10-23 Thread kj
Is there anything that does for Mathematica what matplotlib does for MATLAB? matplotlib, even in its underlying so-called OO mode, follows MATLAB's graphics model, which, in my very subjective opinion, is vastly inferior to Mathematica's. The latter allows for a clean separation between the

Re: measuring python code efficiency

2010-10-23 Thread n.a.s
Thanks Felipe , sure i will search for that.. Bests, n.a.s On Sat, Oct 23, 2010 at 7:11 PM, Felipe Bastos Nunes felipe.bast...@gmail.com wrote: Theres the time module and the timeit() function to evaluate time to execute. For memory usage and cpu usage i can't remember exactly. I read the

Re: How to make a method into a property without using the @property decorator

2010-10-23 Thread Phlip
On Oct 23, 8:01 am, Peter Otten __pete...@web.de wrote: You may be better off with __getattr__(). Ayup, thanks. (Maybe I should have googled for python equivalent of ruby method_missing, hmm?;) -- http://mail.python.org/mailman/listinfo/python-list

ANNOUNCE: PYBAG v0.4.0

2010-10-23 Thread Aleksey
This is first PYBAG announce on comp.lang.python. PYBAG implements a portable bag and is intended for fast synchronization and backup. It lets you use a portable digital storage device to carry your electronic documents similar to the way you can use a bag to carry paper documents. You can

Re: 64 bit offsets?

2010-10-23 Thread Martin v. Loewis
Am 07.10.2010 23:20, schrieb MRAB: On 07/10/2010 20:12, jay thompson wrote: I'm not sure if it is limited to 32 bit addresses or if it's only re.start() that is limited to 'em. jt From what I can tell, Microsoft compilers (I'm assuming you're using Windows) have a 32-bit 'int' type for

Re: Request for comments on a design

2010-10-23 Thread TomF
On 2010-10-23 01:50:53 -0700, Peter Otten said: TomF wrote: I have a program that manipulates lots of very large indices, which I implement as bit vectors (via the bitarray module). These are too large to keep all of them in memory so I have to come up with a way to cache and load them from

Re: Python has a really hidden encapsulation?

2010-10-23 Thread Arnaud Delobelle
dmytro starosud d.staro...@gmail.com writes: I think I'm being realized that Python allows to do everything. Maybe I will not try to find really hidden encapsulation. :) I think it's a wise decision :) Just to challenge you a bit, here is another (doomed) attempt at having private attributes

TRANSFER 300$ To Your EFT Account By Just ONE CLICK From OTHER Account

2010-10-23 Thread hollywood
The FORM is in the IMAGE below the SEARCH BOX...CLICK on the IMAGE for the FORM of TRANSFERhttp://moneymaking.en.st -- http://mail.python.org/mailman/listinfo/python-list

Re: Python has a really hidden encapsulation?

2010-10-23 Thread Emile van Sebille
On 10/23/2010 11:51 AM Arnaud Delobelle said... Just to challenge you a bit, here is another (doomed) attempt at having private attributes for object instances: def private_maker(): class Private: pass privmap = {} def private(f): def wrapper(self, *args, **kwargs):

Re: Python has a really hidden encapsulation?

2010-10-23 Thread Arnaud Delobelle
Emile van Sebille em...@fenx.com writes: On 10/23/2010 11:51 AM Arnaud Delobelle said... Just to challenge you a bit, here is another (doomed) attempt at having private attributes for object instances: [...] I'm obviously missing something: ActivePython 2.6.1.1 (ActiveState Software Inc.)

Re: pythagorean triples exercise

2010-10-23 Thread Terry Reedy
On 10/23/2010 3:34 AM, Lawrence D'Oliveiro wrote: In message8idui6f21...@mid.individual.net, Peter Pearson wrote: Is it important to let a range all the way up to b, instead of stopping at b-1? (tongue in cheek) Makes no difference. :) The difference is that before one writes the

Re: Python has a really hidden encapsulation?

2010-10-23 Thread Emile van Sebille
On 10/23/2010 11:51 AM Arnaud Delobelle said... Can you change the value of a.x? (Hint: my shortest solution is of the form A.*.*[*].*[*].x = 3) A.x,a.x = a.x,3 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python has a really hidden encapsulation?

2010-10-23 Thread Arnaud Delobelle
Emile van Sebille em...@fenx.com writes: On 10/23/2010 11:51 AM Arnaud Delobelle said... Can you change the value of a.x? (Hint: my shortest solution is of the form A.*.*[*].*[*].x = 3) A.x,a.x = a.x,3 I knew that was going to come next! That'll teach me not to specify the problem

inline for and if

2010-10-23 Thread Guy Doune
Hello, I would get : db.table.field1, db.table.field2, etc. Inside a python instruction : db().select(HERE) It is web2py query actually. But I can't do this : db().select(for f in db['table'].fields:    if f not in fieldsBlackList:         db['table'][f],) Any idea? --

yield all entries of an iterable

2010-10-23 Thread Sebastian
Hi, Is there a simpler way to yield all elements of a sequence than this? for x in xs: yield x I tried googling but fond only the other direction (turning a generator into a list with list(my_generator()). Sebastian -- http://mail.python.org/mailman/listinfo/python-list

Perforce integrate using p4 module

2010-10-23 Thread Eric_NYRelEng
Does anyone have any example with perforce integrate command? Please help —Code Snippet— import P4 ##set p4.port, p4.client p4c = P4.P4() p4c.connect() view = “//depot/meta/project/frombranch/...//depot/meta/project/ tobranch/... p4c.run(“integ –n”,view) —Getting— return

A question I have...

2010-10-23 Thread Joe Shoulak
I'm trying to make a sports simulation program and so far everything has worked until I try entering: Score1 = (Team1Off + Team2Def)/2 I get the error: TypeError: unsupported operand type(s) for /: 'str' and 'int' Can someone please explain to me what this means, why it doesn't work and what

Re: inline for and if

2010-10-23 Thread Chris Rebert
On Wed, Oct 20, 2010 at 11:28 AM, Guy Doune cesium5...@yahoo.ca wrote: Hello, I would get : db.table.field1, db.table.field2, etc. Inside a python instruction : db().select(HERE) It is web2py query actually. But I can't do this : db().select( for f in db['table'].fields:     if f not in

Re: yield all entries of an iterable

2010-10-23 Thread Chris Rebert
On Wed, Oct 20, 2010 at 3:27 PM, Sebastian sebastianspublicaddr...@googlemail.com wrote: Hi, Is there a simpler way to yield all elements of a sequence than this? for x in xs:    yield x Not presently. There's a related PEP under discussion though: PEP 380: Syntax for Delegating to a

Re: A question I have...

2010-10-23 Thread geremy condra
On Thu, Oct 21, 2010 at 7:25 PM, Joe Shoulak joepshou...@yahoo.com wrote: I'm trying to make a sports simulation program and so far everything has worked until I try entering: Score1 = (Team1Off + Team2Def)/2 I get the error: TypeError: unsupported operand type(s) for /: 'str' and 'int'

Re: A question I have...

2010-10-23 Thread Vlastimil Brom
2010/10/22 Joe Shoulak joepshou...@yahoo.com: I'm trying to make a sports simulation program and so far everything has worked until I try entering: Score1 = (Team1Off + Team2Def)/2 I get the error: TypeError: unsupported operand type(s) for /: 'str' and 'int' Can someone please explain

Re: A question I have...

2010-10-23 Thread Chris Rebert
On Thu, Oct 21, 2010 at 7:25 PM, Joe Shoulak joepshou...@yahoo.com wrote: I'm trying to make a sports simulation program and so far everything has worked until I try entering: Score1 = (Team1Off + Team2Def)/2 I get the error: TypeError: unsupported operand type(s) for /: 'str' and 'int'

Background image with Tkinter

2010-10-23 Thread Emeka
Hello All, I know this is pretty easy to do, but I was not able to to do it because I am new to GUI and Python. I am using grid to manager my layout and I would like to add background image to one of my cells (say row=1 column=3), I intend to have a label (text ) written on top of the image.

A Unique XML Parsing Problem

2010-10-23 Thread Devon
I must quickly and efficiently parse some data contained in multiple XML files in order to perform some learning algorithms on the data. Info: I have thousands of files, each file corresponds to a single song. Each XML file contains information extracted from the song (called features). Examples

Re: A Unique XML Parsing Problem

2010-10-23 Thread Chris Rebert
On Sat, Oct 23, 2010 at 4:40 PM, Devon dshur...@gmail.com wrote: I must quickly and efficiently parse some data contained in multiple XML files in order to perform some learning algorithms on the data. Info: I have thousands of files, each file corresponds to a single song. Each XML file

Re: OO and game design questions

2010-10-23 Thread Gregory Ewing
Jonathan Hartley wrote: One common way to store delayed actions is as a lambda (an anonymous function.) Although note that you don't have to use 'lambda' in particular -- functions defined with 'def' can be used the same way. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

numpad in idle

2010-10-23 Thread Jah_Alarm
hi, here's my problem: I'm running IDLE in Ubuntu. For some reason numpad buttons do not work. I'm kinda used to this layout. Doesn anyone have an idea on how to switch it on? cheers, Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-23 Thread Lawrence D'Oliveiro
In message mailman.154.1287832721.2218.python-l...@python.org, Dave Angel wrote: Presumably the original pythonw.exe was called that because it's marked as a windows-app. In win-speak, that means it has a gui. Applications that are not so-marked are console-apps, and get a console created if

Re: A Unique XML Parsing Problem

2010-10-23 Thread Lawrence D'Oliveiro
In message 0af3e9b1-8d3d-4efd-99d6-ca033204e...@n26g2000yqh.googlegroups.com, Devon wrote: I have heard about Beautiful Soup but never used it. BeautifulSoup is intended for HTML parsing. It is, or was, particularly good at dealing with badly-formed HTML, as commonly found on lots of

Re: numpad in idle

2010-10-23 Thread rantingrick
On Oct 23, 7:41 pm, Jah_Alarm jah.al...@gmail.com wrote: here's my problem: I'm running IDLE in Ubuntu. For some reason numpad buttons do not work. I'm kinda used to this layout. Doesn anyone have an idea on how to switch it on? Sure, look directly above the number pad and you will see a

Re: pythagorean triples exercise

2010-10-23 Thread Tim Roberts
Baba raoul...@gmail.com wrote: i need a hint regarding the following exercise question: Write a program that generates all Pythagorean triples whose small sides are no larger than n. Try it with n = 200. what is n ? i am guessing that it is a way to give a bound to the triples to be returned

Re: A good decorator library

2010-10-23 Thread Tim Roberts
Felipe Bastos Nunes felipe.bast...@gmail.com wrote: Hi! I was looking for a good decorator library to study and make my own decorators. I've read the Bruce Eckel's blog at artima dot com. But I need some more examples. I'm building a WSN simulator like SHOX is in java, but programming it in

Re: numpad in idle

2010-10-23 Thread Aram Ter-Sarkissov
On 24 окт, 16:44, rantingrick rantingr...@gmail.com wrote: On Oct 23, 7:41 pm, Jah_Alarm jah.al...@gmail.com wrote: here's my problem: I'm running IDLE in Ubuntu. For some reason numpad buttons do not work. I'm kinda used to this layout. Doesn anyone have an idea on how to switch it on?

Get 899$ To Your PAYPAL Account ( There is a FORM )

2010-10-23 Thread baptist
CLICK on the IMAGE below the SEARCH BOX for the FORMhttp://moneymaking.en.st -- http://mail.python.org/mailman/listinfo/python-list

Python 2.7 parser bug on syntax for set literals ?

2010-10-23 Thread Steve Howe
Hello, This looks like a parser bug, but it's so basic I'm in doubt. Can anyone confirm ? import sys sys.version '2.7.0+ (r27:82500, Sep 15 2010, 18:14:55) \n[GCC 4.4.5]' ({'', 1}.items()) Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'set' object has no

Re: Python 2.7 parser bug on syntax for set literals ?

2010-10-23 Thread Jerry Hill
On Sun, Oct 24, 2010 at 12:40 AM, Steve Howe howest...@googlemail.com wrote: Hello, This looks like a parser bug, but it's so basic I'm in doubt. Can anyone confirm ? import sys sys.version '2.7.0+ (r27:82500, Sep 15 2010, 18:14:55) \n[GCC 4.4.5]' ({'', 1}.items()) Traceback (most recent

Re: Python 2.7 parser bug on syntax for set literals ?

2010-10-23 Thread geremy condra
On Sat, Oct 23, 2010 at 9:40 PM, Steve Howe howest...@googlemail.com wrote: Hello, This looks like a parser bug, but it's so basic I'm in doubt. Can anyone confirm ? import sys sys.version '2.7.0+ (r27:82500, Sep 15 2010, 18:14:55) \n[GCC 4.4.5]' ({'', 1}.items()) Traceback (most recent

Exception Handling in Python 3

2010-10-23 Thread Steve Holden
I was somewhat surprised to discover that Python 3 no longer allows an exception to be raised in an except clause (or rather that it reports it as a separate exception that occurred during the handling of the first). So the following code: d = {} try: ... val = d['nosuch'] ... except: ...

Re: numpad in idle

2010-10-23 Thread Alex
thanks, but this doesn't solve the problem, because I need to use the numpad as a cursor, not to enter numbers. cheers, Alex On 24 окт, 16:44, rantingrick rantingr...@gmail.com wrote: On Oct 23, 7:41 pm, Jah_Alarm jah.al...@gmail.com wrote: here's my problem: I'm running IDLE in Ubuntu. For

Re: Exception Handling in Python 3

2010-10-23 Thread Chris Rebert
On Sat, Oct 23, 2010 at 10:01 PM, Steve Holden st...@holdenweb.com wrote: I was somewhat surprised to discover that Python 3 no longer allows an exception to be raised in an except clause (or rather that it reports it as a separate exception that occurred during the handling of the first). snip

Re: Python 2.7 parser bug on syntax for set literals ?

2010-10-23 Thread Steve Howe
Hello Geremy, The whole point is, is not supposed to be a set; a set literal would end with }). As you can see, there is no such construct in the string. It's just a dict inside parentheses. Somehow, the parser seems to think it's a set. -- Howe howest...@gmail.com On Sun, Oct 24, 2010 at

Re: Python 2.7 parser bug on syntax for set literals ?

2010-10-23 Thread Steve Howe
Ok, forget, I found the problem: bad sleeping. Thanks. -- Howe howest...@gmail.com On Sun, Oct 24, 2010 at 3:31 AM, Steve Howe howest...@googlemail.com wrote: Hello Geremy, The whole point is, is not supposed to be a set; a set literal would end with }). As you can see, there is no such

Re: Python 2.7 parser bug on syntax for set literals ?

2010-10-23 Thread Steve Holden
Geremy and the parser are correct - it *is* a set. It would only be a dict if you changed the comma to a colon. regards Steve On 10/24/2010 1:31 AM, Steve Howe wrote: Hello Geremy, The whole point is, is not supposed to be a set; a set literal would end with }). As you can see, there is

Re: Python 2.7 parser bug on syntax for set literals ?

2010-10-23 Thread Ned Deily
In article aanlktimy1btoug8wrxr==ejun_4opvsuqmzfd8dwz...@mail.gmail.com, Steve Howe howest...@googlemail.com wrote: The whole point is, is not supposed to be a set; a set literal would end with }). As you can see, there is no such construct in the string. It's just a dict inside parentheses.

Re: Exception Handling in Python 3

2010-10-23 Thread Steve Holden
On 10/24/2010 1:26 AM, Chris Rebert wrote: I was somewhat surprised to discover that Python 3 no longer allows an exception to be raised in an except clause (or rather that it reports it as a separate exception that occurred during the handling of the first). snip [snip] What is the

[issue10160] operator.attrgetter slower than lambda after adding dotted names ability

2010-10-23 Thread Christos Georgi ou
Χρήστος Γεωργίου (Christos Georgiou) t...@users.sourceforge.net added the comment: A newer version of the patch with the following changes: - single loop in the ag-attr setup phase of attrgetter_new; interning of the stored attribute names - added two more tests of invalid attrgetter

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-23 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Same errors. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6011 ___ ___ Python-bugs-list

[issue10077] Python 3.1: site error is not logged

2010-10-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Commited to Python 3.1 (r85802). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10077

[issue10174] multiprocessing expects sys.stdout to have a fileno/close method.

2010-10-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Library (Lib) -None nosy: +asksol, jnoller versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10174

[issue10174] multiprocessing expects sys.stdout to have a fileno/close method.

2010-10-23 Thread Ask Solem
Ask Solem a...@opera.com added the comment: Please add the traceback, I can't seem to find any obvious places where this would happen now. Also, what version are you currently using? I agree with the fileno, but I'd say close is a reasonable method to implement, especially for

[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread ptz
New submission from ptz ppt...@gmail.com: In Python 2.4, Assuming we've imported telnetlib, the following works: f = telnetlib.Telnet(some_text_based_server) f.read_very_eager() The last call outputs the text that the server outputs upon connection (e.g. login: ). However, if we

[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Presumably the difference is that there is a pause between the two statement executions at the interactive prompt (even if you cut and paste) that does not exist in the function. -- nosy: +r.david.murray resolution: - invalid

[issue10118] Tkinter does not find font

2010-10-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Terry meant 2.6 is in security fix only mode. 2.7 will get bug fixes for an extended period. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue10178] PEP 378 uses replace where translate may work better

2010-10-23 Thread samwyse
New submission from samwyse samw...@gmail.com: PEP 378 states; format(n, 6,f).replace(,, X).replace(., ,).replace(X, .) This is complex and relatively slow. A better technique, which IMHO the proposal should high-lighted, would be: swap_commas_and_periods = bytes.maketrans(b',.', b'.,')

[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-10-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The attached patch should fix the problem. It replicates the bytes/string changes made for the unix branch in the windows branch. It would be nice to come up with a unit test for this, but in this case that's a lot more complicated

[issue10178] PEP 378 uses replace where translate may work better

2010-10-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The text in question is talking about 'replace' as a general mechanism for 'fixing' the separator character, and as such I don't think introducing translate would enhance the exposition. I suppose it could be added in a footnote.

[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This network drive is actually mapped through the VirtualBox guest additions. Under Python 2.7 (official 64-bit MSI installer), this works fine: s = 'Z:\\__svn__\\Lib\\test\\keycert.pem' os.stat(s) nt.stat_result(st_mode=33206, st_ino=0L,

[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: And 3.1 works fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10179 ___ ___

[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hmm, it looks like this is actually VirtualBox-specific. It works with another network drive mapped on Y: os.stat(ry:) nt.stat_result(st_mode=16895, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0, st_atime=1287784175,

[issue6668] locale.py: can't parse sr...@latin locale

2010-10-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Python 3.2a3+ (py3k:85670:85675M, Oct 17 2010, 20:27:19) [GCC 4.4.4] on linux2 Type help, copyright, credits or license for more information. import locale locale.setlocale(locale.LC_ALL)

[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread ptz
ptz ppt...@gmail.com added the comment: Strange. I was certain that I tried inserting a time.sleep() in the function and it still didn't work, but I tried it just now and it does work as expected. Sorry, and thanks for your answer, at least I learned something. --

[issue10157] Refleaks in pythonrun.c

2010-10-23 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: After taking the scenic route through half of the tree[1], I finally found another leak in pythonrun.c. I'm closing #10153, merging those two leaks into the new patch. Does it look ok? [1] Valgrind stack traces should be approached

[issue10153] Memory leak in pythonrun.c

2010-10-23 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- resolution: - duplicate stage: patch review - committed/rejected status: open - closed superseder: - Refleaks in pythonrun.c ___ Python tracker rep...@bugs.python.org

[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Well, perhaps when you ran the test with the sleep the target server had an unusually long startup delay. If you are going to use read_very_eager you are going to have to deal with the possibility of not getting back what you expected,

[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Let me guess: It's GetFinalPathNameByHandle that is failing. Put some debug output right after the call to verify. Why is this critical? Not being able to stat VirtualBox folders doesn't sound that critical to me. -- nosy: +loewis

[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Yes, indeed. It was critical before I found out that it's VirtualBox-specific. -- priority: critical - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10179

[issue10179] os.stat fails on mapped network drive

2010-10-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This patch seems to do the trick, although I'm not sure it warrants including in Python. -- keywords: +patch Added file: http://bugs.python.org/file19342/osstat.patch ___ Python tracker

[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: This problem causes {{{os.getcwdu()}}} to fail when the console code page is set to 65001 (always, I think): {{{ t:\ver Microsoft Windows [Version 6.0.6002] t:\chcp Active code page: 65001 t:\python -c import os; print

[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: I said: There is only one correct way to encode/decode UTF-8. This is true modulo differences in the treatment of initial byte order marks. -- ___ Python tracker rep...@bugs.python.org

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Thank you. Applied in r85803. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Case's patch fixes test_builtin and test_complex failures on Windows 7 64-bit. But there's still a failure in test_dictviews: == FAIL: test_items_set_operations

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list

[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: I meant to say that the os.getcwdu() test in msg119440 was done with Windows native Python 2.6.2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6058

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778 ___ ___ Python-bugs-list

[issue10178] PEP 378 uses replace where translate may work better

2010-10-23 Thread samwyse
samwyse samw...@gmail.com added the comment: The text in question is also talking about the problems with using 'replace' to swap pairs of characters, so a better, alternate, process would be valuable, especially for anyone unaware of the translate method. --

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-10-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This patch seems to fix all aforementioned failures. -- Added file: http://bugs.python.org/file19343/hashw64.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9778

[issue6058] Add cp65001 to encodings/aliases.py

2010-10-23 Thread David-Sarah Hopwood
David-Sarah Hopwood david-sa...@jacaranda.org added the comment: Oops, false alarm. python -c import os; print repr(os.getcwdu()) works as expected, so the exception is part of issue 1602. (My command about there being no need to distinguish this codepage from UTF-8 stands.) --

  1   2   >