pyPEG 2.5 released

2012-06-13 Thread Volker Birk
This release offers support for Python 2.7 and to 3.x. pyPEG is a plain and simple intrinsic parser interpreter framework for Python version 2.7 and 3.x. It is based on Parsing Expression Grammar, PEG. With pyPEG you can parse and compose many formal languages in a very easy way. pyPEG supports

Internationalized domain names not working with URLopen

2012-06-13 Thread John Nagle
I'm trying to open http://пример.испытание with urllib2.urlopen(s1) in Python 2.7 on Windows 7. This produces a Unicode exception: s1 u'http://\u043f\u0440\u0438\u043c\u0435\u0440.\u0438\u0441\u043f\u044b\u0442\u0430\u043d\u0438\u0435' fd = urllib2.urlopen(s1) Traceback (most recent call

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread Andrew Berg
On 6/13/2012 1:17 AM, John Nagle wrote: What does urllib2 want? Percent escapes? Punycode? Looks like Punycode is the correct answer: https://en.wikipedia.org/wiki/Internationalized_domain_name#ToASCII_and_ToUnicode I haven't tried it, though. -- CPython 3.3.0a3 | Windows NT 6.1.7601.17790

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread Виталий Волков
Answer in this topic should help you to solve issue. http://stackoverflow.com/questions/8152161/open-persian-url-domains-with-urllib2?answertab=active#tab-top Regards. 2012/6/13 John Nagle na...@animats.com I'm trying to open http://пример.испытание http://xn--e1afmkfd.xn--80akhbyknj4f

Re: Using pdb with greenlet?

2012-06-13 Thread Dieter Maurer
Salman Malik salma...@live.com writes: I am sort of a newbie to Python ( have just started to use pdb). My problem is that I am debugging an application that uses greenlets and when I encounter something in code that spawns the coroutines or wait for an event, I lose control over the

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Steven D'Aprano
On Tue, 12 Jun 2012 12:36:36 +0200, Gilles wrote: I enjoy writing scripts in Python much more than PHP, but with so many sites written in PHP, I need to know what major benefits there are in choosing Python (or Ruby, ie. not PHP). The main benefit is that they are not PHP.

Re: multiprocessing: excepthook not getting called

2012-06-13 Thread Philipp Hagemeister
multiprocessing just mimicks the threading module here, see http://bugs.python.org/issue1230540 . Why do you need excepthook in the first place? You can perfectly simulate it by wrapping the root method (target in your example) in a try .. catch: import multiprocessing import sys def

Re: multiprocessing: excepthook not getting called

2012-06-13 Thread Philipp Hagemeister
On 06/13/2012 11:00 AM, Dave Cook wrote: Originally, I was trying to send formatted tracebacks back to the main process on a queue. You can still do that: import multiprocessing import sys def queueErrors(q): def decorator(func): def wrapped(*args, **kwargs): try:

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 10:19:29 +1000, Chris Angelico ros...@gmail.com wrote: It's far simpler to manage, it retains running state, and is easily enough encapsulated. It's the non-magic way of doing things. Also, it plays very nicely with the MUD style of process, which is something I do a lot with

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On 13 Jun 2012 08:29:05 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ and especially lack PHP's security vulnerabilities. Thanks for the link. -- http://mail.python.org/mailman/listinfo/python-list

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Tue, 12 Jun 2012 16:48:27 +0200, Matej Cepl mc...@redhat.com wrote: I don't think it is a proper description of the situation (please, somebody correct my mistakes, I am not 100% sure about it myself). WSGI applications (which is basically all web applications in Python) could run in the

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Chris Angelico
On Wed, Jun 13, 2012 at 7:25 PM, Gilles nos...@nospam.com wrote: I have a couple more questions: 1. Today what is the recommended way to connect a long-running Python web application with a web server running in the front? FastCGI? WSGI? Other? 2. Which solid web server is recommended to

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 19:41:41 +1000, Chris Angelico ros...@gmail.com wrote: For high-availability servers, I can't speak for Python, as I've never done that there; but it seems likely that there's good facilities. My personal preference is Pike, but that's off-topic for this list. :) But the simple

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Chris Angelico
On Wed, Jun 13, 2012 at 7:49 PM, Gilles nos...@nospam.com wrote: On Wed, 13 Jun 2012 19:41:41 +1000, Chris Angelico ros...@gmail.com wrote: For high-availability servers, I can't speak for Python, as I've never done that there; but it seems likely that there's good facilities. My personal

