GOZERBOT 0.9.2 RELEASED
Hello new world ! i’m glad to announce the release of version GOZERBOT 0.9.2, a bot that has been declared dead but has arrived from the pits of hell to serve our people here well ;] Discovered that SQLAlchemy has been fixed in such a way that it was easy to resurrect the thing, and release a new version of it. It’s not my intention to still maintain GOZERBOT as i prefer users to switch to JSONBOT but this switch is to be done in such a way that GOZERBOT users can port their data to JSONBOT in a proper way. Having GOZERBOT still up and running makes it easier for me to write the converting software as a GOZERBOT plugin, in which case i have better access to the data then when i have to access it from the outside. Ofcourse the conversion plugin is still to be written, but i hope that current GOZERBOT users can wait a little while before that is in place ;] You can get the new version from http://gozerbot.googlecode.com. For those who want to have a look at the future check http://jsonbot.org Well thats new from a happy camper that suddenly finds his path ahead. Grtx, Bart -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
[Reminder] 1 more week till Early Bird for PyCon Ireland 2011 ends
Hi All, Early bird (€50) will be available till Thursday, 30th June, only one more week to go! Student tickets (€40) and Normal tickets (€60) are also available for PyCon Ireland 2011 (Sat 8th - Sun 9th Oct). You can register here: https://secure.python.ie/pycon-ireland-2011/ Interested in giving a talk? You can submit your talks here: http://www.python.ie/pyconireland/callfor/#paper Interested in sponsoring PyCon Ireland 2011? Register interest here: http://www.python.ie/pyconireland/callfor/#sponsor More information: http://python.ie/pyconireland/ Cheers, /// Vicky Lee (PyCon Ireland 2011 Committee) ~ ~~ http://irishbornchinese.com ~~ ~~ http://www.python.ie ~~ ~ -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Python User Group International Survey
The PSF is happy to launch today an international survey of Pythonuser group organizers to help it better serve the large and ever-expanding international Python user community. The survey contains questions on user group organization, events, demographics, and growth. There are some questions with numerical answers, and while your best guess is fine, you may find it helpful to gather some statistics on your user group membership before starting the survey (example statistics include the number of active members and the size and topics for recent user group events). We expect this survey to take around 30 minutes to complete. We appreciate your time and honesty in answering these questions. The PSF blog post announcing the survey: http://pyfound.blogspot.com/2011/06/tell-us-about-your-user-group.html The survey was written by Jessica McKellar (http://jesstess.com), organizer for the Boston Python Meetup (http://meetup.bostonpython.com), and Jesse Noller (http://jessenoller.com/), PSF board member and PyCon chair with input and feedback from survey specialists and others. https://www.surveymonkey.com/s/BWLG8SZ The survey was pretested with a handful of user group organizers, and their answers were phenomenal. Organizers have tons to say about these topics, and we hope to get a lot of great, actionable data for strengthening the relationship between the PSF and Python user groups out of this effort. Outreach, education, diversity and community building are critical for Python as a community, and the Foundation - this data should greatly assist in our targeting our resources and furthering the mission of the Foundation in all ways. Thank you The Python Software Foundation Jessica McKellar Jesse Noller -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
[ANN]: circuits 1.6 [oceans] (Lightweight Event driven Asynchronous Application Framework)
Hi, I'm pleased to announce the release of circuits 1.6 [oceans] This release adds full Python 3 compatibility and support while dropping the support for Python 2.5 (a maintainable branch will be kept available).. Also included in this release is the new and exciting greenlet support bringing easy-to-use core functionality with a synchronous-like API on top of circuits. This release also includes a number of minor bug fixes and greater test coverage. For more information see the PyPi page: pypi.python.org/pypi/circuits/ cheers James James Mills / prologic Developer | circuits, sahriswiki prolo...@shortcircuit.net.au | softcircuit.com.au Twitter: therealprologic -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
PyCon AU gender diversity grants for women in Python!
PyCon AU gender diversity grants for women in Python PyCon AU is pleased to announce that it will be offering two gender diversity delegate grants to women who wish to attend PyCon AU in 2011. These grants will *both* cover full registration costs; in addition, one of the grants will cover up to $AUD500 of travel and accommodation costs for a woman living outside of the Sydney region to attend. These grants aim to reduce the financial barriers to attending PyCon AU 2011, by subsidising the registration and travel costs of people from diverse groups, who contribute in important ways to the Python community. More information can be found at http://pycon-au.org/2011/grants/ Eligibility --- In order to be eligible for one of the grants, you must be: * a woman, aged 18 or older * professional, hobbyist or student interested in, or currently working in Python-related fields or projects * planning to attend both days of PyCon AU 2011 In order to be eligible for the travel and accommodation grant, you must additionally: * live further than 150 km from the conference venue. (If you are unsure, please visit http://maps.google.com.au/maps/place?q=66+Goulburn+St,+Sydney,+NSW+2000 and use the Get Directions link in the upper left-hand corner to calculate the driving distance from your place of residence to the venue.) More information can be found at http://pycon-au.org/2011/grants/ Award Amount Both selected grant recipients will receive a free Full registration to PyCon AU (including a seat at the conference dinner on Saturday night), worth $198. In addition, the recipient of the travel and accommodation grant will be reimbursed up to $500 in travel and accommodation costs. More information can be found at http://pycon-au.org/2011/grants/ Timeline Applications for the gender diversity delegates grants are open now, and will close on **8th of July**. We will notify all successful recipients of their award by **15th of July** so that you can have ample time to complete your travel plans. More information can be found at http://pycon-au.org/2011/grants/ Tim 'mithro' Ansell PyConAU Organiser -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
[ANN] Tutorials at PyCon DE 2011, Leipzig, Germany
PyCon DE 2011 - Tutorial-Program The program of tutorials at PyCon DE 2011 is finalized [1]. There are 12 three-hour tutorials covering a wide range of Python topics such as Python for newbies, web development, algorithms, tests, data analysis, databases or Cython. The instructors are all experienced Python developers with profound knowledge in Python as well as their special domain. They can answer even challenging questions. The tutorial day is an amazing opportunity to deepen your Python knowledge. __ Mike [1] http://de.pycon.org/2011/schedule/tutorials/ PyCon DE 2011 - Tutorial-Programm = Das Tutorial-Programm [1] für die PyCon DE 2011 ist veröffentlicht. Insgesamt 12 drei-stündige Tutorials bieten eine breite Palette von Python-Themen wie Python für Einsteiger, Web-Entwicklung, Algorithmen, Tests, Datenanalyse, Datenbanken oder Cython. Die Referenten sind alle erfahrene Python-Entwickler mit ausgewiesenem, profunden Wissen in Python und ihrem Spezialgebiet, die auch anspruchsvolle Fragen beantworten können. Der Tutorial-Tag der PyCon DE bietet eine tolle Gelegenheit sein Python-Wissen zu erweitern. Viele Grüße, Mike [1] http://de.pycon.org/2011/schedule/tutorials/ -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
Pydev 2.2.0 Released
Hi All, Pydev 2.2.0 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- **Eclipse 3.7** * Eclipse 3.7 (Indigo) is now supported. **Break on Exceptions** * It's now possible to **break on caught exceptions** in the debugger. * There's an UI to break on caught or uncaught exceptions (menu: Run Manage Python Exception Breakpoints). **Hierarchy view** * UI improved (now only uses SWT -- access through F4 with the cursor over a class). **PyPy**: * PyDev now supports PyPy (can be configured as a regular Python interpreter). **Django** * Django configuration in project properties page (improved UI for configuration of the django manage.py and django settings module). * Improved support for debugging Django with autoreload. Details at: http://pydev.org/manual_adv_remote_debugger.html#django-remote-debugging-with-auto-reload **Code analysis** * Fixed issue where a resolution of a token did not properly consider a try..except ImportError (always went for the first match). * Fixed issue with relative import with wildcards. * Fixed issue with relative import with alias. * Fixed issue where binary files would be wrongly parsed (ended up generating errors in the error log). **Code completion** * Improved sorting of proposals (__*__ come at last) **Others** * Improved ctrl+1 quick fix with local import. * Fixed issue running with py.test. * PyDev test runner working properly with unittest2. * Fixed compatibility issue with eclipse 3.2. * No longer sorting libraries when adding interpreter/added option to select all not in workspace. * Fixed deadlock in the debugger when dealing with multiple threads. * Fixed debugger issue (dictionary changing size during thread creation/removal on python 3.x). What is PyDev? --- PyDev is a plugin that enables users to use Eclipse for Python, Jython and IronPython development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. Cheers, -- Fabio Zadrozny -- Software Developer Appcelerator http://appcelerator.com/ Aptana http://aptana.com/ Pydev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/
PyCon AU gender diversity grants for women in Python!
PyCon AU gender diversity grants for women in Python PyCon AU is pleased to announce that it will be offering two gender diversity delegate grants to women who wish to attend PyCon AU in 2011. These grants will *both* cover full registration costs; in addition, one of the grants will cover up to $AUD500 of travel and accommodation costs for a woman living outside of the Sydney region to attend. These grants aim to reduce the financial barriers to attending PyCon AU 2011, by subsidising the registration and travel costs of people from diverse groups, who contribute in important ways to the Python community. More information can be found at http://pycon-au.org/2011/grants/ Eligibility --- In order to be eligible for one of the grants, you must be: * a woman, aged 18 or older * professional, hobbyist or student interested in, or currently working in Python-related fields or projects * planning to attend both days of PyCon AU 2011 In order to be eligible for the travel and accommodation grant, you must additionally: * live further than 150 km from the conference venue. (If you are unsure, please visit http://maps.google.com.au/maps/place?q=66+Goulburn+St,+Sydney,+NSW+2000 and use the Get Directions link in the upper left-hand corner to calculate the driving distance from your place of residence to the venue.) More information can be found at http://pycon-au.org/2011/grants/ Award Amount Both selected grant recipients will receive a free Full registration to PyCon AU (including a seat at the conference dinner on Saturday night), worth $198. In addition, the recipient of the travel and accommodation grant will be reimbursed up to $500 in travel and accommodation costs. More information can be found at http://pycon-au.org/2011/grants/ Timeline Applications for the gender diversity delegates grants are open now, and will close on **8th of July**. We will notify all successful recipients of their award by **15th of July** so that you can have ample time to complete your travel plans. More information can be found at http://pycon-au.org/2011/grants/ Tim 'mithro' Ansell PyConAU Organiser -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
* Gelonida (Sun, 26 Jun 2011 23:53:15 +0200) On this machine I used os.mkdir() / os.makedirs() and I had permission problems , but only on Windows7. Windows file permissions haven't changed since 1995. The only addition was dynamic inheritance support back in 2000. I expect, that the win32 libraries might have function calls allowing to control the permissions of a directory, but I am really bad with win32 as I worked mostly with Linux or code, that was platform independent, which Windows file permission handling is not :-( . Even Linux file systems have ACL support. It's only that few people use it since application support is sparse. And it lacks (dynamic) inheritance which is so 1980s. Thorsten -- http://mail.python.org/mailman/listinfo/python-list
Re: Python Bluetooth
On Mon, Jun 27, 2011 at 2:32 AM, Valentin de Pablo Fouce thi...@gmail.com wrote: Hi all, I'm looking for developing a bluetooth application in python, and I'm looking for the most suitable python library for it. Googling some time I found pyBluez (http://code.google.com/p/pybluez/), however, the library seems to be stopped since end 2009 (latest update Nov 2009) and not to many work since then. Is there any other library? blueman is written in python and works fine with latest bluez lib. It uses dbus for interaction with bluez, you can try using their wrapper for your own app. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list
Python basic program problem
Hi, I am fairly new to python, I am trying to write simple code and It is giving me syntax error. I am reading a book and following the directions as it says in the book but I am not sure why it is not working. Please guide me through. Any help appreciated. x = 2 if x == 2: print This is a test SyntaxError: invalid syntax if x == 2: print This is a test SyntaxError: invalid syntax x = 2 if x = 2: SyntaxError: invalid syntax if x == 2: print This is test SyntaxError: invalid syntax Type copyright, credits or license() for more information. SyntaxError: invalid syntax print this is a test SyntaxError: invalid syntax import keyword print keyword.kwlist SyntaxError: invalid syntax print hellow world SyntaxError: invalid syntax print 'hellow world' SyntaxError: invalid syntax -- http://mail.python.org/mailman/listinfo/python-list
Re: Python basic program problem
On Mon, Jun 27, 2011 at 8:05 AM, Amaninder Singh asingh0...@gmail.com wrote: Hi, I am fairly new to python, I am trying to write simple code and It is giving me syntax error. I am reading a book and following the directions as it says in the book but I am not sure why it is not working. Please guide me through. Any help appreciated. x = 2 if x == 2: print This is a test SyntaxError: invalid syntax if x == 2: print This is a test SyntaxError: invalid syntax x = 2 if x = 2: SyntaxError: invalid syntax if x == 2: print This is test SyntaxError: invalid syntax Type copyright, credits or license() for more information. SyntaxError: invalid syntax print this is a test SyntaxError: invalid syntax import keyword print keyword.kwlist SyntaxError: invalid syntax print hellow world SyntaxError: invalid syntax print 'hellow world' SyntaxError: invalid syntax Looks like you're using the 3.x version, while your guide is 2.x. I suggest you download the 2.x version, or find a new tutorial. HTH -- http://mail.python.org/mailman/listinfo/python-list
Re: Python basic program problem
On Mon, Jun 27, 2011 at 6:05 PM, Amaninder Singh asingh0...@gmail.com wrote: print this is a test SyntaxError: invalid syntax Most likely, you are running python 3.x, while reading python 2.x book. In python 3.x print is now ordinary function, print('hello world') hello world In future, please include full tracebacks and python version info. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list
Re: Python basic program problem
On 2011.06.27 02:05 AM, Amaninder Singh wrote: Hi, I am fairly new to python, I am trying to write simple code and It is giving me syntax error. I am reading a book and following the directions as it says in the book but I am not sure why it is not working. Looks like the book you're reading is outdated and refers to Python 2. In Python 3, print is a function: print('Hello there') -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
On 26/06/2011 21:57, Gelonida wrote: Hi, What do I have to do under python windows to create a directory with all permissions, such, that new files / directories created below will inherit the permissions. The reason I am asking is, that I'd like to create a directory structure where multiple users should be allowed to read / write / create files and directories. Alternatively it would be even better to specify exactly which users should be allowed to access the directory tree. I never used / modified Windows file permissions except once or twice via explorer. I'm thus a little shaky with Microsoft's file permissions. Have a look at this to see if takes you anywhere: http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html TJG -- http://mail.python.org/mailman/listinfo/python-list
Re: what's the big deal for print()
steve+comp.lang.pyt...@pearwood.info wrote: Unfortunately, while that gets rid of the newline, it also leaves spaces between items: def example(): ... print 1, ... print 2, ... print 3 ... example() 1 2 3 Here's the Python 3 version: def example(): ... print(1, sep='', end='') ... print(2, sep='', end='') ... print(3, sep='') ... example() 123 To get the same result in Python 2, you have to use sys.stdout.write (). That isn't entirely true: you could set the `softspace` attribute on sys.stdout, but that is even messier. def foo(): ... print 1, ... sys.stdout.softspace=0 ... print 2, ... sys.stdout.softspace=0 ... print 3 ... foo() 123 -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
Hi Tim, On 6/27/2011 9:39 AM, Tim Golden wrote: On 26/06/2011 21:57, Gelonida wrote: Hi, What do I have to do under python windows to create a directory with all permissions, such, that new files / directories created below will inherit the permissions. . . . I never used / modified Windows file permissions except once or twice via explorer. I'm thus a little shaky with Microsoft's file permissions. Have a look at this to see if takes you anywhere: http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html That's exactly the kind of link I was looking for. Thanks a lot. For the current existing code I can just replace all open(fname, w) calls with a custom wrapper and I should be fine. One thing, which I would still like to know (though I don't need it for my current task) is what to do to to setup an ACE on a directory, such, that all entries below will inherit the directory's access settings. I will look into this lateron. -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
On 6/27/2011 7:21 AM, Thorsten Kampe wrote: * Gelonida (Sun, 26 Jun 2011 22:57:57 +0200) What do I have to do under python windows to create a directory with all permissions, such, that new files / directories created below will inherit the permissions. Exactly nothing (except creating the directory, of course). :-) I thought so as well. I asume the security settings of the directory below which I created mine were setup to give no write permission to Everybody. If I changed the parent directories security settings with the explorer everything behaved fine. So if the parent directories security settings are unknown it seems mkdir() is not sufficient and I have to use some win32 calls as mentioned in the url of Tim's reply to have the correct settings. http://timgolden.me.uk/python/win32_how_do_i/add-security-to-a-file.html The reason I am asking is, that I'd like to create a directory structure where multiple users should be allowed to read / write / create files and directories. Alternatively it would be even better to specify exactly which users should be allowed to access the directory tree. I never used / modified Windows file permissions except once or twice via explorer. I'm thus a little shaky with Microsoft's file permissions. Microsoft's permission handling hasn't changed in the last eleven years. So you had a lot of time to learn about it. but never the need so far. Do you see this Learn about access control and permissions link when you're in the security tab? Just click on it. Will click Thorsten -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
On 2011.06.26 03:57 PM, Gelonida wrote: The reason I am asking is, that I'd like to create a directory structure where multiple users should be allowed to read / write / create files and directories. This may not require pywin32 - by default there's a public directory at os.environ['public'] (usually C:\Users\Public), at least in Vista and 7. There's probably a similar directory in earlier versions of Windows, but I don't know where they are (might still be os.environ['public']). Alternatively it would be even better to specify exactly which users should be allowed to access the directory tree. This will definitely require pywin32. -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
(You top-posted your reply, instead of writing your response following the part you were quoting) On 01/-10/-28163 02:59 PM, Lalitha Prasad K wrote: In numerical analysis there is this concept of machine zero, which is computed like this: e=1.0 while 1.0+e 1.0: e=e/2.0 print e The number e will give you the precision of floating point numbers. Lalitha Prasad That particular algorithm is designed for binary floating point. The OP was asking about Decimal instances. So you'd want to divide by 10.0 each time. And of course you'd want to do it with Decimal objects. On Sun, Jun 26, 2011 at 9:05 PM, Harolddadap...@googlemail.com wrote: I'm curious. Is there a way to get the number of significant digits for a particular Decimal instance? DaveA -- http://mail.python.org/mailman/listinfo/python-list
Pydev 2.2.0 Released
Hi All, Pydev 2.2.0 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- **Eclipse 3.7** * Eclipse 3.7 (Indigo) is now supported. **Break on Exceptions** * It's now possible to **break on caught exceptions** in the debugger. * There's an UI to break on caught or uncaught exceptions (menu: Run Manage Python Exception Breakpoints). **Hierarchy view** * UI improved (now only uses SWT -- access through F4 with the cursor over a class). **PyPy**: * PyDev now supports PyPy (can be configured as a regular Python interpreter). **Django** * Django configuration in project properties page (improved UI for configuration of the django manage.py and django settings module). * Improved support for debugging Django with autoreload. Details at: http://pydev.org/manual_adv_remote_debugger.html#django-remote-debugging-with-auto-reload **Code analysis** * Fixed issue where a resolution of a token did not properly consider a try..except ImportError (always went for the first match). * Fixed issue with relative import with wildcards. * Fixed issue with relative import with alias. * Fixed issue where binary files would be wrongly parsed (ended up generating errors in the error log). **Code completion** * Improved sorting of proposals (__*__ come at last) **Others** * Improved ctrl+1 quick fix with local import. * Fixed issue running with py.test. * PyDev test runner working properly with unittest2. * Fixed compatibility issue with eclipse 3.2. * No longer sorting libraries when adding interpreter/added option to select all not in workspace. * Fixed deadlock in the debugger when dealing with multiple threads. * Fixed debugger issue (dictionary changing size during thread creation/removal on python 3.x). What is PyDev? --- PyDev is a plugin that enables users to use Eclipse for Python, Jython and IronPython development -- making Eclipse a first class Python IDE -- It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others. Cheers, -- Fabio Zadrozny -- Software Developer Appcelerator http://appcelerator.com/ Aptana http://aptana.com/ Pydev - Python Development Environment for Eclipse http://pydev.org http://pydev.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list
Re: windows 7 create directory with read write execute permission for everybody
* Gelonida (Mon, 27 Jun 2011 11:32:45 +0200) One thing, which I would still like to know (though I don't need it for my current task) is what to do to to setup an ACE on a directory, such, that all entries below will inherit the directory's access settings. Such a thing does not exist. Thorsten -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
On Jun 25, 9:04 pm, Chris Torek nos...@torek.net wrote: I'm curious. Is there a way to get the number of significant digits for a particular Decimal instance? Yes: def sigdig(x): return the number of significant digits in x return len(x.as_tuple()[1]) Great, Chris, this is (almost) exactly what I needed. To make it work for numbers like 1200, that have four digits but only two of them being significant, I changed your snippet to the following: class Empirical(Decimal) : @property def significance(self) : t = self.as_tuple() if t[2] 0 : return len(t[1]) else : return len(''.join(map(str,t[1])).rstrip('0')) Empirical('1200.').significance 2 Empirical('1200.0').significance 5 now it's only about overriding the numerical operators :) -- http://mail.python.org/mailman/listinfo/python-list
Read barcode from the PDF document
I have PDF document which consist of barcode characters. Now how can I read these barcode characters using python code? Or how can I recognize this barcode? -- http://mail.python.org/mailman/listinfo/python-list
Struggling with sorted dict of word lengths and count
Dear Python Programmers, I am a Python newby and I need help with my code: I have done parts of it but I can't get what I need: I need to manipulate text to come up with word lengths and their frequency:ie how many 1-letter words in a text how many 2-letter words in a text, etc I believe I am on the right path, but I can't get it right, I hope someone can shed some light: Code below. import string import sys def word_length(word): for p in string.punctuation: word = word.replace(p, ) # replace any punctuation symbol with empty string return len(word) def fileProcess(filename = open('input_text.txt', 'r')): #Need to show word count(ascending order) for each of the word lengths that has been encountered. # print (Length \t + Count)#print header for all numbers freq = {} #empty dict to accumulate word count and word length for line in filename: for word in line.lower().split( ):#split lines into words and make lower case wordlen = word_length(word)#run function to return length of each word freq[wordlen] = freq.get(wordlen, 0) + 1#increment the stored value if there is one, or initialize print(word, wordlen, freq[wordlen]) fileProcess() -- http://mail.python.org/mailman/listinfo/python-list
module problem on windows 64bit
Hello, on 32-bit windows everything works ok but on 64-bit win I am getting this error: Traceback (most recent call last): File app.py, line 1040, in do_this_now File kinterbasdb\__init__.pyc, line 119, in module File kinterbasdb\_kinterbasdb.pyc, line 12, in module File kinterbasdb\_kinterbasdb.pyc, line 10, in __load ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. How to get it work on 64bit windows as well? many thanks -- http://mail.python.org/mailman/listinfo/python-list
module problem on windows 64bit
Hello, on 32-bit windows everything works ok but on 64-bit win I am getting this error: Traceback (most recent call last): File app.py, line 1040, in do_this_now File kinterbasdb\__init__.pyc, line 119, in module File kinterbasdb\_kinterbasdb.pyc, line 12, in module File kinterbasdb\_kinterbasdb.pyc, line 10, in __load ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. How to get it work on 64bit windows as well? many thanks -- http://mail.python.org/mailman/listinfo/python-list
can I distribute Microsoft.VC90.CRT files?
hello, I find out that my program needs Microsoft.VC90.CRT.manifest,msvcm90.dll,msvcp90.dll,msvcr90.dll files when I want to run it on win 64bit systems. I find these files in some other software. Can I simply take it from another software then include it to my program folder and distribute it this way? Is it violation or not? -- http://mail.python.org/mailman/listinfo/python-list
can I distribute Microsoft.VC90.CRT files?
hello, I find out that my program needs Microsoft.VC90.CRT.manifest,msvcm90.dll,msvcp90.dll,msvcr90.dll files when I want to run it on win 64bit systems. I find these files in some other software. Can I simply take it from another software then include it to my program folder and distribute it this way? Is it violation or not? -- http://mail.python.org/mailman/listinfo/python-list
Re: can I distribute Microsoft.VC90.CRT files?
miamia wrote: hello, I find out that my program needs Microsoft.VC90.CRT.manifest,msvcm90.dll,msvcp90.dll,msvcr90.dll files when I want to run it on win 64bit systems. I find these files in some other software. Can I simply take it from another software then include it to my program folder and distribute it this way? Is it violation or not? Read the EULA that comes with Microsoft Visual C++ Redistributable Package. -- //Aho -- http://mail.python.org/mailman/listinfo/python-list
Re: Struggling with sorted dict of word lengths and count
On Tue, Jun 28, 2011 at 3:00 AM, Cathy James nambo...@gmail.com wrote: def fileProcess(filename = open('input_text.txt', 'r')): for line in filename: for word in line.lower().split( ):#split lines into words and make lower case wordlen = word_length(word)#run function to return length of each word freq[wordlen] = freq.get(wordlen, 0) + 1#increment the stored value if there is one, or initialize print(word, wordlen, freq[wordlen]) fileProcess() Yep, you're pretty close! There's a few improvements you could do, but the first one I would recommend is to change your extremely confusing variable name: def fileProcess(filename = 'input_text.txt'): for line in open(filename, 'r'): ... continue as before ... As well as making your code easier to comprehend, this means that the file will correctly be opened at the start of the function and closed at the end. (Default arguments are evaluated when the def statement is executed, not when the function's called.) The other change you need to make is to move the display into a loop of its own. Currently you're printing out one word and one length from each line, which isn't terribly useful. Try this: for wordlen, wordfreq in freq.enumerate(): print(wordlen+\t+wordfreq); This should be outside the 'for line in' loop. There's a few other improvements possible (look up 'collections.Counter' for instance), but this should get you on the right track! Chris Angelico aka Rosuav -- http://mail.python.org/mailman/listinfo/python-list
Re: Struggling with sorted dict of word lengths and count
On Tue, Jun 28, 2011 at 3:00 AM, Cathy James nambo...@gmail.com wrote: for word in line.lower().split( ):#split lines into words and make lower case By the way, side point: There's not much point lower-casing the line when all you care about is the lengths of words :) ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: those darn exceptions
On 6/21/2011 2:51 PM, Chris Torek wrote: On Tue, 21 Jun 2011 01:43:39 +, Chris Torek wrote: But how can I know a priori that os.kill() could raise OverflowError in the first place? If you passed an integer that was at some time a valid PID to os.kill(), and OverflowError was raised, I'd consider that a bug in os.kill(). Only OSError, or some subclass thereof, should be raised for a possibly-valid PID. If you passed some unreasonably large number, that would be a legitimate reason for an OverflowError. That's for parameter errors, though; it shouldn't happen for environment errors. That's a strong distinction. If something can raise an exception because the environment external to the process has a problem, the exception should be an EnvironmentError or a subclass thereof. This maintains a separation between bugs (which usually should cause termination or fairly drastic recovery action) and normal external events (which have to be routinely handled.) It's quite possible to get a OSError on os.kill() for a number of legitimate reasons. The target process may have exited since the PID was obtained, for example. John Nagle -- http://mail.python.org/mailman/listinfo/python-list
Re: module problem on windows 64bit
Am 27.06.2011 19:02, schrieb Peter Irbizon: Hello, on 32-bit windows everything works ok but on 64-bit win I am getting this error: Traceback (most recent call last): File app.py, line 1040, in do_this_now File kinterbasdb\__init__.pyc, line 119, in module File kinterbasdb\_kinterbasdb.pyc, line 12, in module File kinterbasdb\_kinterbasdb.pyc, line 10, in __load ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. How to get it work on 64bit windows as well? many thanks Are you running 32bit or 64bit Python on your 64bit Windows box? You have to install the same flavour of Python, kinterbasdb and Firebird SQL (all 32bit or all 64bit). You also have to check the copy client dlls to system directory check box during the installation of Firebird SQL. I guess that you have a 32bit installation of Python but a 64bit installation of Firebird SQL. Christian -- http://mail.python.org/mailman/listinfo/python-list
Re: module problem on windows 64bit
Are you running 32bit or 64bit Python on your 64bit Windows box? You have to install the same flavour of Python, kinterbasdb and Firebird SQL (all 32bit or all 64bit). You also have to check the copy client dlls to system directory check box during the installation of Firebird SQL. I guess that you have a 32bit installation of Python but a 64bit installation of Firebird SQL. Christian well, my program exe generated from py2exe. I am running Python 2.7 on my win xp 32bit box then I compile my application with py2exe. After that I can use it on other computers (on 32bit everything works perfect) but on 64 bit windows I am getting this error. :( -- http://mail.python.org/mailman/listinfo/python-list
Re: can I distribute Microsoft.VC90.CRT files?
Read the EULA that comes with Microsoft Visual C++ Redistributable Package. thanks. hm, but it looks like every user should download redistributable package and then istall it, right? I would like to prevent this because every action which requires user's interaction is not good (high chance he will mess something) :) is there any elegant work around for this? it looks like only 64 bit systems need these dlls. -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
Harold wrote: On Jun 25, 9:04 pm, Chris Torek nos...@torek.net wrote: I'm curious. Is there a way to get the number of significant digits for a particular Decimal instance? Yes: def sigdig(x): return the number of significant digits in x return len(x.as_tuple()[1]) Great, Chris, this is (almost) exactly what I needed. To make it work for numbers like 1200, that have four digits but only two of them being significant, I changed your snippet to the following: class Empirical(Decimal) : @property def significance(self) : t = self.as_tuple() if t[2] 0 : return len(t[1]) else : return len(''.join(map(str,t[1])).rstrip('0')) Empirical('1200.').significance 2 Empirical('1200.0').significance 5 What about when 1200 is actually 4 significant digits? Or 3? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list
tkinter problem with treeview
Hi all, I have written some helper functions for the tkinter.ttk.treeview widget (using python3, version 3.2). This functions dont work as i expect: #! /usr/bin/env pyhon3 # -*- encoding: utf-8 -*- from tkinter import * from tkinter.ttk import * # now tkinter widgets get replaced by # tkinter.ttk widgets from tkinter.font import Font def makeTreeview(root, fields, scrollbars=True, show='tree headings', packOptions={'side': RIGHT, 'expand': YES, 'fill': BOTH, 'padx': 2, 'pady': 2}, **extras): root: the containing frame fields: [('name', {options})] field[0] is the tree label scrollbars: True: use scrollbars, False: dont use scrollbars show: 'tree' or 'headings' or 'tree headings' # define Treeview # fiels[0] belongs to the tree label # fields[1:] belongs to the data values # t is a tuple ('name', {options}) widget=Treeview(root, columns=[t[0] for t in fields[1:]], show=show) # define scrollbars is necessary if scrollbars: ybar=Scrollbar(root) ybar.config(command=widget.yview) ybar.pack(side=RIGHT, expand=YES, fill=Y) # pack ybar first xbar=Scrollbar(root,orient='horizontal') xbar.config(command=widget.xview) xbar.pack(side=BOTTOM, expand=YES, fill=X) # then xbar widget.config(yscrollcommand=ybar.set, xscrollcommand=xbar.set) widget.pack(packOptions) # pack widget last # process the header and the options # of the data values # (n,o) is a tuple consisting of a name and an option i=0 for (n,o) in fields: widget.heading('#%s' % i, text=n) if o: widget.column('#%s' % i, **o) i += 1 if extras: widget.config(**extras) return widget def insert_node_to_treeview(tv, parent, subtree, resize=True, **extras): ''' tv: the treeview to insert the new values parent: the parent node subtree: a tuple (row, children) with row: list of values to insert into this node row[0] belongs to the tree label row[1:] belongs to the data values children: list of children to insert each child is a valid subtree ''' (row, children) = subtree nd=tv.insert(parent, 'end', text=row[0], values=row[1:], **extras) # resize fields if necessary rowsize=[Font().measure(f) for f in row] i=0 for s in rowsize: if tv.column('#%s' %i, option='width') s: tv.column('#%s' %i, width=rowsize[i]) i += 1 # insert children recursivly if children: for t in children: insert_node_to_treeview(tv, nd, t, resize, **extras) if __name__ == '__main__': class TestMixin(GuiMixin, Frame): def __init__(self, parent=None): Frame.__init__(self, parent) self.pack(expand=YES, fill=BOTH) longline=\ 'This is a longer line that needs a little more space' MyTree=[(['1', 'Line 1'], [(['1.1', 'Line 1.1'],[]), (['1.2', 'Linee 1.2'], [(['1.2.1', 'Linee 1.2.1'],[]), (['1.2.2', 'Line 1.2.2'],[])])]), (['2', 'Line 2'], [(['2.1', longline], [(['2.1.1', 'This is line 2.1.1'],[])])])] self.tv=makeTreeview(self, fields=[('head', {}), ('zeile 1',{})], scrollbars=True) for t in MyTree: insert_node_to_treeview(self.tv, '', t, open=True) top = self.tv.get_children()[0] self.tv.focus_set() self.tv.focus(top) self.tv.selection_set(top) TestMixin().mainloop() There are some things i dont understand: 1) resizing of the field widths does work in principle, but the resulting field is exactly one charakter to small. 2) I think, resizing should be clearer, but i have no idea, how. 3) The horizontal scrollbar does not work as expected. It does not react on resizing the application window but only on resizing the headers of the fields. Maybe someone can give me some hints. Wolfgang -- http://mail.python.org/mailman/listinfo/python-list
Re: Python basic program problem
On Mon, Jun 27, 2011 at 11:18 PM, Amaninder Singh asingh0...@gmail.com wrote: Yes, I think I am using 3.0 version. So how much difference is in between these two? On Jun 26, 2011, at 11:18 PM, Noah Hall wrote: On Mon, Jun 27, 2011 at 8:05 AM, Amaninder Singh asingh0...@gmail.com wrote: Hi, I am fairly new to python, I am trying to write simple code and It is giving me syntax error. I am reading a book and following the directions as it says in the book but I am not sure why it is not working. Please guide me through. Any help appreciated. Looks like you're using the 3.x version, while your guide is 2.x. I suggest you download the 2.x version, or find a new tutorial. Well, quite a lot. Read this - http://wiki.python.org/moin/Python2orPython3 to get a better picture. -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
Harold Fellermann wrote: Hi Ethan, Empirical('1200.').significance 2 Empirical('1200.0').significance 5 What about when 1200 is actually 4 significant digits? Or 3? Then you'd simply write 1.200e3 and 1.20e3, respectively. That's just how the rules are defined. But your code is not following them: Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. -- from decimal import Decimal -- class Empirical(Decimal) : ... @property ... def significance(self) : ... t = self.as_tuple() ... if t[2] 0 : ... return len(t[1]) ... else : ... return len(''.join(map(str,t[1])).rstrip('0')) ... -- Empirical('1.200E+3').significance 2 # should be four -- Empirical('1.20E+3').significance 2 # should be three -- Empirical('1.20E+4').significance 2 # should be three The negatives appear to work, though: -- Empirical('1.20E-4').significance 3 -- Empirical('1.2819E-3').significance 5 -- Empirical('1.2819E-1').significance 5 -- Empirical('1.281900E-1').significance 7 ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
On Tue, 28 Jun 2011 06:53 am Ethan Furman wrote: Harold wrote: [...] Empirical('1200.').significance 2 Well, that's completely wrong. It should be 4. Empirical('1200.0').significance 5 What about when 1200 is actually 4 significant digits? Or 3? Then you shouldn't write it as 1200.0. By definition, zeros on the right are significant. If you don't want zeroes on the right to count, you have to not show them. Five sig figures: 1200.0 Four sig figures: 1200 Three sig figures: 1.20e3 Two sig figures: 1.2e3 One sig figure: 1e3 Zero sig figure: 0 -- Steven -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Zero sig figure: 0 Is 0.0 one sig fig or two? (Just vaguely curious. Also curious as to whether a zero sig figures value is ever useful.) ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
Chris Angelico wrote: On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Zero sig figure: 0 That's not really zero significant figures; without further qualification, it's one. Is 0.0 one sig fig or two? Two. (Just vaguely curious. Also curious as to whether a zero sig figures value is ever useful.) Yes. They're order of magnitude estimates. 1 x 10^6 has one significant figure. 10^6 has zero. -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Skype erikmaxfrancis I would have liked to have seen Montana. -- Cpt. Vasily Borodin -- http://mail.python.org/mailman/listinfo/python-list
Re: Significant figures calculation
Steven D'Aprano wrote: On Tue, 28 Jun 2011 06:53 am Ethan Furman wrote: Harold wrote: [...] Empirical('1200.').significance 2 Well, that's completely wrong. It should be 4. Empirical('1200.0').significance 5 What about when 1200 is actually 4 significant digits? Or 3? Then you shouldn't write it as 1200.0. By definition, zeros on the right are significant. If you don't want zeroes on the right to count, you have to not show them. Five sig figures: 1200.0 Four sig figures: 1200 Three sig figures: 1.20e3 Two sig figures: 1.2e3 One sig figure: 1e3 Zero sig figure: 0 That last one is not true; 0 is a one-significant figure estimate, and represents a value between -0.5 and 0.5. (It's true that zeroes to the left are never significant, but not when there's nothing in the figure but zeroes.) A zero-significant figure would be an order of magnitude estimate only. These aren't usually done in the e scientific notation, but it would be something like 10^3 (if we assume ^ is exponentiation, not the Python operator). c^2 is 9 x 10^16 m^2/s^2 to one significant figure. It's 10^17 m^2/s^2 to zero (order of magnitude estimate). -- Erik Max Francis m...@alcyone.com http://www.alcyone.com/max/ San Jose, CA, USA 37 18 N 121 57 W AIM/Y!M/Skype erikmaxfrancis I would have liked to have seen Montana. -- Cpt. Vasily Borodin -- http://mail.python.org/mailman/listinfo/python-list
[issue11568] docstring of select.epoll.register() is wrong
Roundup Robot devnull@devnull added the comment: New changeset 0610f70e6694 by Senthil Kumaran in branch '3.2': Fix closes issue 11568 - update select.epoll.register docstring with mention of correct behavior. http://hg.python.org/cpython/rev/0610f70e6694 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11568 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11568] docstring of select.epoll.register() is wrong
Roundup Robot devnull@devnull added the comment: New changeset a6586cb660dc by Senthil Kumaran in branch '2.7': Fix closes issue 11568 - update select.epoll.register docstring with mention of correct behavior. http://hg.python.org/cpython/rev/a6586cb660dc -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11568 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11568] docstring of select.epoll.register() is wrong
Senthil Kumaran sent...@uthcode.com added the comment: On Sun, Jun 26, 2011 at 03:12:30PM +, Sandro Tosi wrote: The patch is fine: but would you be interested in trying to write a unittest for select.epoll.register ? it would be really nice to This is covered in test_epoll.py -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11568 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11568] docstring of select.epoll.register() is wrong
Sandro Tosi sandro.t...@gmail.com added the comment: Ah, I find the test file name a bit unhappy (why not test select.epoll in test_select? or add select in the filename?) but since it's covered - I'm fine! :) Next time I'll grep instead of simple file glob - thanks for your help, Senthil. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11568 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1475523] gettext breaks on plural-forms header
Dirkjan Ochtman dirk...@ochtman.nl added the comment: This looks similar to https://bugs.gentoo.org/show_bug.cgi?id=373115. Is it the same thing, or should I file a separate bug for it? (Sorry, I don't intend to hijack this bug, but I don't know much about gettext and the patch here looks somewhat similar to the patch proposed there.) -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1475523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12417] Inappropriate copyright on profile files
New submission from Paul Hildebrandt paul_hildebra...@yahoo.com: profile.py and pstats.py have an inappropriate copyright for some. These files were contributed by a company that was acquired by Disney. I have a patch that has passed Disney legal to resolve the problem. The following is the cogent part of a conversation between Matthias Klose and myself. He is including information about the issue: http://mail.python.org/pipermail/python-dev/2005-February/051450.html The current license for the Python profiler is not conforming to the DFSG (Debian free software guidelines). http://www.python.org/doc/current/lib/node829.html states This permission is explicitly restricted to the copying and modification of the software to remain in Python, compiled Python, or other languages (such as C) wherein the modified or derived code is exclusively imported into a Python module. The DFSG, http://www.debian.org/doc/debian-policy/ch-archive.html#s-dfsg, third paragraph state: Derived Works The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software. - Does somebody knows about the history of this license, why it is more restricted than the Python license? - Is there a chance to change the license for these two modules (profile.py, pstats.py)? -- components: Library (Lib) messages: 139240 nosy: Paul.Hildebrandt priority: normal severity: normal status: open title: Inappropriate copyright on profile files ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5375] Unified locals/consts array + register-based instructions
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Yeah, I probably won't work on this anytime soon. I think this has also become less interesting as pypy has made progress. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5375 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12417] Inappropriate copyright on profile files
Paul Hildebrandt paul_hildebra...@yahoo.com added the comment: This is the patch. It was created with hg diff WDAS.patch at the root of the hg repository. This patch is just a comment change and should apply to versions of Python currently being update. -- keywords: +patch resolution: - fixed versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file22491/WDAS.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'
Martin v. Löwis mar...@v.loewis.de added the comment: That would be incorrect for some systems. For example, FreeBSD does change sets of symbolic constants across system releases (mostly additions, but sometimes also removals). Back then, SunOS 4 and SunOS 5 were completely unrelated systems. Well, I don't see the problem in that case. What I'm advocating is to special-case Linux (and any other system where major version numbers don't mean much). The point I (and others) have been trying to make is that 99% of the time, people using sys.platform really mean platform.system() or uname[0], since they're only interested in the operating system, and don't care about the release. That's true of the vast majority of such occurrences in Lib/test, and probably true of the vast majority of the user code base. I don't argue with that. I agree the code is broken (although I disagree that platform.system is the right answer in most cases), but that doesn't help resolving this issue (unless the resolution is no change, which I still oppose to). Furthermore, at least on Linux, the major version number doesn't mean anything Indeed - hence I propose to drop it from sys.platform if the system is Linux. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1475523] gettext breaks on plural-forms header
Martin v. Löwis mar...@v.loewis.de added the comment: It's difficult to tell whether it's the same thing. Is the po file in question available readily for inspection? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1475523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Antoine Pitrou pit...@free.fr added the comment: If there's agreement that the general problem is unsolvable (so fork and threads just don't get along with each other), what we could attempt is trying to limit the side effects in the standard library, so that fewest users as possible are affected by this problem. Actually, I think Charles-François' suggested approach is a good one. For instance, having deadlocks just because of print statements sounds like a bad QoI that we could attempt to improve. Is there a reason while BufferedIO needs to hold its internal data-structure lock (used to make it thread-safe) while it's doing I/O and releasing the GIL? I would think that it's feasible to patch it so that its internal lock is only used to synchronize accesses to the internal data structures, but it is never held while I/O is performed (and thus the GIL is released -- at which point, if another threads forks, the problem appears). Not really. Whether you update the internal structures depends on the result of the I/O (so that e.g. two threads don't flush the same buffer simultaneously). Also, finer-grained locking is always a risky endeavour and we already have a couple of bugs to fix in the current buffered I/O implementation :-/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1475523] gettext breaks on plural-forms header
Dirkjan Ochtman dirk...@ochtman.nl added the comment: Looks like this was the problem: http://git.fedorahosted.org/git/?p=virt-manager.git;a=commitdiff;h=cb56316cf3702f03b05e30f406ff3028e45f7bfb. E.g., the empty Plural-Forms header is throwing off the python gettext parser. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1475523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Antoine Pitrou pit...@free.fr added the comment: Le Sun, 26 Jun 2011 19:49:03 +, Vinay Sajip rep...@bugs.python.org a écrit : Added file: http://bugs.python.org/file22487/0feab4e7b27f.diff Just a nit, could you give descriptive file names to your patches? Hex numbers quickly get confusing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'
Antoine Pitrou pit...@free.fr added the comment: Le Mon, 27 Jun 2011 08:05:05 +, Martin v. Löwis rep...@bugs.python.org a écrit : What I'm advocating is to special-case Linux (and any other system where major version numbers don't mean much). Actually, it would itself break compatibility, because sys.platform would jump from linux2 to linux from one Python release to another. It would therefore only be applicable, at best, to 3.3. I think we should at least document the idiom of using sys.platform.startswith(...), and mention the platform module as an alternative. This can be done in all doc versions without breaking anything, and in time for Linux 3 :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1067702] urllib fails with multiple ftp transfers
Stefan Schwarzer sschwar...@sschwarzer.net added the comment: Hi Senthil, I don't yet understand what was going on before it resulted in the traceback. I also don't understand _why_ the patch fixes _this_ bug. (That's not to say it doesn't, but I think it's not obvious either. :-) ) Were you able to reproduce the exception with my attached script before you did the change? Here in the hotel I have a much faster internet connection than I had yesterday at the sprint (where lots of people shared the uplink), and now I can't reproduce the exception after running the test script three times, even _without_ having your change applied. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1067702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5375] Unified locals/consts array + register-based instructions
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - postponed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5375 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
Roundup Robot devnull@devnull added the comment: New changeset d2eacbbdaf57 by Giampaolo Rodola' in branch 'default': Issue 12139: add CCC command support to FTP_TLS class to revert the SSL connection back to clear-text. http://hg.python.org/cpython/rev/d2eacbbdaf57 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1475523] gettext breaks on plural-forms header
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1475523 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12400] regrtest: always run tests in verbose mode, but hide the output on success
STINNER Victor victor.stin...@haypocalc.com added the comment: Typical example: (... smtplib ...) Another example (yesterday): -- [355/356/2] test_subprocess ... Re-running test test_subprocess in verbose mode ... Ran 228 tests in 322.313s OK (skipped=20) -- -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12400 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
STINNER Victor victor.stin...@haypocalc.com added the comment: http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%203.x/builds/4043/steps/test/logs/stdio == ERROR: test_ccc (test.test_ftplib.TestTLS_FTPClass) -- Traceback (most recent call last): File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_ftplib.py, line 890, in test_ccc self.client.sendcmd('noop') File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/ftplib.py, line 261, in sendcmd return self.getresp() File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/ftplib.py, line 236, in getresp raise error_proto(resp) ftplib.error_proto: Ôxéî¢Ö®º¸qhÑøcÞÅ\³9úÓ #ïå200 noop ok -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
STINNER Victor victor.stin...@haypocalc.com added the comment: http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2792/steps/test/logs/stdio == ERROR: test_ccc (test.test_ftplib.TestTLS_FTPClass) -- Traceback (most recent call last): File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_ftplib.py, line 890, in test_ccc self.client.sendcmd('noop') File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/ftplib.py, line 261, in sendcmd return self.getresp() File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/ftplib.py, line 226, in getresp resp = self.getmultiline() File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/ftplib.py, line 212, in getmultiline line = self.getline() File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/ftplib.py, line 199, in getline line = self.file.readline() File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/socket.py, line 279, in readinto return self._sock.recv_into(b) File /Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/ssl.py, line 392, in recv_into return socket.recv_into(self, buffer, nbytes, flags) socket.timeout: timed out -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12139] Add CCC command support to ftplib
Giampaolo Rodola' g.rod...@gmail.com added the comment: Hmm... Reopening. I'll look into this later. -- resolution: fixed - status: closed - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call
Michael Foord mich...@voidspace.org.uk added the comment: I have a feeling I added the arguments to TestResult.__init__ to allow it to be used as a silent test result directly in place of TextTestResult. I still need to check this. Not adding the arguments to the super call in TextTestResult would have been an oversight. Let me check this understanding is correct, and if there is no reason for it not to pass on those arguments I'll fix it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12376] unittest.TextTestResult.__init__ does not pass on its init arguments in super call
Changes by Michael Foord mich...@voidspace.org.uk: -- assignee: - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Stefan Krah stefan-use...@bytereef.org added the comment: Nick, you know a lot about this issue and I'm probably missing many things here. I misunderstood your concept of PyManagedBuffer, so my previous posting might have been hard to understand. I'd appreciate if you (or anyone in this thread) could comment if the following would work *in theory*, even if you are against an additional getslicedbufferproc: As I understand, there are two major issues that complicate the code: 1) the copying in PyMemoryView_FromBuffer() 2) slicing To address 1), I wanted to create new memoryview objects exclusively from proper base objects that implement the buffer protocol. So the plan was to create small wrapper object inside PyMemoryView_FromBuffer() that handles enough of the buffer protocol to be usable inside the stdlib for one-dimensional objects. The actual memoryview would then be created by calling PyMemoryView_FromObject() on that wrapper. [PyMemoryView_FromObject() would then obviously not call PyMemoryView_FromBuffer(), but would create the view directly.] To address 2), buffers would *always* have to be filled in by the original exporting object, hence the proposal to add a getslicedbufferproc. Then memoryview would always have a proper base object and could always call getbuffer()/INCREF(base) and releasebuffer()/DECREF(base). I thought this would make the code much cleaner. Direct: the view is directly accessing an underlying object via the PEP 3118 API Indirect: the view has a reference to another memoryview object that it is using as a data source Is there still a difference if only the original base object manages buffers and they are never copied? This is better than requiring that every implementor of the buffer API worry about the slicing logic - we can do it right in memoryview and then implementers of producer objects don't have to worry about it. I'm not sure, but my reasoning was that e.g. in numpy the slicing logic is already in place. Then again, I don't know if it is a legitimate use of buf, shapes and strides to implement slicing. According to this mail, slicing information was supposed to be part of the memoryview struct: http://mail.python.org/pipermail/python-dev/2007-April/072584.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Pauli Virtanen p...@iki.fi added the comment: skrah writes: I think slicing (esp. multidimensional slicing) would be greatly simplified if we added a requirement for the *exporting* object to provide a sliced view. (The same applies to sub-views, also see source comments below [1]). For example, an exporting object could provide a sliced view by adding a getslicedbufferproc to PyBufferProcs: int PyObject_GetSlicedBuffer(PyObject *obj, Py_buffer *view, int flags, PyObject *key); The same thing can be done via PyObject_GetBuffer(obj, view, flags); PyBuffer_Slice(view, sliced_view, flags, key); given an implementation of PyBuffer_Slice. The logic in PyBuffer_Slice does not depend on where the buffer comes from, and every buffer can be sliced. As far as I see, the advantage of `getslicedbufferproc` would be to make the implementation of PyMemoryView simpler, but not much else. In my view, having each exporter implement the same logic by itself would only be an unnecessary burden. o The invariant that all allocated memory in the buffer belongs to the exporting object remains intact. Numpy arrays do not have this invariant, and they happily re-export memory owned by someone else. This is one root of problems here: the PEP implicitly assumes that re-exporting buffers (e.g. memoryview's implementation of `getbuffer`) is done in the way Numpy does it. Because of this, there is no mechanism for incrementing the refcount of an existing buffer export. Maintaining the above invariant then unavoidably leads to strange behavior in corner cases (which probably are very rare, as mentioned above), and as happened here, make the implementation messy and lead to bugs. The invariant *is* required for guaranteeing that `memoryview.release()` always succeeds. Such a method probably wasn't foreseen in the PEP (and I did not remember that it existed in my first patch), as Numpy arrays don't have any equivalent. The alternatives here are (i) do as Numpy does and give up the invariant and allow `.release()` to fail in some cases, or (ii) document the corner cases in the interface spec and try to detect them and fail if they occur. Which of these is chosen probably does not matter much in practice, but having PyManagedBuffer will make implementing either choice easier. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11302] Add more tests to test_ast.py
Vincent Legoll vincent.leg...@gmail.com added the comment: OK I'll look at it and respin with the comments in mind -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12418] python should inherit the library search path from the compiler for stdlib extensions
New submission from Steve Langasek steve.langa...@ubuntu.com: related to http://bugs.python.org/issue11715 python 2.7 and 3.1 now include a patch for behavior specific to Ubuntu and Debian to search in multiarch directories for libraries needed for building stdlib extensions. This distro-specific patch is unnecessary if instead python could just query and use the default search path from the compiler. With gcc, it's possible to query the list of built-in library directories with: $ gcc -print-search-dirs | sed -n -e's/libraries: =//p' | sed -e's/:/\n/g' | xargs -n1 readlink -f and the include directories with: $ gcc -v -E - /dev/null 21 | awk '/^#include/,/^End of search/ {i=1} i==1 /^ / {print}' (additional filtering, to exclude compiler-internal directories, may be sensible.) Having python query and use these directories when searching for libraries would make the build system more robust in a variety of circumstances. -- components: Build messages: 139259 nosy: vorlon priority: normal severity: normal status: open title: python should inherit the library search path from the compiler for stdlib extensions type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12418 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12419] Add ident parameter to SysLogHandler
New submission from Floris Bruynooghe floris.bruynoo...@gmail.com: It would be nice if the SysLogHandler also accepted an ident parameter in line with the syslog.openlog() function. This simply prepends the string passed in as ident to each log message which currently needs to be implemented with a log filter which modifies the record. -- components: Library (Lib) messages: 139260 nosy: flub priority: normal severity: normal status: open title: Add ident parameter to SysLogHandler type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12419] Add ident parameter to SysLogHandler
Changes by Floris Bruynooghe floris.bruynoo...@gmail.com: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12420] distutils crashes if PATH is not defined
New submission from Henry Precheur he...@precheur.org: The function find_executable crashes if PATH is not defined. I admit that it's an extreme case, but it's probably better to on the safe side of things. What about using the current directory only if PATH is not defined? This seems to be a reasonable workaround. -- assignee: tarek components: Distutils, Distutils2 files: fix_empty_path.diff keywords: patch messages: 139261 nosy: alexis, eric.araujo, henry.precheur, tarek priority: normal severity: normal status: open title: distutils crashes if PATH is not defined versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file22492/fix_empty_path.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Just a nit, could you give descriptive file names to your patches? Hex numbers quickly get confusing. Ok - I was under the impression that those names were generated automatically from the changeset hash, and that changing the name arbitrarily would break something. Is it not better/sufficient if I just update the description? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12401] unset PYTHON* environment variables when running tests
Henry Precheur he...@precheur.org added the comment: Here's a small patch to call regression tests without any environment variable defined. It's probably a good thing to run all the tests with a clean state, this way they are less likely to fail for mysterious external reasons. For example test_displayhook_unencodable was failing because I was overriding displayhook in my PYTHONSTARTUP file. On the other hand, some problems with environment variables might go unnoticed. But I don't think there's much risk. Note that test_distutils will fail with this patch if #12420 is not taken care of beforehand. -- keywords: +patch Added file: http://bugs.python.org/file22493/empty_environment.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12401 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12421] Use PYTHON when calling Parser/asdl_c.py
New submission from Henry Precheur he...@precheur.org: Parser/asdl_c.py uses `/usr/bin/env python' as an interpreter. But Python executable is not always `python'. With OpenBSD's ports, CPython's interpreters are installed as pythonX.Y. There's a variable PYTHON in the Makefile, that's what should be used. This way make PYTHON=python2.7 works on OpenBSD. The attached patch fixes that. Note that the executable bit and the hashbang can be removed from asdl_c.py if the patch is applied. -- components: Build files: fix_ASDLGEN.diff keywords: patch messages: 139264 nosy: henry.precheur priority: normal severity: normal status: open title: Use PYTHON when calling Parser/asdl_c.py versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file22494/fix_ASDLGEN.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions
sorin sorin.sbar...@gmail.com added the comment: Here is a test file that will replicate the problem, I added it as a gist so it could support contributions ;) Py 2.7 works Py ==2.7 fails Py =3.0 works after minor changes required by py3k https://gist.github.com/1047551 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: I'll try to do a summary of the conversation so far, since it's quite long and hard to follow. The basic issue is that memoryview needs to support copying and slicing that creates a new memoryview object. The major problem with that is that the PEP 3118 semantics as implemented operate in such a way that neither copying the Py_buffer struct *nor* requesting a new copy of the struct from the underlying object will do the right thing in all cases. (According to the PEP *as written* copying probably should have been OK, but the implementation doesn't match the PEP in several important respects such that copying is definitely wrong in the absence of tight control of the lifecycles of copies relative to the original). Therefore, we either need to redesign the buffer export from memoryview to use daisy chaining (such that in m = memoryview(obj); m2 = m[:]; m3 = m2[:] m3 references m2 which references m which in turn references obj) or else we need to introduce an internal reference counted object (PyManagedBuffer) which allows a single view of an underlying object to be safely shared amongst multiple clients (such that m, m2 and m3 would all reference the same managed buffer instance which holds the reference to obj). My preference is strongly for the latter approach as it prevents unbounded and wasteful daisy chaining while also providing a clean, easy to use interface that will make it easier for 3rd parties to write PEP 3118 API consumers (by using PyManagedBuffer instead of the raw Py_buffer struct). Once that basic lifecycle problem for the underlying buffers is dealt with then we can start worrying about other problems like exporting Py_buffer objects from memoryview instances correctly. The lifecycle problem is unrelated to the details of the buffer *contents* though - it's entirely about the fact that clients can't safely copy all those pointers (as some may refer to addresses inside the struct) and asking the original object for a fresh copy is permitted to return a different answer each time. The actual *slicing* code in memoryview isn't too bad - it just needs to use dedicated storage rather than messing with the contents of the Py_buffer struct it received from the underlying object. Probably the easiest way to handle that is by having the PyManagedBuffer reference be in *addition* to the current Py_buffer struct in the internal state - then the latter can be used to record the effects of the slicing, if any. Because we know the original Py_buffer struct is guaranteed to remain alive and unmodified, we don't need to worry about fiddling with any copied pointers - we can just leave them pointing into the original structure. When accessed via the PEP 3118 API, memoryview objects would then export that modified Py_buffer struct rather than the original one (so daisychaining would be possible, but we wouldn't make it easy to do from pure Python code, as both the memoryview constructor and slicing would give each new memoryview object a reference to the original managed buffer and just update the internal view details as appropriate. Here's the current MemoryView definition: typedef struct { PyObject_HEAD Py_buffer view; } PyMemoryViewObject; The TL;DR version of the above is that I would like to see it become: typedef struct { PyObject_HEAD PyManagedBuffer source_data; // shared read-only Py_buffer access Py_buffer view; // shape, strides, etc potentially modified } PyMemoryViewObject; Once the internal Py_buffer had been initialised, the memoryview code actually wouldn't *use* the source data reference all that much (aside from eventually releasing the buffer, it wouldn't use it at all). Instead, that reference would be retained solely to control the lifecycle of the original Py_buffer object relative to the modified copies in the various memoryview instances. Does all that make my perspective any clearer? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12419] Add ident parameter to SysLogHandler
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- assignee: - vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12419 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12421] Use PYTHON when calling Parser/asdl_c.py
R. David Murray rdmur...@bitdance.com added the comment: I don't believe we have any desire to support unix systems that do not define 'python', and 'python3' executables in the path. If the distribution wishes to do that they'll have to patch everything to accommodate it. That however is mostly irrelevant to this case. asdl_c.py is not needed for building python. The files it generates are already generated and included in the release tarballs, and in the release tarballs the file timestamps should be such that asdl_c.py is not invoked. (When working from a checkout this may not be true due to vcs tool file timestamp issues; you just have to touch the files manually in that case.) When the file *is* run, it is not the python being built that is used to run it, it is an already existing python. So using the PYTHON variable in the Makefile would be incorrect. -- nosy: +r.david.murray resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions
R. David Murray rdmur...@bitdance.com added the comment: rdmurraypython2.6 py27-str-unicode-bytes.py type(b)=type 'str' Traceback (most recent call last): File py27-str-unicode-bytes.py, line 17, in module unicode_str += b # this line will throw UnicodeDecodeError on Python 2.7 UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 4: ordinal not in range(128) And of course it doesn't work earlier than 2.6 since the b'' notation isn't supported before 2.6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions
R. David Murray rdmur...@bitdance.com added the comment: To clarify: if I convert your program to using strings pre2.6, it still fails with a UnicodeDecodeError, as one would expect. bytes are strings in 2.x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12421] Use PYTHON when calling Parser/asdl_c.py
Henry Precheur he...@precheur.org added the comment: Indeed, I didn't realize that PYTHON was the name of the target interpreter and not the name a an already installed interpreter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions
R. David Murray rdmur...@bitdance.com added the comment: And finally, your program does *not* succeed on Python3, except in the trivial sense that on python3 you never attempt to add the string and bytes data. It is exactly this kind of programming error that Python3 is designed to avoid: instead of sometimes getting a UnicodeDecodeError depending on what is in the bytes string, you *always* get a Can't convert 'bytes' object to str implicitly error when you attempt to add string and bytes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions
sorin sorin.sbar...@gmail.com added the comment: Right, so you have some binary data and you want to sent it to `httplib`. This worked in the past when `msg` was a non-unicode string, but starting with Python 2.7 this became an unicode string, so when you try to append the `message` if will fail because it will try to decode it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12398 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12420] distutils crashes if PATH is not defined
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. Can you tell how you ran into this? Did you call the function directly, or did you get the bug while running a setup.py command? Also, what do you mean by crash? We use that for CPython segmentation faults, not regular misbehavior. If you could attach the exact command or script that triggered the bug and the full traceback, it would help. I don’t think using the current directory is a good idea: it’s a security hazard. -- assignee: tarek - eric.araujo type: - behavior versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12416] packaging does not have hooks callable during distribution removal
Éric Araujo mer...@netwok.org added the comment: I have no objection, but you may want to ask on the fellowship ML first. Should the hooks be run before the removal or just after? (Debian for example has both, which makes four hooks: preinst, postinst, prerm, postrm). Our setup_hooks (used with pysetup commands) are run right after the setup.cfg file is parsed, before any operation is started. Regarding implementation: The hook should be defined in the global section of setup.cfg; upon installation, packaging would write this info into the dist-info directory (say in an UNINSTALLHOOKS file), which would be read when preparing an uninstallation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11302] Add more tests to test_ast.py
Vincent Legoll vincent.leg...@gmail.com added the comment: Here we are, I left the exact messages for raised exceptions as comments so they can easily be checked in case of test failure... Does that look OK ? -- Added file: http://bugs.python.org/file22495/add-more-tests-for-ast_py-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12406] msi.py needs updating for Python 3.3
Éric Araujo mer...@netwok.org added the comment: I've realised there are more additions due to packaging - for example there is a whole set of wininst-X.Y[-amd64].exe files Oh thanks, I had forgotten about msi.py. Copying the similar section that already exists for distutils wininst executables and adding the two files added for packaging should do the trick. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12406 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12420] distutils crashes if PATH is not defined
Henry Precheur he...@precheur.org added the comment: Sorry crash wasn't the right term. It's just that distutils tests fail. I ran into that when trying to run unit tests without any environment variable (see #12401). $ env -i ./python ./Lib/test/regrtest.py test_distutils [1/1] test_distutils test test_distutils crashed -- Traceback (most recent call last): File ./Lib/test/regrtest.py, line 987, in runtest_inner File /home/henry/code/cpython/Lib/test/test_distutils.py, line 13, in test_main test.support.run_unittest(distutils.tests.test_suite()) File /home/henry/code/cpython/Lib/distutils/tests/__init__.py, line 29, in test_suite __import__(modname) File /home/henry/code/cpython/Lib/distutils/tests/test_archive_util.py, line 33, in module unittest.TestCase): File /home/henry/code/cpython/Lib/distutils/tests/test_archive_util.py, line 96, in ArchiveUtilTestCase @unittest.skipUnless(find_executable('tar') and find_executable('gzip') File /home/henry/code/cpython/Lib/distutils/spawn.py, line 154, in find_executable path = os.environ['PATH'] File /home/henry/code/cpython/Lib/os.py, line 450, in __getitem__ value = self._data[self.encodekey(key)] KeyError: b'PATH' 1 test failed: test_distutils [98227 refs] Maybe it's not really a problem, and having a system without PATH defined shouldn't be supported because it's too weird. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11493] Add python.exe-gdb.py to .hgignore
Éric Araujo mer...@netwok.org added the comment: Ah, it’s for Mac. gdb + .exe sounded strange in my head :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11493 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12417] Inappropriate copyright on profile files
Roundup Robot devnull@devnull added the comment: New changeset 55219254eb77 by Benjamin Peterson in branch '2.7': update profile license (closes #12417) http://hg.python.org/cpython/rev/55219254eb77 New changeset e50963c3119d by Benjamin Peterson in branch '3.2': update profile license (closes #12417) http://hg.python.org/cpython/rev/e50963c3119d New changeset 5ae1711d9c19 by Benjamin Peterson in branch 'default': merge 3.2 (#12417) http://hg.python.org/cpython/rev/5ae1711d9c19 -- nosy: +python-dev stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12420] distutils crashes if PATH is not defined
Henry Precheur he...@precheur.org added the comment: I don't know exactly in which context find_executable should be used, but after taking a closer look it seems that returning None when PATH is not defined could work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12417] Inappropriate copyright on profile files
Éric Araujo mer...@netwok.org added the comment: Great news for Debian users! Thanks to all involved. -- nosy: +eric.araujo versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12417 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12420] distutils crashes if PATH is not defined
Éric Araujo mer...@netwok.org added the comment: Okay, I see the original use case (#12401). I think the proper thing to do is to skip tests that rely on the environment being non-empty. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12420 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com