Advanced Python Workshop at PyCon Ireland 2013, October 11, 2013

2013-09-23 Thread Mike Müller
Advanced Python Workshop at PyCon Ireland 2013, Dublin, Ireland === Date: October 11, 2013 Location: The Camden Court Hotel, Dublin, Ireland Language: English Links: http://www.python-academy.com/courses/python_advanced_pyconie.html

Course: Python per programmatori (Italian) in Bologna, November 25 - 27, 2013

2013-09-23 Thread Mike Müller
Python per programmatori in Bologna, Italy == Date: November 25 - 27, 2013 Location: Bologna, Italy Language: Italian Link: http://www.python-academy.com/courses/python_course_programmers_ita.html Instructor: Federico Caboni This course is for people who

[ANN] pyspread 0.2.5

2013-09-23 Thread Martin Manns
== pyspread 0.2.5 == Pyspread 0.2.5 is released. This is mainly a bug fix release with some improvements in chart creation and CSV import. About pyspread == Pyspread is a non-traditional spreadsheet application that is based on and written in the

ANN: EditXT 1.3.0

2013-09-23 Thread Daniel Miller
Introducing EditXT 1.3.0 - a programmer's text editor for Mac OS X == Download it from GitHub: https://github.com/editxt/editxt/releases/tag/1.3.0 Features: - Syntax highlighting for Python and JavaScript (more definitions can be

Re: What minimum should a person know before saying I know Python

2013-09-23 Thread Gene Heskett
On Sunday 22 September 2013 23:41:10 Dennis Lee Bieber did opine: On Sun, 22 Sep 2013 14:55:24 -0400, Gene Heskett ghesk...@wdtv.com declaimed the following: Then it seems to me that work in the direction should be an active feature request. Unforch, as I've said before, I'm rowing this

Re: Directory Web Site

2013-09-23 Thread Chris Angelico
On Mon, Sep 23, 2013 at 11:14 AM, worthingtonclin...@gmail.com wrote: Was hoping to get some tips or advice on scripting a program that would sort through my many links on my directory website and print out to me the ones that are broken or no longer functioning so that I could fix or remove

Re: Why do I have to use global so much when using Turtle?

2013-09-23 Thread John Ladasky
No, Rusi, I have never seen Pynguin before -- and it looks very cool! -- https://mail.python.org/mailman/listinfo/python-list

How To Build Scrapy Environment

2013-09-23 Thread YetToCome
I have already install Twisted, zope.interface, w3lib, libxml2, etc,but it still can not be built,here is the error message: Traceback (most recent call last): File C:\Python27\lib\runpy.py, line 162, in _run_module_as_main __main__, fname, loader, pkg_name) File

Re: How To Build Scrapy Environment

2013-09-23 Thread Peter Otten
YetToCome wrote: I have already install Twisted, zope.interface, w3lib, libxml2, etc,but it still can not be built,here is the error message: Traceback (most recent call last): File C:\Python27\lib\runpy.py, line 162, in _run_module_as_main __main__, fname, loader, pkg_name) File

Re: reload and work flow suggestions

2013-09-23 Thread Peter Cacioppi
On Saturday, September 21, 2013 2:43:13 PM UTC-7, Peter Cacioppi wrote: This is an idea brought over from another post. When I write Python code I generally have 2 or 3 windows open simultaneously. 1) An editor for the actual code. 2) The interactive interpreter. 3) An editor

Re: How To Build Scrapy Environment

2013-09-23 Thread YetToCome
在 2013年9月23日星期一UTC+8下午4时12分21秒,YetToCome写道: I have already install Twisted, zope.interface, w3lib, libxml2, etc,but it still can not be built,here is the error message: Traceback (most recent call last): File C:\Python27\lib\runpy.py, line 162, in _run_module_as_main

Re: How To Build Scrapy Environment

2013-09-23 Thread YetToCome
在 2013年9月23日星期一UTC+8下午4时37分22秒,Peter Otten写道: YetToCome wrote: I have already install Twisted, zope.interface, w3lib, libxml2, etc,but it still can not be built,here is the error message: Traceback (most recent call last): File C:\Python27\lib\runpy.py, line 162, in