validating XML

2012-06-13 Thread andrea crotti
Hello Python friends, I have to validate some xml files against some xsd schema files, but I can't use any cool library as libxml unfortunately. A Python-only validator might be also fine, but all the projects I've seen are partial or seem dead.. So since we define the schema ourselves, I was

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 20:00:59 +1000, Chris Angelico ros...@gmail.com wrote: Most high level languages probably have some sort of HTTP server available. Some make it trivially easy to plug some code in and start serving. Python is advertised as batteries included, and one of its packets of batteries

network protocols

2012-06-13 Thread Tarek Ziadé
Hey I was surprised not to find any way to list all protocol names listed in /etc/protocols in Python We have socket.getprotobyname(NAME) But there's no way to get the list of names Any ideas if this is available in the stdlib somehwere ? Thx Tarek --

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-13 Thread Wolfgang Keller
* Domain experts in fact who would need to implement loads of software to help them get their work done but can't. And since there's no budget for external developers, nothing get's ever done about this. Well, typically or at least very often sooner or later something gets done about

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-13 Thread Wolfgang Keller
Tkinter is imho honestly the very best argument if you want to make potential new users turn their backs away from Python for good. Just show them one GUI implemented with it and, hey, wait, where are you running to... Yes, Tkinter GUI's are very ugly.

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-13 Thread Wolfgang Keller
No matter how cool it may seem to create simple GUIs manually or to write business letters using LaTeX: just try to persuade people to move from Word to LaTeX for business letters... Good example. I have done nearly exactly this* - but it was only possible thanks to LyX. Sincerely, Wolfgang

RE: network protocols

2012-06-13 Thread John Sutterfield
Tarek, There doesn't appear to be a function in stdlib to cover that particular case. Doug Hellman has a nice section on finding service info here: http://www.doughellmann.com/PyMOTW/socket/addressing.html It wouldn't be built-in, but it looks like it would be pretty simple to get the

Re: Ann: New Stackless Website

2012-06-13 Thread Peter Funk
Christian Tismer wrote on monday, 11.06.2012 at 19:01: ... Stackless Python has a New Website ... Due to a great effort of the Nagare people: http://www.nagare.org/ and namely by the tremendous work of Alain Pourier, Stackless Python has now a new website! This is no longer Plone

Re: network protocols

2012-06-13 Thread Verde Denim
On 6/13/12, John Sutterfield jsutte...@hotmail.com wrote: Tarek, There doesn't appear to be a function in stdlib to cover that particular case. Doug Hellman has a nice section on finding service info here: http://www.doughellmann.com/PyMOTW/socket/addressing.html It wouldn't be

Re: network protocols

2012-06-13 Thread Christian Heimes
Am 13.06.2012 13:41, schrieb Tarek Ziadé: Hey I was surprised not to find any way to list all protocol names listed in /etc/protocols in Python We have socket.getprotobyname(NAME) But there's no way to get the list of names Any ideas if this is available in the stdlib somehwere ?

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Christian Heimes
Am 12.06.2012 11:39, schrieb Gilles: I notice that Python-based solutions are usually built as long-running processes with their own web server (or can run in the back with eg. Nginx and be reached through eg. FastCGI/WSGI ) while PHP is simply a language to write scripts and requires a web

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread Hemanth H.M
Well not really! does not work with '☃.net' Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.6/urllib2.py, line 126, in urlopen return _opener.open(url, data, timeout) File /usr/lib/python2.6/urllib2.py, line 391, in open response =

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread Hemanth H.M
My bad, it worked; need to avoid http:// along with snowman, before encode. On Wed, Jun 13, 2012 at 9:02 PM, Hemanth H.M hemanth...@gmail.com wrote: Well not really! does not work with '☃.net' Traceback (most recent call last): File stdin, line 1, in module File

Re: validating XML

