Nanpy 0.7 - Use your Arduino board with Python

2013-01-03 Thread Andrea Stagi
Hi, Happy new year! :) New year, new release: Nanpy 0.7 is out with some changes: - Now we use the official version of edam's Arduino makefile (http://ed.am/dev/make/arduino-mk) - Added support to the CapacitiveSensor library

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread Peter Otten
Terry Reedy wrote: [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an underscore ? No, it allows underscores. As I read that re, 'rx', etc, do match. They No, it's one leading letter or underscore [a-z_] plus at least two letters, underscores or digits [a-z0-9_]{2,30}

Important questions about __future__

2013-01-03 Thread Andrew Berg
Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP 401, using print as a statement still raises a SyntaxError. Where is 'from __future__ import braces' implemented in CPython (it's not in __future__.py)? -- CPython 3.3.0 | Windows NT 6.2.9200.16461 --

Re: Important questions about __future__

2013-01-03 Thread Ramchandra Apte
On Thursday, 3 January 2013 15:13:44 UTC+5:30, Ramchandra Apte wrote: On Thursday, 3 January 2013 14:57:42 UTC+5:30, Andrew Berg wrote: Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP 401, using print as a statement still raises a SyntaxError. Where

Re: Important questions about __future__

2013-01-03 Thread Ramchandra Apte
On Thursday, 3 January 2013 14:57:42 UTC+5:30, Andrew Berg wrote: Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP 401, using print as a statement still raises a SyntaxError. Where is 'from __future__ import braces' implemented in CPython (it's not in

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-03 Thread Gisle Vanem
Wayne Werner wa...@waynewerner.com wrote: Yep. That's how I feel. I had used ViEmu in Visual Studio for coding in .NET at work - but I found that the buffers macros were more powerful. So now I do most of my programming in Vim, and only head to VS if I need autocomplete or some of it's

Re: Important questions about __future__

2013-01-03 Thread Ian Kelly
On Thu, Jan 3, 2013 at 2:27 AM, Andrew Berg bahamutzero8...@gmail.com wrote: Does 'from __future__ import barry_as_FLUFL' do anything? Despite PEP 401, using print as a statement still raises a SyntaxError. I think it only replaces the != operator with . Where is 'from __future__ import

Re: Important questions about __future__

2013-01-03 Thread Steven D'Aprano
On Thu, 03 Jan 2013 03:27:42 -0600, Andrew Berg wrote: Does 'from __future__ import barry_as_FLUFL' do anything? Yes, it re-enables and disables != as not equal: py sys.version '3.3.0rc3 (default, Sep 27 2012, 18:44:58) \n[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]' py 1 2 File stdin, line 1

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread someone
On 01/03/2013 03:55 AM, Ian Kelly wrote: On Wed, Jan 2, 2013 at 7:24 PM, someone newsbo...@gmail.com wrote: 3) self.rx / rself.ry / self.rz: Invalid name rx (should match [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an underscore ? It wants the name to be at least 3

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread someone
On 01/03/2013 10:00 AM, Peter Otten wrote: Terry Reedy wrote: [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with an underscore ? No, it allows underscores. As I read that re, 'rx', etc, do match. They No, it's one leading letter or underscore [a-z_] plus at least two

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread Chris Angelico
On Thu, Jan 3, 2013 at 10:19 PM, someone newsbo...@gmail.com wrote: Doesn't this [ ... ] mean something optional? What does {2,30}$ mean? I think $ means that the {2,30} is something in the end of the sentence... You can find regular expression primers all over the internet, but to answer

Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread Peter Otten
someone wrote: On 01/03/2013 10:00 AM, Peter Otten wrote: Terry Reedy wrote: [a-z_][a-z0-9_]{2,30}$) - so I suppose it wants this name to end with [an underscore ? No, it allows underscores. As I read that re, 'rx', etc, do match. They No, it's one leading letter or underscore [a-z_]

Re: Python printout

2013-01-03 Thread Avrajit Chatterjee
On Tuesday, 27 November 2012 15:00:29 UTC+5:30, Avrajit Chatterjee wrote: I have multiple list and want to invoke a single prinout which will give a print preview of all list in Grid format in a different pages. I have tried wx.lib.printout.PrintTable but it takes only one table at a time.

Re: Creating interactive command-line Python app?

2013-01-03 Thread bob.blanchett
This is exactly what you want: https://cliff.readthedocs.org/en/latest/ Bob/Julius Flywheel On Wednesday, December 21, 2005 11:34:38 PM UTC+11, planetthoughtful wrote: Hello All, Newbie to Python, and I'm wondering if it's possible to create a Python console app that prompts for further

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
Mitya Sirenef wrote: So, how many instances do you want to make.. what kind of different functionality / properties they will have? - mitya I am porting a modeling system I created using POV-Ray scene description language available at sourceforge at

Re: Can't seem to start on this

2013-01-03 Thread D'Arcy J.M. Cain
On Wed, 02 Jan 2013 23:32:33 -0500 Kene Meniru kene.men...@illom.org wrote: This sounds so simple but being new to python I am finding it hard to get started. I want to create a module which I will call B. There will be other modules called C, D, etc, which will most likely be imported in B.

PyGreSQL 4.1 released

2013-01-03 Thread D'Arcy J.M. Cain
--- Release of PyGreSQL version 4.1 --- It has been a long time coming but PyGreSQL v4.1 has been released. It is available at: http://pygresql.org/files/PyGreSQL-4.1.tgz. If you are running NetBSD, look in the packages directory under

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
D'Arcy J.M. Cain wrote: OK, global variables is the clue that you need to rethink this. Try to stay away from global variables as much as possible except for maybe some simple setup variables within the same file. Consider something like this instead. The global variable is not part of

Re: pygame - importing GL - very bad...

2013-01-03 Thread Mike C. Fletcher
On 13-01-02 08:53 PM, someone wrote: On 01/02/2013 10:57 PM, Michael Torrie wrote: On 01/01/2013 04:49 PM, someone wrote: On 01/01/2013 12:13 PM, Chris Angelico wrote: You could simply import OpenGL.GL as GL You're right - but I forgot to write that even though this maybe should/is

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread Mike C. Fletcher
On 13-01-02 09:48 PM, Terry Reedy wrote: ... 2) self.lightDone: Invalid name lightDone (should match [a-z_][a-z0-9_]{2,30}$) So I can now understand that pylint doesn't like my naming convention with a capital letter in the middle of the variable name, like: lightDone = a boolean value. I

Re: Creating interactive command-line Python app?

2013-01-03 Thread Tim Chase
(original post from planetthoughtful didn't seem to arrive here, so replying to Bob's reply) Newbie to Python, and I'm wondering if it's possible to create a Python console app that prompts for further input on the command line when run (in Windows XP, if that's important)? While Bob's

Re: Can't seem to start on this

2013-01-03 Thread D'Arcy J.M. Cain
On Thu, 03 Jan 2013 09:06:55 -0500 Kene Meniru kene.men...@illom.org wrote: OK, global variables is the clue that you need to rethink this. Try to stay away from global variables as much as possible except for maybe some simple setup variables within the same file. Consider something like

Re: Creating interactive command-line Python app?

2013-01-03 Thread Dave Angel
On 01/03/2013 09:24 AM, Tim Chase wrote: (original post from planetthoughtful didn't seem to arrive here, so replying to Bob's reply) Newbie to Python, and I'm wondering if it's possible to create a Python console app that prompts for further input on the command line when run (in Windows

building python from source

2013-01-03 Thread Rita
For those building python from source what are some tests you do to make sure the compilation and installation is up to standard. For instance here are some thing I do: Tk functionality sqlite module Python is compiled with shared object (important for wsgi) Proper preloading of python libraries

Re: building python from source

2013-01-03 Thread Matt Jones
Run the unittests. the test___all___.py test runner can be found under your python installation directory's lib/python-X.X/test/. *Matt Jones* On Thu, Jan 3, 2013 at 8:43 AM, Rita rmorgan...@gmail.com wrote: For those building python from source what are some tests you do to make sure the

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
D'Arcy J.M. Cain wrote: As I mentioned, the file A can be considered a scene file. I do not I don't know what a scene file is. A scene file is applicable to programs like POV-Ray at www.povray.org. It is a file that is used to describe 3D objects such as box, sphere, polygon, etc. My

Re: PyGreSQL 4.1 released

2013-01-03 Thread Walter Hurry
On Thu, 03 Jan 2013 09:04:16 -0500, D'Arcy J.M. Cain wrote: --- Release of PyGreSQL version 4.1 --- It has been a long time coming but PyGreSQL v4.1 has been released. It is available at: http://pygresql.org/files/PyGreSQL-4.1.tgz.

running multiple django/bottle instances

2013-01-03 Thread Andrea Crotti
I'm working on a quite complex web app that uses django and bottle (bottle for the API which is also restful). Before I came they started to use a staging server to be able to try out things properly before they get published, but now we would like to have the possibility to see multiple

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-03 Thread Terry Reedy
On 1/3/2013 9:19 AM, Mike C. Fletcher wrote: On 13-01-02 09:48 PM, Terry Reedy wrote: ... 2) self.lightDone: Invalid name lightDone (should match [a-z_][a-z0-9_]{2,30}$) So I can now understand that pylint doesn't like my naming convention with a capital letter in the middle of the variable

Re: Can't seem to start on this

2013-01-03 Thread D'Arcy J.M. Cain
On Thu, 03 Jan 2013 09:59:04 -0500 Kene Meniru kene.men...@illom.org wrote: Yes, I guess that is the main thing. I do not want users to have to write python code unless they are interested in customizing how the That works too. It's just that you had users writing Python code but assumed that

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
D'Arcy J.M. Cain wrote: That works too. It's just that you had users writing Python code but assumed that a three line subclass was beyond them. Not requiring them to write any Python code is a better option than the first one (global variables) that you proposed. That's all I am trying to

Re: PyGreSQL 4.1 released

2013-01-03 Thread D'Arcy J.M. Cain
On Thu, 3 Jan 2013 15:06:29 + (UTC) Walter Hurry walterhu...@lavabit.com wrote: Sounds good. Thanks for your efforts. I wasn't alone but I accept your thanks on behalf of the team. Does it offer advantages oiver Psycopg2? Well, it has two interfaces, the DB-API 2.0 and the Classic one.

Re: Can't seem to start on this

2013-01-03 Thread Mitya Sirenef
On 01/03/2013 07:53 AM, Kene Meniru wrote: Mitya Sirenef wrote: So, how many instances do you want to make.. what kind of different functionality / properties they will have? - mitya I am porting a modeling system I created using POV-Ray scene description language available at

Re: Creating interactive command-line Python app?

2013-01-03 Thread Tim Chase
On 01/03/13 08:41, Dave Angel wrote: The two replies in 2005 mentioned both raw_input and the cmd module (in case that's what he was implying). They were posted within 90 minutes of the original. Ah. 2005 would explain why my newsreader has purged them as ancient history :) Thanks for the

Missing something obvious with python-requests

2013-01-03 Thread Ray Cote
Hello List: I seem to be missing something obvious in terms of using proxies with the requests module. I'm using requests 1.4 and Python 2.7. Have tried this on Centos 6 and Windows XP. Here's the sample code, right out of the manual: import requests proxies = { 'https':

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
Mitya Sirenef wrote: I'm not familiar with POV-Ray. I want to note that with python standard style, class names look like this: ClassName, instances look like this: instance_name; it sounds like you want LMark to be an instance? Or you want instances in A to use class naming style? Think

Re: PyGreSQL 4.1 released

2013-01-03 Thread Modulok
--- Release of PyGreSQL version 4.1 --- It has been a long time coming but PyGreSQL v4.1 has been released. It is available at: http://pygresql.org/files/PyGreSQL-4.1.tgz. If you are running NetBSD, look in the packages directory

Question on for loop

2013-01-03 Thread subhabangalore
Dear Group, If I take a list like the following: fruits = ['banana', 'apple', 'mango'] for fruit in fruits: print 'Current fruit :', fruit Now, if I want variables like var1,var2,var3 be assigned to them, we may take, var1=banana, var2=apple, var3=mango but can we do something to

Re: Question on for loop

2013-01-03 Thread MRAB
On 2013-01-03 20:04, subhabangal...@gmail.com wrote: Dear Group, If I take a list like the following: fruits = ['banana', 'apple', 'mango'] for fruit in fruits: print 'Current fruit :', fruit Now, if I want variables like var1,var2,var3 be assigned to them, we may take, var1=banana,

Re: Question on for loop

2013-01-03 Thread Peter Otten
subhabangal...@gmail.com wrote: Dear Group, If I take a list like the following: fruits = ['banana', 'apple', 'mango'] for fruit in fruits: print 'Current fruit :', fruit Now, if I want variables like var1,var2,var3 be assigned to them, we may take, var1=banana, var2=apple,

Re: Question on for loop

2013-01-03 Thread Matt Jones
Yeah, this seems like a bad idea. What exactly are you trying to do here? Maybe using a dictionary is what you want? d = { 'first' : 'banana', 'second' : 'apple', 'third' : 'mango' } for key, value in d.items(): print key, value However I'm still not sure why you'd want to

Re: PyGreSQL 4.1 released

2013-01-03 Thread Walter Hurry
On Thu, 03 Jan 2013 13:07:40 -0500, D'Arcy J.M. Cain wrote: On Thu, 3 Jan 2013 15:06:29 + (UTC) Walter Hurry walterhu...@lavabit.com wrote: Sounds good. Thanks for your efforts. I wasn't alone but I accept your thanks on behalf of the team. Does it offer advantages oiver Psycopg2? 0

[ANN] pypiserver 1.0.1 - minimal private pypi server

2013-01-03 Thread Ralf Schmitt
Hi, I've just uploaded pypiserver 1.0.1 to the python package index. pypiserver is a minimal PyPI compatible server. It can be used to serve a set of packages and eggs to easy_install or pip. pypiserver is easy to install (i.e. just 'pip install pypiserver'). It doesn't have any external

Re: Can't seem to start on this

2013-01-03 Thread Mitya Sirenef
On 01/03/2013 02:30 PM, Kene Meniru wrote: Mitya Sirenef wrote: I'm not familiar with POV-Ray. I want to note that with python standard style, class names look like this: ClassName, instances look like this: instance_name; it sounds like you want LMark to be an instance? Or you want

Re: Missing something obvious with python-requests

2013-01-03 Thread Barry Scott
The shipped python library code does not work. See http://bugs.python.org/issue7291 for patches. Barry On 3 Jan 2013, at 18:53, Ray Cote rgac...@appropriatesolutions.com wrote: Hello List: I seem to be missing something obvious in terms of using proxies with the requests module. I'm

Re: Question on for loop

2013-01-03 Thread Don Ross
I'm interested to know why you're trying this as well. Is this something that would be helped by creating a class and then dynamically creating instances of that class? Something like... class Fruit: def __init__(self, name): self.name = name for fruit in ['banana', 'apple',

Yet another attempt at a safe eval() call

2013-01-03 Thread Grant Edwards
I've written a small assembler in Python 2.[67], and it needs to evaluate integer-valued arithmetic expressions in the context of a symbol table that defines integer values for a set of names. The right thing is probably an expression parser/evaluator using ast, but it looked like that would

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
Mitya Sirenef wrote: Ok but if the user creates two sites, how does he then manipulate them, if you are not binding instances in A? (e.g. you are not doing site1 = Site(New Site)). If the user only ever needs one site, that's fine. -m There can only be one site for each

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
Mitya Sirenef wrote: Ok but if the user creates two sites, how does he then manipulate them, if you are not binding instances in A? (e.g. you are not doing site1 = Site(New Site)). If the user only ever needs one site, that's fine. -m In case of situations where the user needs to

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-03 Thread Barry Scott
On 2 Jan 2013, at 08:01, Victor Hooi victorh...@gmail.com wrote: Hi, I'm using pysvn to checkout a specific revision based on date - pysvn will only accept a date in terms of seconds since the epoch. I'm attempting to use time.mktime() to convert a date (e.g. 2012-02-01) to seconds

Re: Can't seem to start on this

2013-01-03 Thread Mitya Sirenef
On 01/03/2013 07:08 PM, Kene Meniru wrote: LinearSide.put(Dining, (x,y,z)) # moves 'Dining' to x,y,z location The put function of the LinearSide boundary class finds Dining (which is an entity class called LinearSideData) in the dictionary and then allows this LinearSideData class to calculate

Re: Can't seem to start on this

2013-01-03 Thread Kene Meniru
Mitya Sirenef wrote: That's what I thought, just wanted to confirm. However, if your objective to make it as easy for the user as possible, is it not easier to bind dining to a name and then do this?: dining.move(x, y, z) Absolutely. I just found that out after replying to your

Re: Question on for loop

2013-01-03 Thread alex23
On Jan 4, 6:04 am, subhabangal...@gmail.com wrote: but can we do something to assign the variables dynamically I was thinking of var_series=['var1','var2','var3'] for var in var_series:   for fruit in fruits:        print var,fruits Before trying to do this, write the next bit of code where

Re: Can't seem to start on this

2013-01-03 Thread Mitya Sirenef
On 01/03/2013 07:43 PM, Kene Meniru wrote: Mitya Sirenef wrote: That's what I thought, just wanted to confirm. However, if your objective to make it as easy for the user as possible, is it not easier to bind dining to a name and then do this?: dining.move(x, y, z) Absolutely. I just found

Re: Yet another attempt at a safe eval() call

2013-01-03 Thread Tim Chase
On 01/03/13 17:25, Grant Edwards wrote: def lessDangerousEval(expr): global symbolTable if 'import' in expr: raise ParseError(operand expressions are not allowed to contain the string 'import') globals = {'__builtins__': None} locals = symbolTable return

Re: Missing something obvious with python-requests

2013-01-03 Thread Ray Cote
Thank you. --Ray - Original Message - From: Barry Scott ba...@barrys-emacs.org To: Ray Cote rgac...@appropriatesolutions.com Cc: python-list@python.org Sent: Thursday, January 3, 2013 5:48:52 PM Subject: Re: Missing something obvious with python-requests The shipped python library code

Re: Yet another attempt at a safe eval() call

2013-01-03 Thread Grant Edwards
On 2013-01-04, Tim Chase python.l...@tim.thechases.com wrote: On 01/03/13 17:25, Grant Edwards wrote: def lessDangerousEval(expr): global symbolTable if 'import' in expr: raise ParseError(operand expressions are not allowed to contain the string 'import') globals =

Re: Missing something obvious with python-requests

2013-01-03 Thread Chris Angelico
On Fri, Jan 4, 2013 at 5:53 AM, Ray Cote rgac...@appropriatesolutions.com wrote: proxies = { 'https': '192.168.24.25:8443', 'http': '192.168.24.25:8443', } a = requests.get('http://google.com/', proxies=proxies) When I look at the proxy log, I see a GET being performed -- when it

Re: Question on for loop

2013-01-03 Thread Steven D'Aprano
On Thu, 03 Jan 2013 12:04:03 -0800, subhabangalore wrote: Dear Group, If I take a list like the following: fruits = ['banana', 'apple', 'mango'] for fruit in fruits: print 'Current fruit :', fruit Now, if I want variables like var1,var2,var3 be assigned to them, we may take,

Re: Yet another attempt at a safe eval() call

2013-01-03 Thread Steven D'Aprano
On Thu, 03 Jan 2013 23:25:51 +, Grant Edwards wrote: I've written a small assembler in Python 2.[67], and it needs to evaluate integer-valued arithmetic expressions in the context of a symbol table that defines integer values for a set of names. The right thing is probably an expression

Re: Yet another attempt at a safe eval() call

2013-01-03 Thread Chris Rebert
On Thu, Jan 3, 2013 at 3:25 PM, Grant Edwards invalid@invalid.invalid wrote: I've written a small assembler in Python 2.[67], and it needs to evaluate integer-valued arithmetic expressions in the context of a symbol table that defines integer values for a set of names. The right thing is

[issue8952] Doc/c-api/arg.rst: fix documentation of number formats

2013-01-03 Thread Georg Brandl
Georg Brandl added the comment: It's still a valid bug. -- nosy: +georg.brandl resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8952 ___

[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, re-writing windows IO to direct API, without intemediate layer is still needed. Please don't close bug. Maybe someone will implement this. -- ___ Python tracker rep...@bugs.python.org

[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Ezio Melotti
Ezio Melotti added the comment: The attached patch adds a couple of section about the single and multiple clones approaches. The patch is still incomplete, because the rest of the page should be adapted to the new content (in particular the old sections should be removed, and the whole

[issue16847] sha module broken

2013-01-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 944e86223d1f by Christian Heimes in branch '3.3': Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in http://hg.python.org/cpython/rev/944e86223d1f New changeset 4b42d7f288c5 by Christian Heimes in branch 'default': Issue #16847:

[issue16847] sha module broken

2013-01-03 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- assignee: christian.heimes - resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16847

[issue16847] sha module broken

2013-01-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: That's quick, thank :-). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16847 ___ ___ Python-bugs-list

[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Chris Jerdonek
Chris Jerdonek added the comment: Content-wise the patch looks pretty good. I agree with the recommendations. A couple suggestions though: I would break up the 20 lines of command-line commands. Right now that chunk is a bit too long to grasp meaningfully. My suggestion would be to break

[issue14468] Update cloning guidelines in devguide

2013-01-03 Thread Ezio Melotti
Ezio Melotti added the comment: I would break up the 20 lines of command-line commands. I would have to find a compromise for this, because on one hand it's convenient to have all the commands in a single place (so it's easy to get an overview), but on the other hand that block includes

[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Windows nosy: +ezio.melotti stage: - needs patch type: - enhancement versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12939

[issue8821] Range check on unicode repr

2013-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can accept the patch. You can reject the patch. It doesn't matter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8821 ___

[issue16842] Allow to override a function signature for pydoc with a docstring

2013-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I mixed up the issues. For this issue I have not a patch yet. I wait for some suggestions and decisions first. See also related issue16638. -- stage: patch review - needs patch ___ Python tracker

[issue16801] Preserve original representation for integers / floats in docstrings

2013-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: A subclass with a custom representation, as I suggested above, is even simpler and involves no change to inspect or docstring conventions. Agree, but this is a particular and cumbersome solution. I open new issue16842 for docstring conventions. --

[issue16748] Make CPython test package discoverable

2013-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also test_functools, test_xml_etree, test_bisect, test_bz2, test_warnings, test_decimal, test_datetime, json_tests, test_io, test_concurrent_futures, and many, many other undiscoverable tests. -- stage: committed/rejected - patch review

[issue1584] Mac OS X: building with X11 Tkinter

2013-01-03 Thread Samuel John
Samuel John added the comment: Hello from Homebrew (Mac)! Indeed we also patch setup.py (but right now only for python2.7) and uncommented the detect_tkinter_darwin related lines to support linking against a Tkinter build with homebrew (optionally with X11 support). (Our patch:

[issue15596] pickle: Faster serialization of Unicode strings

2013-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, I take care of this. I have the own patch for raw_unicode_escape() optimization, but microbenchmarks don't show any speed up. Maybe your approach will be better. -- ___ Python tracker rep...@bugs.python.org

[issue16844] funcName in logging module for python 2.6

2013-01-03 Thread Vinay Sajip
Vinay Sajip added the comment: You are apparently not using the logging in stdlib, but the older, standalone logging package intended to be used in versions of Python older than 2.3 - note the presence of site-packages/logging-0.4.9.6-py2.6.egg in the traceback. If you are using Python 2.6,

[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Samuel John
New submission from Samuel John: Some tools use `python-config --ldflags` to get the flags in order to link against the Python lib on OS X (for example gst-python from pygtk (2.x). For framework builds, `python-config --ldflags` returns (among few other): -u _PyMac_Error

[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: Using '-framework Python' is suboptimal because this doesn't control which framework is used for linking (in particular, if you have both Python 2.7 and 3.3 installed '-framework Python' will link against the one installed last). For Python 3.3 I get: $

[issue13094] Need Programming FAQ entry for the behavior of closures

2013-01-03 Thread R. David Murray
R. David Murray added the comment: The FAQ (as in, this question gets asked again and again) is something like why do the lambdas I define in a loop all return the same result when the input value was different when each one was defined? The same applies to regular functions, but people

[issue16849] Element.{get, iter} doesn't handle keyword arguments when using _elementtree C accelerator.

2013-01-03 Thread Franck Michea
New submission from Franck Michea: Documentation: - http://docs.python.org/3.3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.get - http://docs.python.org/3.3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.iter These two functions are documented with

[issue16846] relative import solution

2013-01-03 Thread R. David Murray
R. David Murray added the comment: Could you give more information about what you see as the bug, here? I'm not understanding the problem because there doesn't appear to be enough context. What is your directory structure? Where is the import happening? -- components: +Interpreter

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Shouldn't this be applied to 3.3? As for optimization, I made some benchmarks and didn't saw any significant difference. Usually this function used to check short ASCII heads and tails and any optimization will not be seen even under a microscope.

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2013-01-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Note that on Windows there is an O_NOINHERIT flag which almost corresponds to O_CLOEXEC on Linux. I don't think there is a need to use the win32 api. -- nosy: +sbt ___ Python tracker rep...@bugs.python.org

[issue12939] Add new io.FileIO using the native Windows API

2013-01-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: A while ago I did write a PipeIO class which subclasses io.RawIOBase and works for overlapped pipe handles. (It was intended for multiprocessing and doing asynchronous IO with subprocess.) As it is it would not work with normal files because when you do

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2013-01-03 Thread STINNER Victor
STINNER Victor added the comment: Shouldn't this be applied to 3.3? It's just a cleanup, it doesn't fix any real bug. I prefer to not pollute old versions with cleanup. As for optimization, I made some benchmarks and didn't saw any significant difference. Usually this function used to

[issue16846] relative import solution

2013-01-03 Thread Georg Brandl
Georg Brandl added the comment: David, the issue is that Python only allows relative imports within packages. The OP wants to have a.py and b.py in the same directory and then be able to said from . import b in the a module. This is a design decision and will not change without a PEP.

[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2013-01-03 Thread Eli Bendersky
Eli Bendersky added the comment: On Tue, Jan 1, 2013 at 2:56 PM, Daniel Shahaf rep...@bugs.python.orgwrote: Daniel Shahaf added the comment: Eli Bendersky wrote on Tue, Jan 01, 2013 at 15:54:00 +: Why did you change the class name, by the way, I don't think it's a valid change at

[issue8952] Doc/c-api/arg.rst: fix documentation of number formats

2013-01-03 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: -haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8952 ___ ___ Python-bugs-list

[issue16748] Make CPython test package discoverable

2013-01-03 Thread Zachary Ware
Zachary Ware added the comment: Here's version 2 of the genericpath patch. Should I try to fix everything in one patch, or one patch per test module (or group of test modules like test_(generic|mac|nt|posix)path.py)? And if separate, should each one get its own issue, or just keep them all

[issue16835] Update PEP 399 to allow for test discovery

2013-01-03 Thread Zachary Ware
Zachary Ware added the comment: Thanks for the review, new patch attached. You're quite welcome. Is there anything I've missed in the process of reviewing itself? This is the first time I've reviewed a patch here... I did miss another nit in the prose, though; the tests methods in the

[issue16850] Atomic open + close-and-exec

2013-01-03 Thread STINNER Victor
New submission from STINNER Victor: Recent version on different operating systems support opening a file with close-on-exec flag set immediatly (atomic). This feature fixes a race condition when the process calls execv() between open() and fcntl() (to set the FD_CLOEXEC flag to the newly

[issue15067] Clean up the sqlite3 docs

2013-01-03 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file27829/sqlite3_cleanup_2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15067 ___

[issue15067] Clean up the sqlite3 docs

2013-01-03 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file27830/sqlite3_cleanup_3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15067 ___

[issue12105] open() does not able to set flags, such as O_CLOEXEC

2013-01-03 Thread STINNER Victor
STINNER Victor added the comment: Note that on Windows there is an O_NOINHERIT flag which almost corresponds to O_CLOEXEC on Linux. I don't think there is a need to use the win32 api. Ah yes. Because this issue is closed, I created the issue #16850 which is more specific to open +

[issue16848] Mac OS X: python-config --ldflags and location of Python.framework

2013-01-03 Thread Samuel John
Samuel John added the comment: Agreed. My patch, I did for Homebrew is to use the full path like so: PYTHONFRAMEWORKDIR= full/path/to/Frameworks/Python.framework instead of just `Python.framework`. -- ___ Python tracker rep...@bugs.python.org

[issue16850] Atomic open + close-and-exec

2013-01-03 Thread STINNER Victor
STINNER Victor added the comment: The problem is the find a portable and safe way to expose the feature A solution is to add a e mode to open() which would raise a NotImplementedError if the platform is not known to support this feature. For example, if the OS is linux, we would check if the

[issue16850] Atomic open + close-and-exec

2013-01-03 Thread Christian Heimes
Christian Heimes added the comment: You could do both: use the O_CLOEXEC flag and do a fcntl() call on POSIX. In my opinion it's enough to document that the x flag may be affected by a race condition issue on some operation systems. -- nosy: +christian.heimes

[issue12103] Document how to use open with os.O_CLOEXEC

2013-01-03 Thread STINNER Victor
STINNER Victor added the comment: x Open the file exclusively (like the O_EXCL flag of open(2)). If the file already exists, fopen() fails, and sets errno to EEXIST. This flag is ignored for fdopen(). Python 3.3 adds support for this mode: see issue #12760. e (since glibc 2.7)

[issue16836] configure script disables support for IPv6 on a system where IPv6 is disabled

2013-01-03 Thread Ralf Schmitt
Ralf Schmitt added the comment: Would you want to provide a patch for this? No, sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16836 ___

  1   2   >