Re: How To Build Scrapy Environment

2013-09-23 Thread Peter Otten
YetToCome wrote: [snip] No need to quote the whole turd -- just confirm that it worked... it had an another error: No module named queuelib, but i have installed all the libs mentioned in that passage... ImportError: Error loading object 'scrapy.core.scheduler.Scheduler': No module n amed

Re: reload and work flow suggestions

2013-09-23 Thread rusi
On Monday, September 23, 2013 2:01:00 PM UTC+5:30, Peter Cacioppi wrote: One thing re: editors and interactive environments. I'm not a huge emacs fan (ducking) and I really like iPython. Heh! Yeah we are an endangered species G enerally N ot U sed E ditor for M iddle A ged C omputer S

Re: How To Build Scrapy Environment

2013-09-23 Thread YetToCome
在 2013年9月23日星期一UTC+8下午5时25分25秒,Peter Otten写道: YetToCome wrote: [snip] No need to quote the whole turd -- just confirm that it worked... it had an another error: No module named queuelib, but i have installed all the libs mentioned in that passage... ImportError:

Re: reload and work flow suggestions

2013-09-23 Thread Oscar Benjamin
On 23 September 2013 10:35, rusi rustompm...@gmail.com wrote: Then, I launch iPython, which can intellisense launch 3 easily. Then I make whatever changes I need to 1-3 to make a baby step forward, close iPython, and repeat. Hardly looks very ergonomic to me I'm not quite sure what's meant

[ANN] pyspread 0.2.5

2013-09-23 Thread Martin Manns
== pyspread 0.2.5 == Pyspread 0.2.5 is released. This is mainly a bug fix release with some improvements in chart creation and CSV import. About pyspread == Pyspread is a non-traditional spreadsheet application that is based on and written in the

Re: building an online judge to evaluate Python programs

2013-09-23 Thread Fábio Santos
On 20 Sep 2013 21:14, Jabba Laci jabba.l...@gmail.com wrote: That last seems to me to be the biggie. Several times in the past few years, people in this mailing list have tried to build a safe sandbox. And each one was a big failure, for a hacker of sufficient interest. Some of them were

parse list recurisively

2013-09-23 Thread andypu
Hello, i use a load of lists and often i dont know how deep it is, how can i parse that lists elegantly (without a bunch of for loops) -- https://mail.python.org/mailman/listinfo/python-list

Help with python functions?

2013-09-23 Thread kjakupak
1.a. Write a function temp(T, from_unit, to_unit) where from_unit and to_unit are temperature units, either 'F' (or 'f') for fahrenheit, or 'C' (or 'c') for celsius, or 'K' (or 'k') for kelvin; and T is a temperature number for the unit from_unit. The function should return the temperature

Re: parse list recurisively

2013-09-23 Thread Chris Angelico
On Mon, Sep 23, 2013 at 10:53 PM, and...@zoho.com wrote: Hello, i use a load of lists and often i dont know how deep it is, how can i parse that lists elegantly (without a bunch of for loops) You can write a function that calls itself - that's what recursive usually means in programming.

Re: Python Interview Questions

2013-09-23 Thread Roy Smith
Somebody, whose identity has been lost in three-deep quoting, said: I am now appearing for Job Interviews these days and I am wondering if anybody of you appeared for a Python Interview. Can you please share the questions you were asked. That will be great help to me. We have a

Re: building an online judge to evaluate Python programs

2013-09-23 Thread Ned Batchelder
On 9/23/13 8:33 AM, Fábio Santos wrote: On 20 Sep 2013 21:14, Jabba Laci jabba.l...@gmail.com mailto:jabba.l...@gmail.com wrote: That last seems to me to be the biggie. Several times in the past few years, people in this mailing list have tried to build a safe sandbox. And each one

Re: Help with python functions?