2012-06-13 Thread andrea crotti
So as far as I understood what I should do is the following. Go through my own XML keeping track of the full path of everything for example SETUP SETUP/COMMENT SETUP/OTHER and so on, then for every entry found in this iteration, check the schema to make sure that that particular construct is

Re: validating XML

2012-06-13 Thread Dieter Maurer
andrea crotti andrea.crott...@gmail.com writes: Hello Python friends, I have to validate some xml files against some xsd schema files, but I can't use any cool library as libxml unfortunately. Why? It seems not very rational to implement a complex task (such as XML-Schema validation) when

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-13 Thread rdsteph
I think this is the wave of the furture for deploying simple programs to many users. It is almost 100% cross platform (can be used on desktop, smartphone, tablet, windows, linux, mac etc) and is very easy to do, even for casual non-programmers who do a little programming (such as many

Re: validating XML

2012-06-13 Thread Stefan Behnel
andrea crotti, 13.06.2012 12:06: Hello Python friends, I have to validate some xml files against some xsd schema files, but I can't use any cool library as libxml unfortunately. Any reason for that? Because the canonical answer to your question would be lxml, which uses libxml2. Stefan --

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Grant Edwards
On 2012-06-13, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Tue, 12 Jun 2012 12:36:36 +0200, Gilles wrote: I enjoy writing scripts in Python much more than PHP, but with so many sites written in PHP, I need to know what major benefits there are in choosing Python (or Ruby,

RE: [newbie] Equivalent to PHP?

2012-06-13 Thread Prasad, Ramit
Thanks for the longer explanation. With so many frameworks, I'd like to know what benefits they offer as compared to writing an application from scratch, and if they do offer obvious benefits, which one to pick I am going to state up front that I have never tried any of the frameworks so take

Re: which one do you prefer? python with C# or java?

2012-06-13 Thread Tomasz Rola
On Tue, 12 Jun 2012, Tim Johnson wrote: I concur, I worked in C and C++ for 12 years. I added C++ later in my programming life. I don't recommend C++ for single programmers. - that is to say - 1 coder for 1 codebase. One can do good enough OOP in ansi C believe it or not, I learned

Re: network protocols

2012-06-13 Thread Christian Heimes
Am 13.06.2012 16:56, schrieb Christian Heimes: Am 13.06.2012 13:41, schrieb Tarek Ziadé: Hey I was surprised not to find any way to list all protocol names listed in /etc/protocols in Python We have socket.getprotobyname(NAME) But there's no way to get the list of names Any ideas if

Re: network protocols

2012-06-13 Thread Tarek Ziadé
On 6/13/12 8:33 PM, Christian Heimes wrote: Am 13.06.2012 16:56, schrieb Christian Heimes: Am 13.06.2012 13:41, schrieb Tarek Ziadé: Hey I was surprised not to find any way to list all protocol names listed in /etc/protocols in Python We have socket.getprotobyname(NAME) But there's no way

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 18:01:23 +, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Maybe this article will help you http://www.infoworld.com/d/application-development/pillars-python-six-python-web-frameworks-compared-169442 The comments on /. should round out anything missing from the article (I

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 17:27:21 +0200, Christian Heimes li...@cheimes.de wrote: A long running process has lots of benefits that makes design and development easier and makes your app faster. Thanks much for the infos. Makes you wonder why commercial companies still choose PHP to write their web

Pytz error: unpack requires a string argument of length 44

2012-06-13 Thread bringa
Hi! I'm trying to get a handle on pytz (http://pytz.sourceforge.net/). I don't have root on the system I'll be running my script on, so I need to go for a local installation. I copied pytz into a folder in my sys.path and am importing from there. That part seems to work. I downloaded the

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Christian Heimes
Am 13.06.2012 22:48, schrieb Gilles: On Wed, 13 Jun 2012 17:27:21 +0200, Christian Heimes li...@cheimes.de wrote: A long running process has lots of benefits that makes design and development easier and makes your app faster. Thanks much for the infos. Makes you wonder why commercial

Re: Pytz error: unpack requires a string argument of length 44

2012-06-13 Thread Terry Reedy
On 6/13/2012 4:55 PM, bri...@gmail.com wrote: Hi! I'm trying to get a handle on pytz (http://pytz.sourceforge.net/). I don't have root on the system I'll be running my script on, so I need to go for a local installation. I copied pytz into a folder in my sys.path and am importing from there.

Re: Pytz error: unpack requires a string argument of length 44

2012-06-13 Thread bringa
Thanks Terry! There indeed seems to be something wrong with my installation of pytz. I had a look around the zoneinfo dir, which is where build_tzinfo polls its info from, and a whole bunch of files are 0 bytes. Whenever I try to instantiate a timezone whose corresponding file is 0 bytes I

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Steven D'Aprano
On Wed, 13 Jun 2012 12:17:12 +0200, Gilles wrote: Thanks for the longer explanation. With so many frameworks, I'd like to know what benefits they offer as compared to writing an application from scratch Surely the obvious answer is that a framework offers the benefit that you don't have to

RE: Pytz error: unpack requires a string argument of length 44

2012-06-13 Thread Prasad, Ramit
There indeed seems to be something wrong with my installation of pytz. I had a look around the zoneinfo dir, which is where build_tzinfo polls its info from, and a whole bunch of files are 0 bytes. Whenever I try to instantiate a timezone whose corresponding file is 0 bytes I get that error

When adding my application to Windows right-click menu

2012-06-13 Thread Yesterday Paid
I made a cipher app but to make easy, I want to make it Windows rightclick menu can execute it I found the way with dealing with Registry [HKEY_CLASSES_ROOT\Directory\Background\shell\app] [HKEY_CLASSES_ROOT\Directory\Background\shell\app\command] @=C;\myapp filelocation but I don't know how

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On 13 Jun 2012 22:16:51 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Surely the obvious answer is that a framework offers the benefit that you don't have to write the application from scratch. Yes, but between receiving the query and sending the response, what features do

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 23:16:31 +0200, Christian Heimes li...@cheimes.de wrote: PHP was developed for non-developers. (see http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ ). It's much easier and also cheaper to find bad coders and non-developers than code people. The outcome is bad

RE: [newbie] Equivalent to PHP?

2012-06-13 Thread Prasad, Ramit
PHP was developed for non-developers. (see http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ ). It's much easier and also cheaper to find bad coders and non-developers than code people. The outcome is bad performance and lots of security issues. And as to why Facebook chose

RE: When adding my application to Windows right-click menu

2012-06-13 Thread Prasad, Ramit
I made a cipher app but to make easy, I want to make it Windows rightclick menu can execute it I found the way with dealing with Registry [HKEY_CLASSES_ROOT\Directory\Background\shell\app] [HKEY_CLASSES_ROOT\Directory\Background\shell\app\command] @=C;\myapp filelocation but I

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Gilles
On Wed, 13 Jun 2012 23:12:37 +, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: You are not Facebook (at least yet). Indeed, but with so much criticism about PHP, it's odd that they would still choose it. Anyway, thanks much for the infos. I'll look at the web frameworks and how to connect

consecutive node sequence and pathlength problem using networkx graph

2012-06-13 Thread bob
Let say,I have a conjugated cyclic polygon and its nodes are given by the list: list_p=[a,b,c,d,e,f,g,a,a,b,d,d,d,d,d,c,c,e,e,a,d,d,g]. If X Y are any elements in a list_p except d, and Z is also an element of list_p but has value only d, i.e, Z=d. Now,I want to compute the number of

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Steven D'Aprano
On Thu, 14 Jun 2012 00:44:23 +0200, Gilles wrote: On 13 Jun 2012 22:16:51 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Surely the obvious answer is that a framework offers the benefit that you don't have to write the application from scratch. Yes, but between receiving

RE: [newbie] Equivalent to PHP?

2012-06-13 Thread Prasad, Ramit
Indeed, but with so much criticism about PHP, it's odd that they would still choose it. Could be a familiarity/ease issue as it was originally started by a college student (and college students seldom have meaningful real world experience) before it exploded in size. Also do not forget that

Re: Pytz error: unpack requires a string argument of length 44

2012-06-13 Thread Daniel Klein
The windows box is my development box, it's not where the script will be running in the end. It'll be running on a Linux box where I don't have root so python setup.py install isn't an option (to my understanding). So what happened is that 7zip didn't unzip the .tar.gz2 properly, but it does

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Tim Chase
On 06/13/12 17:44, Gilles wrote: On 13 Jun 2012 22:16:51 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Surely the obvious answer is that a framework offers the benefit that you don't have to write the application from scratch. Yes, but between receiving the query and

Re: string to list

2012-06-13 Thread Chris Rebert
n Wed, Jun 13, 2012 at 7:29 PM, bruce g bruceg113...@gmail.com wrote: What is the best way to parse a CSV string to a list? Use the `csv` module: http://docs.python.org/library/csv.html http://www.doughellmann.com/PyMOTW/csv/ The `StringIO` module can be used to wrap your string as a file-like

Re: [newbie] Equivalent to PHP?

2012-06-13 Thread Terry Reedy
On 6/13/2012 6:45 PM, Gilles wrote: On Wed, 13 Jun 2012 23:16:31 +0200, Christian Heimes li...@cheimes.de wrote: PHP was developed for non-developers. (see http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ ). It's much easier and also cheaper to find bad coders and

Re: string to list

2012-06-13 Thread Jose H. Martinez
string.split(',') will give you an array. Example: 'AAA,,,,EEE,FFF,GGG '.split(',') ['AAA', '', '', '', 'EEE', 'FFF', 'GGG'] On Wed, Jun 13, 2012 at 10:53 PM, Chris Rebert c...@rebertia.com wrote: n Wed, Jun 13, 2012 at 7:29 PM, bruce g bruceg113...@gmail.com wrote:

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread John Nagle
On 6/12/2012 11:42 PM, Andrew Berg wrote: On 6/13/2012 1:17 AM, John Nagle wrote: What does urllib2 want? Percent escapes? Punycode? Looks like Punycode is the correct answer: https://en.wikipedia.org/wiki/Internationalized_domain_name#ToASCII_and_ToUnicode I haven't tried it, though.

Re: string to list

2012-06-13 Thread Ian Kelly
On Wed, Jun 13, 2012 at 10:06 PM, Jose H. Martinez josehmartin...@gmail.com wrote: string.split(',') will give you an array. Example: 'AAA,,,,EEE,FFF,GGG '.split(',') ['AAA', '', '', '', 'EEE', 'FFF', 'GGG'] But it incorrectly splits the quoted part. A proper CSV

[issue15038] Optimize python Locks on Windows

2012-06-13 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15038 ___ ___ Python-bugs-list

[issue15026] Faster UTF-16 encoding

2012-06-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here are results under 64-bit Linux on a Core i5-2500K: 3.3 patched 3327 (+360%) 15304 encode utf-16le 'A'*1 3314 (+335%) 14413 encode utf-16le '\x80'*1 3315 (+578%) 22472 encode utf-16le'\x80'+'A'* 2390 (+668%)

[issue15038] Optimize python Locks on Windows

2012-06-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- superseder: Locks broken wrt timeouts on Windows - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15038 ___

[issue15038] Optimize python Locks on Windows

2012-06-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review type: enhancement - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15038 ___

[issue15038] Optimize python Locks on Windows

2012-06-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: While I'm confident about the correctness of this implementation (it´s in production use right now) I´d like comments on the architecture. - Are people comfortable with the notion of an include file with an inline implementation

[issue4442] document immutable type subclassing via __new__

2012-06-13 Thread Mateusz Loskot
Mateusz Loskot mate...@loskot.net added the comment: Chris Withers' note clarifies it to me, that this should be Python-level rather than C-level documentation. Then the note under __new__() in 3. Data model seems right. Simply, I expected to have some notes in C API too Side note: as mainly

[issue4442] document immutable type subclassing via __new__

2012-06-13 Thread Chris Withers
Chris Withers ch...@simplistix.co.uk added the comment: Probably also wouldn't go amiss to put some notes near the docs for common immutable types that people might subclass: datetime, maybe tuple? -- ___ Python tracker rep...@bugs.python.org

[issue15054] bytes literals erroneously tokenized

2012-06-13 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: With Python 2.7, both b'hello' and br'hello' are wrong. With Python 3.3, b'hello' is wrong. $ python2.7 -m tokenize 'hello', u'hello', ur'hello', b'hello', br'hello' 1,0-1,7:STRING 'hello' 1,7-1,8:OP ','

[issue15054] bytes literals erroneously tokenized

2012-06-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15054 ___ ___ Python-bugs-list

[issue15049] line buffering isn't always

2012-06-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Indeed, line buffering on the read size would very slow (since you would have to read and decode one byte at a time from the raw stream to make sure you don't overshoot the line boundaries). -- ___

[issue13062] Introspection generator and function closure state

2012-06-13 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Meador: I probably won't get to this until the weekend, so go ahead and update the patch if you have time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13062

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2012-06-13 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I was tempted to just add this (perhaps as a -X option) but, on reflection, I'm going to go with No, not for 3.3. I want to take a long hard look at the whole sys.path[0] initialisation process when I update PEP 395 to account for namespace

[issue15020] default value for progname in pythonrun.c should be python3 for Python 3

2012-06-13 Thread Joshua Cogliati
Changes by Joshua Cogliati jrinc...@gmail.com: -- title: Poor default value for progname in pythonrun.c - default value for progname in pythonrun.c should be python3 for Python 3 ___ Python tracker rep...@bugs.python.org

[issue15055] dictnotes.txt is out of date

2012-06-13 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: dictnotes.txt is out of date w.r.t. dictobject.c Remove notes from dictnotes.txt that duplicate comments in dictobject.c and ensure comments in dictobject.c cover all aspects of tunable parameters. Patch attached. -- assignee:

[issue15055] dictnotes.txt is out of date

2012-06-13 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15055 ___

[issue15055] dictnotes.txt is out of date

2012-06-13 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Mark, where was it approved that you could change all the tunable parameters? I remembered that the split dict was approved but not changing all of the tuneables (at one point, I had spent a month validating that the tuneables

[issue15055] dictnotes.txt is out of date

2012-06-13 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Raymond, I don't think this is the place to discuss the changes to the tunables in dictobject.c. This patch merely ensures that dictnotes.txt and the comments in dictobject.c are in agreement. It doesn't change any code (apart from creating the

[issue15056] Have imp.cache_from_source() raise NotImplementedError when cache tag not available

2012-06-13 Thread Brett Cannon
New submission from Brett Cannon br...@python.org: Both imp.cache_from_source() and source_from_cache() should throw NotImplementedError when sys.implementation.cache_tag is None. See the thread starting at http://mail.python.org/pipermail/python-dev/2012-June/120145.html for discussion of

[issue15056] Have imp.cache_from_source() raise NotImplementedError when cache tag not available

2012-06-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15056 ___ ___ Python-bugs-list

[issue15056] Have imp.cache_from_source() raise NotImplementedError when cache tag not available

2012-06-13 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It seems to me there is overlap between sys.implementation.cache_tag and sys.dont_write_bytecode. I was expecting sys.impl.cache_tag to be purely informational, and not actually controlling some behavior. “If cache_tag is set to None, it

[issue13783] Clean up PEP 380 C API additions

2012-06-13 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: There is one call to PyGen_FetchStopIterationValue in ceval.c. But I don't think it should be public. There is no real reason for the Gen in the name. The function is used by generator handling code, but the code itself relates to StopIteration.

[issue15050] Python 3.2.3 fail to make

2012-06-13 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is a misconfiguration of your system. Take a look at line 29538 of config.log. It says configure:13701: ./conftest ld.so.1: ./conftest: ÖÂÃüµÄ: libintl.so.8: ´ò¿ªÊ§°Ü: ÎÞ´ËÎļþ»òĿ¼ ./configure: line -1756: 8400 Killed

[issue13841] multiprocessing should use sys.exit() where possible

2012-06-13 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: The trivial patch of replacing exit() by sys.exit() caused manager processes to be terminated after a short timeout. (It is inconvenient that in Python there is no way for a non-main thread to request immediate shutdown of the process.)

[issue15057] Potential Bugs in mpd_qdivint and mpd_qrem

2012-06-13 Thread Ken Cheung
New submission from Ken Cheung msrbugzi...@gmail.com: I observed a code clone from the following files. function : mpd_qdivint @ (file: Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c, line: 3727)~3763 function : mpd_qrem @ (file: Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c,

[issue15057] Potential Bug in mpd_qdivint and mpd_qrem

2012-06-13 Thread Ken Cheung
Changes by Ken Cheung msrbugzi...@gmail.com: -- title: Potential Bugs in mpd_qdivint and mpd_qrem - Potential Bug in mpd_qdivint and mpd_qrem ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15057

[issue15058] Potential Bugs in dlpvalloc and dlvalloc

2012-06-13 Thread Ken Cheung
New submission from Ken Cheung msrbugzi...@gmail.com: I observed a code clone from the following files. function : dlpvalloc @ (file: Python-3.3.0a2/Modules/_ctypes/libffi/src/dlmalloc.c, line: 4360)~4362 function : dlvalloc @ (file: Python-3.3.0a2/Modules/_ctypes/libffi/src/dlmalloc.c, line:

[issue15058] Potential Bug in dlpvalloc and dlvalloc

2012-06-13 Thread Ken Cheung
Changes by Ken Cheung msrbugzi...@gmail.com: -- title: Potential Bugs in dlpvalloc and dlvalloc - Potential Bug in dlpvalloc and dlvalloc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15058

[issue15059] Potential Bug in mpd_qresize and mpd_qresize_zero

2012-06-13 Thread Ken Cheung
New submission from Ken Cheung msrbugzi...@gmail.com: I observed a code clone from the following files. function : mpd_qresize @ (file: Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c, line: 481)~493 function : mpd_qresize_zero @ (file:

[issue15057] Potential Bug in mpd_qdivint and mpd_qrem

2012-06-13 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15057 ___ ___ Python-bugs-list mailing list

[issue15056] Have imp.cache_from_source() raise NotImplementedError when cache tag not available

2012-06-13 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15056 ___ ___ Python-bugs-list

[issue15060] docs: socket typo

2012-06-13 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: http://docs.python.org/library/socket.html s/integral/integer/ -- assignee: docs@python components: Documentation messages: 162720 nosy: docs@python, techtonik priority: normal severity: normal status: open title: docs: socket

[issue15058] Potential Bug in dlpvalloc and dlvalloc

2012-06-13 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +amaury.forgeotdarc, meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15058 ___

[issue15059] Potential Bug in mpd_qresize and mpd_qresize_zero

2012-06-13 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15059 ___ ___ Python-bugs-list

[issue15058] Potential Bug in dlpvalloc and dlvalloc

2012-06-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Well, this bitwise operation is exactly why there are two functions: dlvpalloc rounds up to the nearest page size, and dlvalloc does not. -- resolution: - works for me status: open - closed

[issue9679] unicode DNS names in urllib, urlopen

2012-06-13 Thread John Nagle
John Nagle na...@users.sourceforge.net added the comment: A IRI library is not needed to fix this problem. It's already fixed in the sockets library and the http library. We just need consistency in urllib2. urllib2 functions which take a url parameter should apply encodings.idna.ToASCII

[issue9679] unicode DNS names in urllib, urlopen

2012-06-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I doubt that unicode domain support in urllib would be of much use without full IRI support. I would think that a domain that uses unicode is highly likely to have URLs that use unicode. However that doesn't mean a patch along the

[issue3955] maybe doctest doesn't understand unicode_literals?

2012-06-13 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Yeah, I don't really remember now what my point was. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3955 ___

[issue15052] Outdated comments in build_ssl.py

2012-06-13 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: The comment is correct. The sources are not. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15052 ___

[issue1054] scriptsinstall target fails in alternate build dir

2012-06-13 Thread Gukas Artunyan
Changes by Gukas Artunyan gukaa...@yahoo.com: Added file: http://bugs.python.org/file25953/pec2.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1054 ___

[issue1054] scriptsinstall target fails in alternate build dir

2012-06-13 Thread Gukas Artunyan
Changes by Gukas Artunyan gukaa...@yahoo.com: Added file: http://bugs.python.org/file25956/pec5.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1054 ___

  1   2   >