Python Tools for Visual Studio 1.5 RC Released

2012-09-20 Thread Dino Viehland
We're pleased to announce the release of Python Tools for Visual Studio 1.5 RChttp://pytools.codeplex.com/releases/view/82130. Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python language. PTVS supports a broad range of

Re: Passing arguments to executing, a python script on a remote machine from a python script on local machine

2012-09-20 Thread ashish
On Thursday, September 20, 2012 10:39:28 AM UTC+5:30, Chris Angelico wrote: On Thu, Sep 20, 2012 at 2:27 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Wed, 19 Sep 2012 12:46:33 -0700, ashish wrote: 2. I have a python script, local.py, running on local which

Re: How to send email programmatically from a gmail email a/c when port 587(smtp) is blocked

2012-09-20 Thread Mark Lawrence
On 19/09/2012 20:12, ashish wrote: Folks, I asked the same query on the python tutor mailing list. The responses i received are here : http://thread.gmane.org/gmane.comp.python.tutor/77601 Mark, There is nothing wrong in asking a query on multiple forums. Poeple on the tutor list, may not

Re: Installing Pip onto a mac os x system

2012-09-20 Thread Hans Mulder
On 20/09/12 03:32:40, John Mordecai Dildy wrote: Does anyone know how to install Pip onto a mac os x ver 10.7.4? Ive tried easy_instal pip but it brings up this message (but it doesn't help with my problem): error: can't create or remove files in install directory The following error

Re: How to get the list of all my open file(descriptor)s and locks?

2012-09-20 Thread Hans Mulder
On 20/09/12 05:11:11, Chris Angelico wrote: On Thu, Sep 20, 2012 at 7:09 AM, Ian Kelly ian.g.ke...@gmail.com wrote: You could do: os.listdir(/proc/%d/fd % os.getpid()) This should work on Linux, AIX, and Solaris, but obviously not on Windows. On MacOS X, you can use os.listdir(/dev/fd)

[Q] How to exec code object with local variables specified?

2012-09-20 Thread Makoto Kuwata
Hi, Is it possible to run code object with local variables specified? I'm trying the following code but not work: def fn(): x = 1 y = 2 localvars = {'x': 0} exec(fn.func_code, globals(), localvars) print(localvars) ## what I expected is: {'x': 1, 'y': 2} ##

Re: Programming Issues

2012-09-20 Thread Dave Angel
On 09/19/2012 07:01 PM, Nathan Spicer wrote: Dave, You sent this response privately, which isn't the way the mailing list works. Private responses are good for thank-yous and for personal remarks of no interest to others. But you're short-circuiting the helping process if you don't let

Re: [Q] How to exec code object with local variables specified?

2012-09-20 Thread Peter Otten
Makoto Kuwata wrote: Is it possible to run code object with local variables specified? I'm trying the following code but not work: def fn(): x = 1 y = 2 localvars = {'x': 0} exec(fn.func_code, globals(), localvars) print(localvars) ## what I expected

Re: 'indent'ing Python in windows bat

2012-09-20 Thread Duncan Booth
Jason Friedman ja...@powerpull.net wrote: I'm converting windows bat files little by little to Python 3 as I find time and learn Python. The most efficient method for some lines is to call Python like: python -c import sys; sys.exit(3) How do I indent if I have something like: if

Fool Python class with imaginary members (serious guru stuff inside)

2012-09-20 Thread Jure Erznožnik
I'm trying to create a class that would lie to the user that a member is in some cases a simple variable and in other cases a class. The nature of the member would depend on call syntax like so: 1. x = obj.member #x becomes the simple value contained in member 2. x = obj.member.another_member #x

Re: Passing arguments to executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Emile van Sebille
On 9/19/2012 12:50 PM ashish said... Hi c.l.p folks Here is my situation 1. I have two machines. Lets call them 'local' 'remote'. Both run ubuntu both have python installed 2. I have a python script, local.py, running on 'local' which needs to pass arguments ( 3/4 string arguments,

How to limit CPU usage in Python

2012-09-20 Thread Rolando Cañer Roblejo
Hi all, Is it possible for me to put a limit in the amount of processor usage (% CPU) that my current python script is using? Is there any module useful for this task? I saw Resource module but I think it is not the module I am looking for. Some people recommend to use nice and cpulimit unix

Re: [Q] How to exec code object with local variables specified?

2012-09-20 Thread Makoto Kuwata
On Thu, Sep 20, 2012 at 10:15 PM, Peter Otten __pete...@web.de wrote: loc = {} exec(x = 1; y = 2, globals(), loc) loc {'y': 2, 'x': 1} However, this won't work with the code object taken from a function which uses a different a bytecode (STORE_FAST instead of STORE_NAME): Is there any

Re: [Q] How to exec code object with local variables specified?

2012-09-20 Thread Terry Reedy
On 9/20/2012 7:27 AM, Makoto Kuwata wrote: Is it possible to run code object with local variables specified? In the way you mean that, no. I'm trying the following code but not work: def fn(): x = 1 y = 2 localvars = {'x': 0} exec(fn.func_code, globals(),

Re: Passing arguments to executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Chris Rebert
On Wed, Sep 19, 2012 at 12:50 PM, ashish ashish.mak...@gmail.com wrote: snip 2. I have a python script, local.py, running on 'local' which needs to pass arguments ( 3/4 string arguments, containing whitespaces like spaces, etc ) to a python script, remote.py running on 'remote' (the remote

Re: A little morning puzzle

2012-09-20 Thread Tobiah
Here is my solution: ** Incredibly convoluted and maximally less concise solution than other offerings. ** Might be better ones though. Unlikely. Zing! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to limit CPU usage in Python

2012-09-20 Thread Terry Reedy
On 9/20/2012 11:12 AM, Rolando Cañer Roblejo wrote: Hi all, Is it possible for me to put a limit in the amount of processor usage (% CPU) that my current python script is using? Is there any module useful for this task? I saw Resource module but I think it is not the module I am looking for.

Re: How to limit CPU usage in Python

2012-09-20 Thread Terry Reedy
On 9/20/2012 12:46 PM, Terry Reedy wrote: On 9/20/2012 11:12 AM, Rolando Cañer Roblejo wrote: Hi all, Is it possible for me to put a limit in the amount of processor usage (% CPU) that my current python script is using? Is there any module useful for this task? I saw Resource module but I

Re: Fool Python class with imaginary members (serious guru stuff inside)

2012-09-20 Thread Terry Reedy
On 9/20/2012 9:52 AM, Jure Erznožnik wrote: I'm trying to create a class that would lie to the user that a member is in some cases a simple variable and in other cases a class. The nature of the member would depend on call syntax like so: 1. x = obj.member #x becomes the simple value contained

Re: How to limit CPU usage in Python

2012-09-20 Thread Jerry Hill
On Thu, Sep 20, 2012 at 11:12 AM, Rolando Cañer Roblejo rolando.ca...@cnic.edu.cu wrote: Hi all, Is it possible for me to put a limit in the amount of processor usage (% CPU) that my current python script is using? Is there any module useful for this task? I saw Resource module but I think it

Re: Passing arguments to executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Piet van Oostrum
Ismael Farfán sulfur...@gmail.com writes: How about something like this: os.system ( 'ssh remoteuser@remote python remote.py arg 1 arg 2 arg 3' ) That won't work. You need an additional level of quoting because ssh is also a shell so it adds another level of interpretation. The following

Re: Passing arguments to executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Piet van Oostrum
Chris Rebert c...@rebertia.com writes: Use the `subprocess` module instead (with shell=False). You then won't need to worry about escaping. http://docs.python.org/library/subprocess.html You will still need to worry about escaping because on the remote end you invoke ssh which is a shell. The

looping in array vs looping in a dic

2012-09-20 Thread giuseppe . amatulli
Hi, I have this script in python that i need to apply for very large arrays (arrays coming from satellite images). The script works grate but i would like to speed up the process. The larger computational time is in the for loop process. Is there is a way to improve that part? Should be

Development mode

2012-09-20 Thread py_lrnr
I am new to python and I have come across the following command and its description: Now to be able to run the project you will need to install it and its dependencies. python setup.py develop I looked up what the 'develop' argument does and found: Extra commands: develop

Re: looping in array vs looping in a dic

2012-09-20 Thread MRAB
On 2012-09-20 19:31, giuseppe.amatu...@gmail.com wrote: Hi, I have this script in python that i need to apply for very large arrays (arrays coming from satellite images). The script works grate but i would like to speed up the process. The larger computational time is in the for loop process.

Re: Fool Python class with imaginary members (serious guru stuff inside)

2012-09-20 Thread Steven D'Aprano
On Thu, 20 Sep 2012 06:52:07 -0700, Jure Erznožnik wrote: I'm trying to create a class that would lie to the user that a member is in some cases a simple variable and in other cases a class. The nature of the member would depend on call syntax like so: 1. x = obj.member #x becomes the simple

Re: How to limit CPU usage in Python

2012-09-20 Thread Christian Heimes
Am 20.09.2012 17:12, schrieb Rolando Cañer Roblejo: Hi all, Is it possible for me to put a limit in the amount of processor usage (% CPU) that my current python script is using? Is there any module useful for this task? I saw Resource module but I think it is not the module I am looking

Re: looping in array vs looping in a dic

2012-09-20 Thread Ian Kelly
On Thu, Sep 20, 2012 at 1:09 PM, MRAB pyt...@mrabarnett.plus.com wrote: for col in range(cols): for row in range(rows): cat = valuesCategory[row, col] ras = valuesRaster[row, col] totals[cat] += ras Expanding on what MRAB wrote, since you probably have far fewer

Re: looping in array vs looping in a dic

2012-09-20 Thread Ian Kelly
On Thu, Sep 20, 2012 at 1:28 PM, Ian Kelly ian.g.ke...@gmail.com wrote: Expanding on what MRAB wrote, since you probably have far fewer categories than pixels, you may be able to take better advantage of numpy's vectorized operations (which are pretty much the whole point of using numpy in the

When should I use development mode?

2012-09-20 Thread py_lrnr
I am new to python and I have come across the following command and its description: Now to be able to run the project you will need to install it and its dependencies. python setup.py develop I looked up what the 'develop' argument does and found: Extra commands: develop install

Re: When should I use development mode?

2012-09-20 Thread Ian Kelly
On Thu, Sep 20, 2012 at 1:38 PM, py_lrnr henryalpha...@hotmail.com wrote: Can anyone (very briefly) explain to me, in a sentence or two: what 'development mode' is? how 'development mode' differs from other 'modes'? why/when I would use 'development mode'? what 'development mode' does or

Re: Installing Pip onto a mac os x system

2012-09-20 Thread John Mordecai Dildy
Thank you Hans M. for some input. Now it shows the error of: sudo: easy_instal: command not found -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing Pip onto a mac os x system

2012-09-20 Thread John Gordon
In a316e0ba-8b7c-470e-b9cf-4c4647aa3...@googlegroups.com John Mordecai Dildy jdild...@gmail.com writes: Now it shows the error of: sudo: easy_instal: command not found Try 'easy_install' instead of 'easy_instal'. -- John Gordon A is for Amy, who fell down the stairs

Re: Installing Pip onto a mac os x system

2012-09-20 Thread John Mordecai Dildy
On Thursday, September 20, 2012 4:37:36 PM UTC-4, John Gordon wrote: In a316e0ba-8b7c-470e-b9cf-4c4647aa3...@googlegroups.com John Mordecai Dildy jdild...@gmail.com writes: Now it shows the error of: sudo: easy_instal: command not found Try 'easy_install' instead of

portable way of locating an executable (like which)

2012-09-20 Thread Gelonida N
I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Did anybody already implement such a function. If not, is there a portable way of splitting the environment variable PATH? Thanks for any sugestions

Re: portable way of locating an executable (like which)

2012-09-20 Thread Mark Lawrence
On 20/09/2012 22:06, Gelonida N wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Did anybody already implement such a function. Searching found nothing obvious to me :( If not, is there a

Re: portable way of locating an executable (like which)

2012-09-20 Thread Jason Swails
On Thu, Sep 20, 2012 at 5:06 PM, Gelonida N gelon...@gmail.com wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Did anybody already implement such a function. If not, is there a portable way

Re: portable way of locating an executable (like which)

2012-09-20 Thread Chris Angelico
On Fri, Sep 21, 2012 at 7:47 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 20/09/2012 22:06, Gelonida N wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Did anybody already implement

Re: portable way of locating an executable (like which)

2012-09-20 Thread Ian Kelly
On Thu, Sep 20, 2012 at 4:21 PM, Chris Angelico ros...@gmail.com wrote: os.sep is the directory separator, but os.pathsep may be what you want. Between that and os.getenv('path') you can at least get the directories. Then on Windows, you also need to check out os.getenv('pathext') and split

Re: portable way of locating an executable (like which)

2012-09-20 Thread Chris Angelico
On Fri, Sep 21, 2012 at 8:32 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Sep 20, 2012 at 4:21 PM, Chris Angelico ros...@gmail.com wrote: os.sep is the directory separator, but os.pathsep may be what you want. Between that and os.getenv('path') you can at least get the directories. Then

Re: portable way of locating an executable (like which)

2012-09-20 Thread Gelonida N
On 09/21/2012 12:21 AM, Chris Angelico wrote: On Fri, Sep 21, 2012 at 7:47 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 20/09/2012 22:06, Gelonida N wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and

Re: portable way of locating an executable (like which)

2012-09-20 Thread Gelonida N
On 09/21/2012 12:04 AM, Jason Swails wrote: Thanks a lot Jason, I've used the following in programs I write: def which(program): def is_exe(fpath): return os.path.exists(fpath) and os.access(fpath, os.X_OK) fpath, fname = os.path.split(program) if fpath: if

Re: looping in array vs looping in a dic

2012-09-20 Thread giuseppe . amatulli
Hi Ian and MRAB thanks to you input i have improve the speed of my code. Definitely reading in dic() is faster. I have one more question. In the dic() I calculate the sum of the values, but i want count also the number of observation, in order to calculate the average in the end. Should i

Re: portable way of locating an executable (like which)

2012-09-20 Thread Mark Lawrence
On 21/09/2012 00:15, Gelonida N wrote: On 09/21/2012 12:04 AM, Jason Swails wrote: Thanks a lot Jason, I've used the following in programs I write: def which(program): def is_exe(fpath): return os.path.exists(fpath) and os.access(fpath, os.X_OK) fpath, fname =

Re: looping in array vs looping in a dic

2012-09-20 Thread MRAB
On 2012-09-21 00:35, giuseppe.amatu...@gmail.com wrote: Hi Ian and MRAB thanks to you input i have improve the speed of my code. Definitely reading in dic() is faster. I have one more question. In the dic() I calculate the sum of the values, but i want count also the number of observation, in

Re: portable way of locating an executable (like which)

2012-09-20 Thread Nobody
On Thu, 20 Sep 2012 23:06:46 +0200, Gelonida N wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Note that which attempts to emulate the behaviour of execvp() etc. The exec(3) manpage will

Re: portable way of locating an executable (like which)

2012-09-20 Thread Dave Angel
On 09/20/2012 06:04 PM, Jason Swails wrote: On Thu, Sep 20, 2012 at 5:06 PM, Gelonida N gelon...@gmail.com wrote: I'd like to implement the equivalent functionality of the unix command /usr/bin/which The function should work under Linux and under windows. Did anybody already implement such

Re: portable way of locating an executable (like which)

2012-09-20 Thread Andrew Berg
On 2012.09.20 21:31, Dave Angel wrote: I don't have a Windows machine set up right now, but I believe there are two more directories to search, besides the ones described in the PATH variable. One is the current directory, and the other is the Windows directory (maybe also the xxx/system32

Re: Obnoxious postings from Google Groups

2012-09-20 Thread Robert Miles
On 9/16/2012 8:18 AM, Ben Finney wrote: Νικόλαος Κούρας nikos.gr...@gmail.com writes: Iam sorry i didnt do that on purpose and i dont know how this is done. Iam positng via google groups using chrome, thats all i know. It is becoming quite clear that some change has happened recently to

python idioms : some are confusing

2012-09-20 Thread Vineet
Amongst the python idioms, how the below-mentioned make sense? ## There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. --- In programming, there can be a number of ways, equally efficient, to do certain thing.

Re: python idioms : some are confusing

2012-09-20 Thread alex23
On Sep 21, 3:34 pm, Vineet vineet.deod...@gmail.com wrote: Amongst the python idioms, how the below-mentioned make sense? ## There should be one-- and preferably only one --obvious way to do it. --- In programming, there can be a number of ways, equally efficient, to do certain  thing. This

[issue15979] Improve timeit documentation

2012-09-20 Thread Ezio Melotti
Ezio Melotti added the comment: The sh syntax highlight can be enabled with: .. code-block:: sh $ ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15979 ___

[issue15977] Memory leak in _ssl.c

2012-09-20 Thread Daniel Sommermann
Daniel Sommermann added the comment: This patch looks good to me (it's exactly how I fixed it in my local build), although I'm not sure how to approve your patch so you can push it to the upstream. -- ___ Python tracker rep...@bugs.python.org

[issue15980] Non-escaped '\n' in docstrings

2012-09-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here are patches that escapes '\n' in docstrings of LWPCookieJar and (for 2.7 only) of email. -- assignee: docs@python components: Documentation files: escape_nl2.patch keywords: patch messages: 170794 nosy: docs@python, ezio.melotti, storchaka

[issue15980] Non-escaped '\n' in docstrings

2012-09-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27230/escape_nl2-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15980 ___

[issue15944] memoryviews and ctypes

2012-09-20 Thread Stefan Krah
Stefan Krah added the comment: As I understand it, you prefer memoryviews where the format is purely informational, whereas we now have typed memoryviews. Typed memoryviews are certainly useful, in fact they are present in Cython, see here for examples:

[issue15977] Memory leak in _ssl.c

2012-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2bdc8c8ea42e by Christian Heimes in branch 'default': Issue #15977: Fix memory leak in Modules/_ssl.c when the function _set_npn_protocols() is called multiple times http://hg.python.org/cpython/rev/2bdc8c8ea42e -- nosy: +python-dev

[issue15977] Memory leak in _ssl.c

2012-09-20 Thread Christian Heimes
Christian Heimes added the comment: Georg, here is another candidate for the new release candidate. Daniel, two equal patches are good enough as a patch review. The fix is simple and straight forward, too. Thanks for your report! -- assignee: - georg.brandl nosy: +georg.brandl

[issue15981] improve documentation of __hash__

2012-09-20 Thread Max
New submission from Max: In dev/reference/datamodel#object.__hash__, there are two paragraphs that seem inconsistent. The first paragraph seems to say that a class that overrides __eq__() *should* explicitly flag itself as unhashable. The next paragraph says that a class that overrides

[issue15982] asyncore.dispatcher does not handle windows socket error code correctly (namely WSAEWOULDBLOCK 10035)

2012-09-20 Thread Nicolai Ehemann
New submission from Nicolai Ehemann: There are some differences between win32 and other os socket implementations. One specific I found is that in windows, non-blocking socket apis will return WSAEWOULDBLOCK or 10035 instead of EWOULDBLOCK. This causes recv() in asyncore.dispatcher to raise

[issue15978] asyncore: included batteries don't fit

2012-09-20 Thread chrysn
chrysn added the comment: i'm aware this is ambitious, and hope that at least the individual sub-agendas will be manageable. as for vague, i can enhance it (i'd start refining the individual sub-agendas -- or do you think the big picture needs more details too?). integration of frameworks is

[issue15276] unicode format does not really work in Python 2.x

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

[issue15276] unicode format does not really work in Python 2.x

2012-09-20 Thread STINNER Victor
STINNER Victor added the comment: I fixed a similar bug in Python 3.3: issue #13706. changeset: 75231:f89e2f4cda88 user:Victor Stinner victor.stin...@haypocalc.com date:Fri Feb 24 00:37:51 2012 +0100 files: Include/unicodeobject.h Lib/test/test_format.py

[issue15276] unicode format does not really work in Python 2.x

2012-09-20 Thread STINNER Victor
STINNER Victor added the comment: I can't reproduce this with Python 2.7.3. locale.setlocale(locale.LC_NUMERIC, 'fr_FR') 'fr_FR' u'{:n}'.format(1) u'10 000' I don't understand why, but the all french locales are the same. Some french locale uses the standard ASCII space (U+0020) as

[issue15973] Segmentation fault on timezone comparison

2012-09-20 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Alexander, did you send a contributor agreement?. I don't see it in the tracker :-?? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15973 ___

[issue15972] wrong error message for os.path.getsize

2012-09-20 Thread STINNER Victor
STINNER Victor added the comment: It looks like os.stat() and os.path.getsize() converts the list into a byte string. It does something like: x=[]; y=bytes(x); print(y.decode(ascii)) x=[65, 66, 67]; y=bytes(x); print(y.decode(ascii)) ABC x=[None]; y=bytes(x); print(y.decode(ascii))

[issue15972] wrong error message for os.path.getsize

2012-09-20 Thread STINNER Victor
STINNER Victor added the comment: Functions of the os module uses PyUnicode_FSConverter() function (which uses PyBytes_Check() on bytes) in Python 3.2, whereas PyBytes_FromObject() is used in Python 3.3. Related change: changeset: 77597:27f9c26fdd8b user:Larry Hastings

[issue15972] wrong error message for os.path.getsize

2012-09-20 Thread STINNER Victor
STINNER Victor added the comment: Set the priority to release blocker until it is decided if this issue is a regression, or a new feature :-) -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org

[issue15960] logging.shutdown should cope with IO errors from handler.release methods

2012-09-20 Thread Nick Coghlan
Nick Coghlan added the comment: Dan and Amit worked out a patch for ConcurrentLogHandler (https://bugzilla.redhat.com/show_bug.cgi?id=858912) so I'm OK with rejecting this one. -- ___ Python tracker rep...@bugs.python.org

[issue12750] datetime.strftime('%s') should respect tzinfo

2012-09-20 Thread Mümin Öztürk
Mümin Öztürk added the comment: I made a patch for datetime.strftime('%s'). it takes tzinfo into consideration. datetime.datetime(1970,1,1).strftime(%s) '-7200' datetime.datetime(1970,1,1, tzinfo=datetime.timezone.utc).strftime(%s) '0' datetime.date still behave as naive

[issue15144] Possible integer overflow in operations with addresses and sizes.

2012-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, here is a new patch. The five new macros moved to pymacros.h and used in more files. -- Added file: http://bugs.python.org/file27232/align_operations2.patch ___ Python tracker rep...@bugs.python.org

[issue14783] Make int() and str() docstrings correct

2012-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It may be worth rewrite int() and str() so that the first argument was positional-only argument? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14783

[issue15144] Possible integer overflow in operations with addresses and sizes.

2012-09-20 Thread Mark Dickinson
Mark Dickinson added the comment: Apologies; I got distracted from the main point of this issue with the strict aliasing stuff, and then it fell off the to-do list. Unassigning; Antoine or Victor, do you want to take this? -- assignee: mark.dickinson -

[issue15983] multiprocessing JoinableQueue's join function with timeout

2012-09-20 Thread Karl Bicker
New submission from Karl Bicker: The multiprocessing.JoinableQueue's function join() should have a timeout argument so that one can check on other things while waiting for a queue to finish. As join() uses a condition to wait anyway, a timeout is easily implemented and passed to the

[issue15983] multiprocessing JoinableQueue's join function with timeout

2012-09-20 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15983 ___ ___

[issue15960] logging.shutdown should cope with IO errors from handler.release methods

2012-09-20 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: - vinay.sajip resolution: - wont fix stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15960

[issue14783] Make int() and str() docstrings correct

2012-09-20 Thread Ezio Melotti
Ezio Melotti added the comment: That would be backward incompatible, and there might be some valid (corner) cases to pass it as a keyword. Since people are usually not supposed to use it as a keyword arg, it doesn't matter much if the name is different if that makes the docs more

[issue15954] No error checking after using of the wcsxfrm()

2012-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I think the appropriate error is ValueError, at least if errno is EINVAL. With what message? msvcrt gives EILSEQ or ERANGE, but never EINVAL. EILSEQ is returned if LCMapString failed, and ERANE if the output buffer is too small. I don't see where

[issue15973] Segmentation fault on timezone comparison

2012-09-20 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Alexander, did you send a contributor agreement? At least twice. :-) -- keywords: +patch priority: normal - high stage: needs patch - commit review Added file: http://bugs.python.org/file27234/issue15973.diff

[issue15981] improve documentation of __hash__

2012-09-20 Thread R. David Murray
R. David Murray added the comment: This has already been fixed, and the change is visible in the online documentation. -- nosy: +r.david.murray resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - confusing docs with regard to __hash__

[issue15983] multiprocessing JoinableQueue's join function with timeout

2012-09-20 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15983 ___ ___ Python-bugs-list mailing

[issue15144] Possible integer overflow in operations with addresses and sizes.

2012-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Mark, please open a new discussion, so we don't lose it and that was the place for discussion. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15144 ___

[issue15944] memoryviews and ctypes

2012-09-20 Thread David Beazley
David Beazley added the comment: There's probably a bigger discussion about memoryviews for a rainy day. However, the number one thing that would save all of this in my book would be to make sure cast('B') is universally supported regardless of format including endianness--especially in the

[issue15944] memoryviews and ctypes

2012-09-20 Thread David Beazley
David Beazley added the comment: One followup note---I think it's fine to punt on cast('B') if the memoryview is non-contiguous. That's a rare case that's probably not as common. -- ___ Python tracker rep...@bugs.python.org

[issue15421] Calendar.itermonthdates OverflowError

2012-09-20 Thread Skip Montanaro
Skip Montanaro added the comment: LGTM -- nosy: +skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15421 ___ ___ Python-bugs-list

[issue15984] Wrong documentation for PyUnicode_FromObject()

2012-09-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In the documentation it is written that PyUnicode_FromObject() is a shortcut for PyUnicode_FromEncodedObject(). But PyUnicode_FromObject() is not call PyUnicode_FromEncodedObject() direct nor indirect. PyUnicode_FromObject() works only with unicode and

[issue15421] Calendar.itermonthdates OverflowError

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

[issue15985] round() has wrong argument names

2012-09-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15985 ___ ___

[issue15985] round() has wrong argument names

2012-09-20 Thread Chris Jerdonek
New submission from Chris Jerdonek: The documentation for round() says: round(x[, n]) Return the floating point value x rounded to n digits after the decimal point. If n is omitted, it defaults to zero. Delegates to x.__round__(n). (from http://docs.python.org/dev/library/functions.html#round

[issue15985] round() has wrong argument names

2012-09-20 Thread Mark Dickinson
Mark Dickinson added the comment: A case where fixing the names improves both accuracy *and* readability! -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15985 ___

[issue15421] Calendar.itermonthdates OverflowError

2012-09-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Context: http://issues.roundup-tracker.org/issue2550765 -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15421 ___

[issue15421] Calendar.itermonthdates OverflowError

2012-09-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15421 ___ ___

[issue15972] wrong error message for os.path.getsize

2012-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. Are there any tests for string and bytes arguments as filenames? I will add float and list there. -- keywords: +patch Added file: http://bugs.python.org/file27235/posix_path_converter.patch ___

[issue15986] memoryview: expose 'buf' attribute

2012-09-20 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- components: Interpreter Core nosy: dabeaz, skrah priority: normal severity: normal stage: needs patch status: open title: memoryview: expose 'buf' attribute type: enhancement versions: Python 3.4

[issue15987] Provide a way to compare AST nodes for equality recursively

2012-09-20 Thread Julian Berman
New submission from Julian Berman: As is, as far as I can tell, there's no way to easily compare two AST nodes to see if they have the same children and same fields (recursively). I'm writing some unit tests for a NodeTransformers, so I've settled for comparing `ast.dump()`s of each, which is

[issue15144] Possible integer overflow in operations with addresses and sizes.

2012-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch! These macros will be useful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15144 ___

[issue15988] Inconsistency in overflow error messages of integer argument

2012-09-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyArg_ParseTuple raises inconsistent overflow error messages for small integer formats. For example: import _testcapi _testcapi.getargs_b(100) 100 _testcapi.getargs_b(1000) Traceback (most recent call last): File stdin, line 1, in module

[issue15985] round() has wrong argument names

2012-09-20 Thread Chris Jerdonek
Chris Jerdonek added the comment: Here is a patch. Also, I checked, and there is already a test for the keyword arguments: http://hg.python.org/cpython/file/dcced3bd22fe/Lib/test/test_builtin.py#l1239 -- keywords: +needs review, patch stage: needs patch - patch review Added file:

[issue15144] Possible integer overflow in operations with addresses and sizes.

2012-09-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 99112b851b25 by Antoine Pitrou in branch 'default': Issue #15144: Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t. http://hg.python.org/cpython/rev/99112b851b25 -- nosy:

[issue15144] Possible integer overflow in operations with addresses and sizes.

2012-09-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in 3.3(.1). -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 3.3 -Python 3.4 ___ Python tracker rep...@bugs.python.org

  1   2   >