2013-09-23 Thread Roy Smith
In article e484b709-1287-4e6a-bc43-05f02a608...@googlegroups.com, kjaku...@gmail.com wrote: 1.a. Write a function temp(T, from_unit, to_unit) where from_unit and to_unit are temperature units, either 'F' (or 'f') for fahrenheit, or 'C' (or 'c') for celsius, or 'K' (or 'k') for kelvin; and T

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Neil Cerutti
On 2013-09-22, Luca Cerone luca.cer...@gmail.com wrote: I understand your point, but now I am not writing unit tests to check the correctness of the code. I am only writing a tutorial and assuming that the code is correct. What I have to be sure is that the code in the tutorial can be executed

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: Can anyone help me with any of these please? Much appreciated. I honestly don't even know how to start them Start by writing a function that does nothing: def nothing(): pass Now change it so that it takes three arguments: T, a

Re: parse list recurisively

2013-09-23 Thread andypu
thanks i was not able to figure it out some days before but now i think i can do it myself: a nice function that searches a string in a list. def parsesb(lis, string): print lis for num, nam in enumerate (lis): print num, nam if type(nam) == list:

Re: python, pythontex and plots

2013-09-23 Thread chitturk
True, I did not explain what I was trying to do. pythontex is a package that allows the inclusion of python code within a LaTeX document - (sort of like python.sty, but IMO, better) - I use it along with noweb to create documents that contain documentation, code and output of the code - and

Re: parse list recurisively

2013-09-23 Thread Oscar Benjamin
On 23 September 2013 13:53, and...@zoho.com wrote: Hello, i use a load of lists and often i dont know how deep it is, how can i parse that lists elegantly (without a bunch of for loops) I don't really understand what you mean. Can you show some code that illustrates what you're doing?

Re: Making it a MultiThread!

2013-09-23 Thread stas poritskiy
Thanks for getting back to me, so i assume it is OK to have a very very long file? The sample code i posted here is basically the barebones of the main app. so, combining the GUI-file(gui.py) with main code is acceptable? Separating them into modules was initially the attempt to keep things in

Re: parse list recurisively

2013-09-23 Thread andypu
i have a list and i want to search for a certain string and replace it. i think i got it now... sbxe1 = list([['type','ter','lala'],'name']) def parsesb(lis, string, replacement): for num, nam in enumerate (lis): if type(nam) == list:

python IDE and function definition

2013-09-23 Thread Chris Friesen
Hi all, I'm looking for a python IDE (for Linux) that can look at code like this: class ConductorManager(manager.Manager): def compute_recover(self, context, instance): self.compute_api.stop(context, instance, do_cast=False) where I could highlight the stop and ask it to go to the

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Luca Cerone
It won't be very good documenation any more but nothing stops you from examining the result in the next doctest and making yourself happy about it. x = input(indeterminate:) result = '{}'.format(x)) result.startswith(') and result.endswith(') True Hi Neil,

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Luca Cerone
I don't know why but it seems that google groups stripped the indentation from the code. I just wanted to ensure you that in the examples that I have run the definition of myfunc contained correctly indented code! On Monday, 23 September 2013 15:45:43 UTC+1, Luca Cerone wrote: .. doctest::

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Skip Montanaro
I don't know why but it seems that google groups stripped the indentation from the code. Because it's Google Groups. :-) 800-pound gorillas tend to do pretty much whatever they want. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: python IDE and function definition

2013-09-23 Thread Fabio Zadrozny
On Mon, Sep 23, 2013 at 12:06 PM, Chris Friesen cbf...@mail.usask.cawrote: Hi all, I'm looking for a python IDE (for Linux) that can look at code like this: class ConductorManager(manager.**Manager): def compute_recover(self, context, instance): self.compute_api.stop(context,

What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-23 Thread quarantinemiles
Hey guys, I'm a little new to Python, and am still learning! I'm test building a web scraper that extracts prices from a website, based on two values I want to extract from a CSV file. The CSV has at least 1000 rows, an example: 0,0,KGD,0,DME,0,,0,0 The values I want to extract are KGD and

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Neil Cerutti
On 2013-09-23, Neil Cerutti ne...@norwich.edu wrote: Perhaps try the advanced API and define your oen OutputChecker to add the feature that you need. Figuring out how to best invoke doctest with your modified OutputChecker will take some digging in the source, probably looking at

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Neil Cerutti
On 2013-09-23, Luca Cerone luca.cer...@gmail.com wrote: It won't be very good documenation any more but nothing stops you from examining the result in the next doctest and making yourself happy about it. x = input(indeterminate:) result = '{}'.format(x))

help with SUDS

2013-09-23 Thread Ismar Sehic
hello, i'm trying to make a wrapper for making xml requests to hotelbeds.com site. this is what i got: import logging from suds.xsd.doctor import ImportDoctor, Import from suds.plugin import Plugin logging.basicConfig(level = logging.INFO)

Re: python IDE and function definition

2013-09-23 Thread Fabio Zadrozny
On Mon, Sep 23, 2013 at 2:29 PM, Chris Friesen cbf...@mail.usask.ca wrote: On 09/23/2013 09:32 AM, Fabio Zadrozny wrote: On Mon, Sep 23, 2013 at 12:06 PM, Chris Friesen cbf...@mail.usask.ca mailto:cbf...@mail.usask.ca wrote: Hi all, I'm looking for a python IDE (for Linux) that

Re: What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-23 Thread Tim Chase
On 2013-09-23 10:10, quarantinemi...@gmail.com wrote: based on two values I want to extract from a CSV file. The CSV has at least 1000 rows, an example: 0,0,KGD,0,DME,0,,0,0 [snip] I'd like to automatically go through each row in the CSV file from beginning to end to extract the two values

Re: python IDE and function definition

2013-09-23 Thread Chris Friesen
On 09/23/2013 09:32 AM, Fabio Zadrozny wrote: On Mon, Sep 23, 2013 at 12:06 PM, Chris Friesen cbf...@mail.usask.ca mailto:cbf...@mail.usask.ca wrote: Hi all, I'm looking for a python IDE (for Linux) that can look at code like this: class ConductorManager(manager.__Manager):

Re: What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-23 Thread Joel Goldstick
On Mon, Sep 23, 2013 at 1:10 PM, quarantinemi...@gmail.com wrote: Hey guys, I'm a little new to Python, and am still learning! I'm test building a web scraper that extracts prices from a website, based on two values I want to extract from a CSV file. The CSV has at least 1000 rows, an

Re: building an online judge to evaluate Python programs

2013-09-23 Thread Modulok
If you want to run untrusted Python code and prevent malice (or stupidity) from harming you, you need OS-level protection. Agreed. Just for fun here's a simple example of what could be an honest mistake that consumes all physical memory and swap. A well behaved kernel will kill the process

Re: Functional Programming and python

2013-09-23 Thread Vito De Tullio
rusi wrote: [Not everything said there is correct; eg python supports currying better [than haskell which is surprising considering that Haskell's surname is [Curry!] AFAIK python does not support currying at all (if not via some decorators or something like that). Instead every function in

Re: Sphinx Doctest: test the code without comparing the output.

2013-09-23 Thread Luca Cerone
The docstring for doctest.DocTestRunner contains the example code I was looking for. Thanks, I will give it a try! -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-23 Thread Neil Cerutti
On 2013-09-23, quarantinemi...@gmail.com quarantinemi...@gmail.com wrote: Hey guys, I'm a little new to Python, and am still learning! I'm test building a web scraper that extracts prices from a website, based on two values I want to extract from a CSV file. The CSV has at least 1000 rows,

how can I retrieve a particular tweet, having its tweet id?

2013-09-23 Thread Andres Soto
 how can I retrieve a particular tweet, having its tweet id, and the username, the date and the language? Regards Andrés Soto -- https://mail.python.org/mailman/listinfo/python-list

Re: how can I retrieve a particular tweet, having its tweet id?

2013-09-23 Thread Terry Reedy
On 9/23/2013 2:10 PM, Andres Soto wrote: how can I retrieve a particular tweet, having its tweet id, and the username, the date and the language? What, if anything, have you done to try to solve this yourself? Like searching the web? ('Python twitter' for instance) -- Terry Jan Reedy --

Re: reload and work flow suggestions

2013-09-23 Thread Peter Cacioppi
On Saturday, September 21, 2013 2:43:13 PM UTC-7, Peter Cacioppi wrote: This is an idea brought over from another post. When I write Python code I generally have 2 or 3 windows open simultaneously. 1) An editor for the actual code. 2) The interactive interpreter. 3) An editor

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: Now you're done! On to the next function... -- Steven def temp(T, from_unit, to_unit): conversion_table = {('c', 'k'):lambda x: x + 273.15,

Re: Help with python functions?

2013-09-23 Thread Terry Reedy
On 9/23/2013 6:32 PM, kjaku...@gmail.com wrote: On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: Now you're done! On to the next function... -- Steven def temp(T, from_unit, to_unit): conversion_table = {('c',

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: Now you're done! On to the next function... -- Steven def temp(T, from_unit, to_unit): conversion_table = {('c', 'k'):lambda x: x + 273.15,

Re: python IDE and function definition

2013-09-23 Thread Neil Hodgson
Chris Friesen: where I could highlight the stop and ask it to go to the definition. (Where the definition is in a different file.) I'm running into issues where my current IDE (I'm playing with Komodo) can't seem to locate the definition, I suspect because it's too ambiguous. Some IDEs

Re: Help with python functions?

2013-09-23 Thread Dave Angel
On 23/9/2013 18:55, kjaku...@gmail.com wrote: On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: Now you're done! On to the next function... -- Steven def temp(T, from_unit, to_unit):

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 8:07:44 PM UTC-4, Dave Angel wrote: I didn't see any spec that said Python 3.x. in version 2.x, this would be incorrect. -- DaveA It's for Python 3.2 -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with python functions?

2013-09-23 Thread Denis McMahon
On Mon, 23 Sep 2013 15:55:53 -0700, kjakupak wrote: As for the next one, so far I've gotten: def comp(T1, u1, T2, u2): if u1 u2: return -1 elif u2 u1: return 1 else: return 0 If the first function you wrote allows you to convert temps in different

Re: What minimum should a person know before saying I know Python

2013-09-23 Thread CM
On Friday, September 20, 2013 5:58:00 AM UTC-4, Aseem Bansal wrote: I started Python 4 months ago. Largely self-study with use of Python documentation, stackoverflow and google. I was thinking what is the minimum that I must know before I can say that I know Python? Seems to me a fuzzy

Re: Help with python functions?

2013-09-23 Thread kjakupak
On Monday, September 23, 2013 10:12:05 PM UTC-4, Denis McMahon wrote: If the first function you wrote allows you to convert temps in different scales to a common scale, then in the second function, you can call the first function to convert both temps to a common scale, and compare

Re: building an online judge to evaluate Python programs

2013-09-23 Thread Larry Hudson
On 09/23/2013 06:20 AM, Ned Batchelder wrote: snip If you want to run untrusted Python code and prevent malice (or stupidity) from harming you, you need OS-level protection. --Ned. That reminds me of the quote from Albert Einstein, (paraphrased): There are only two things that are

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 15:32:37 -0700, kjakupak wrote: On Monday, September 23, 2013 9:56:45 AM UTC-4, Steven D'Aprano wrote: On Mon, 23 Sep 2013 05:57:34 -0700, kjakupak wrote: Now you're done! On to the next function... -- Steven def temp(T, from_unit, to_unit):

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 15:55:53 -0700, kjakupak wrote: As for the next one, so far I've gotten: def comp(T1, u1, T2, u2): if u1 u2: return -1 elif u2 u1: return 1 else: return 0 That is only comparing the units, not the temperatures. Since the units

Re: Help with python functions?

2013-09-23 Thread Steven D'Aprano
On Mon, 23 Sep 2013 15:32:37 -0700, kjakupak wrote: def temp(T, from_unit, to_unit): conversion_table = {('c', 'k'):lambda x: x + 273.15, ('c', 'f'):lambda x: (x * (9.0/5)) + 32, ('k', 'c'):lambda x: x - 273.15,

Re: Help with python functions?

2013-09-23 Thread Dave Angel
On 23/9/2013 21:23, kjaku...@gmail.com wrote: On Monday, September 23, 2013 8:07:44 PM UTC-4, Dave Angel wrote: I didn't see any spec that said Python 3.x. in version 2.x, this would be incorrect. -- DaveA It's for Python 3.2 Then I'd have a comment saying so, right at the

[issue13404] Add support for system.methodSignature() to XMLRPC Server

2013-09-23 Thread Vajrasky Kok
Vajrasky Kok added the comment: How do you infer the data types for the parameters? I don't think we can, unless we force them to use function annotation. If they don't use that feature, then we say the signature is not supported. The problem is getting deeper if we are talking about return

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Nick Coghlan
Nick Coghlan added the comment: It seems this can be triggered easily with echo, since that appears to reliably close stdin on startup (Discovered via http://stackoverflow.com/questions/16314321). Compare (using a recent trunk build, although I see the same behaviour with the system 3.3

[issue19040] Problems with overriding Enum.__new__

2013-09-23 Thread Drekin
Drekin added the comment: Yes, I've done it similarily using a class method. Thank you for help. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19040 ___

[issue1185124] pydoc doesn't find all module doc strings

2013-09-23 Thread STINNER Victor
STINNER Victor added the comment: +except: +pass ... +except TypeError: +return None I don't understand these try/except. First, except: pass must never be used, only catch specific exceptions (ex: AttributeError). Can you explain why you expect a TypeError?

[issue17777] Unrecognized string literal escape sequences give SyntaxErrors

2013-09-23 Thread Mark Egan-Fuller
Mark Egan-Fuller added the comment: Python correctly throws a unicode error here, directing the user towards the fact that this is an issue specifically with the unicode escaping. \u File stdin, line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1:

[issue19040] Problems with overriding Enum.__new__

2013-09-23 Thread Eli Bendersky
Eli Bendersky added the comment: On Sun, Sep 22, 2013 at 9:04 PM, Ethan Furman rep...@bugs.python.orgwrote: Ethan Furman added the comment: Yup, just trying to add some explanation on how it currently works. Drekin, I'm sure you've already figured this out, but for those who may read

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2013-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. It fixes also other issues with globals nullification (similar to issue19021). -- Added file: http://bugs.python.org/file31849/subprocess_del.patch ___ Python tracker rep...@bugs.python.org

[issue19077] More robust TemporaryDirectory cleanup

2013-09-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch solves the problem with TemporaryDirectory cleanup. If shutil.rmtree() failed because module globals are set to None, TemporaryDirectory now uses own rmtree implementation which does not depends from globals. The patch also fixes other

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about time.sleep(0.1)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16038 ___ ___ Python-bugs-list

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +josiahcarlson, stutzbach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16038 ___ ___

[issue19078] Allow reversed(memoryview), like memoryview[::-1]

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19078 ___ ___ Python-bugs-list

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 23, 2013, at 03:36 PM, Serhiy Storchaka wrote: What about time.sleep(0.1)? I usually don't like introducing sleeps to fix race conditions, but if that's the only option for landing this patch, maybe we'll have to hold our noses and do it. --

[issue17400] ipaddress should make it easy to identify rfc6598 addresses

2013-09-23 Thread pmoody
pmoody added the comment: ok, here's an is_global/is_private patch using the iana special registry for ipv4 and ipv6. -- keywords: +patch Added file: http://bugs.python.org/file31851/issue.17400.patch ___ Python tracker rep...@bugs.python.org

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Barry can you paste the traceback caused by the race condition? What's not clear to me is when (what line) it occurs. One solution might be to send a NOOP command (self.client.sendcmd('noop')) in order to synchronize client and server. --

[issue19064] can't run py3 benchmarks

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 88b6ef9aa9e9 by Antoine Pitrou in branch 'default': Issue #19064: let perf.py decide which library path is required for which interpreter http://hg.python.org/benchmarks/rev/88b6ef9aa9e9 -- nosy: +python-dev

[issue19064] can't run py3 benchmarks

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Now done. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19064 ___

[issue19079] chameleon benchmark fails on 3.4

2013-09-23 Thread Antoine Pitrou
New submission from Antoine Pitrou: Not sure what to do about this, but it seems the bundled Chameleon lib doesn't work on 3.4: RuntimeError: Benchmark died: Traceback (most recent call last): File ./performance/bm_chameleon.py, line 38, in module util.run_benchmark(options,

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure I understand Nick's suggestion. As far as I can tell, the issue is to detect that write() (really fwrite() in 2.x) failed and output the error. -- ___ Python tracker rep...@bugs.python.org

[issue12085] subprocess.Popen.__del__ raises AttributeError if __init__ was called with an invalid argument list

2013-09-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED, _WTERMSIG=os.WTERMSIG, _WIFEXITED=os.WIFEXITED, -_WEXITSTATUS=os.WEXITSTATUS): +_WEXITSTATUS=os.WEXITSTATUS, _SubprocessError=SubprocessError):

[issue19078] Allow reversed(memoryview), like memoryview[::-1]

2013-09-23 Thread Claudiu.Popa
New submission from Claudiu.Popa: Hello. The following seems a little weird: Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32 m = memoryview(b'123') list(m[::-1]) [51, 50, 49] list(reversed(m)) Traceback (most recent call last): File stdin,

[issue18996] unittest: more helpful truncating long strings

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bb83faa8818 by Serhiy Storchaka in branch 'default': Issue #18996: TestCase.assertEqual() now more cleverly shorten differing http://hg.python.org/cpython/rev/5bb83faa8818 -- nosy: +python-dev ___

[issue18996] unittest: more helpful truncating long strings

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18996

[issue19034] More useful repr for Tcl_Obj

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19034

[issue19034] More useful repr for Tcl_Obj

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset ece634a69ba8 by Serhiy Storchaka in branch 'default': Issue #19034: repr() for tkinter.Tcl_Obj now exposes string reperesentation. http://hg.python.org/cpython/rev/ece634a69ba8 -- nosy: +python-dev ___

[issue19079] chameleon benchmark fails on 3.4

2013-09-23 Thread Brett Cannon
Brett Cannon added the comment: I guess either we introduce compatible version ranges or drop Chameleon from 3.x compatibility and then add a new version of Chameleon if/when they update for Python 3.4 support. -- ___ Python tracker

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, actually, the real issue is that sys.stderr is gone by the time we try to print the exception (which explains the lost sys.stderr message). -- ___ Python tracker rep...@bugs.python.org

[issue13824] argparse.FileType opens a file and never closes it

2013-09-23 Thread paul j3
paul j3 added the comment: In this patch I implement a FileContext class. It differs from FileType in 2 key areas: - it returns a 'partial(open, filename, ...)' - it wraps '-' (stdin/out) in a dummy context protecting the file from closure. The resulting argument is meant to be used as:

[issue19028] tkinter.tkapp.merge() fails on non-strings

2013-09-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c1c67d980bb by Serhiy Storchaka in branch '3.3': Issue #19028: Fixed tkinter.Tkapp.merge() for non-string arguments. http://hg.python.org/cpython/rev/5c1c67d980bb -- nosy: +python-dev ___ Python tracker

[issue19028] tkinter.tkapp.merge() fails on non-strings

2013-09-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19028

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch, lacking tests. How important it is to fix this in 2.7 I'm not sure. People are certainly used to the quirk now, and it's generally harmless. -- keywords: +patch Added file:

[issue4366] cannot find -lpythonX.X when building Python on FreeBSD with --enable-shared

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Koobs, have you signed a contributor's agreement? See http://www.python.org/psf/contrib/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4366 ___

[issue19080] Enrich SyntaxError with additional information

2013-09-23 Thread alon horev
New submission from alon horev: Some context for this feature request: I'm using the wonderful ast module for a library that translates python code to MongoDB queries (https://github.com/alonho/pql). I also did the same for SQL queries using sqlalchemy as a part of another project

[issue19078] Allow reversed(memoryview), like memoryview[::-1]

2013-09-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: So the dilemma with len() was: does it return the number of bytes, or the number of items? Given the new memoryview semantics, I'd say it should return the number of items. -- nosy: +ncoghlan, skrah ___ Python

[issue18682] [PATCH] remove bogus codepath from pprint._safe_repr

2013-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: To made some sense in Python 3 context we should remove the check for the locale module and replace repr() by ascii(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18682

[issue16038] ftplib: unlimited readline() from connection

2013-09-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Sep 23, 2013, at 06:33 PM, Giampaolo Rodola' wrote: Barry can you paste the traceback caused by the race condition? What's not clear to me is when (what line) it occurs. One solution might be to send a NOOP command (self.client.sendcmd('noop')) in order to

  1   2   >