Karlsruhe (Germany) Python User Group, July 20th 2012, 7pm

2012-07-13 Thread Jürgen A . Erhard
The Karlsruhe Python User Group (KaPy) meets again. Friday, 2012-07-20 (July 20th) at 19:00 (7pm) in the rooms of Entropia eV (the local affiliate of the CCC). See http://entropia.de/wiki/Anfahrt on how to get there. For your calendars: meetings are held monthly, on the 3rd Friday. There's

Lantz - automation and instrumentation in Python

2012-07-13 Thread Hernan Grecco
Today I am releasing Lantz, a Python automation and instrumentation toolkit that allows you to control instruments in a clean and efficient manner writing pure Python code. For more information you can read the full announcement here [0] or look into the documentation [1] (or in the github

cx_Freeze 4.3

2012-07-13 Thread Anthony Tuininga
What is cx_Freeze? cx_Freeze is a set of scripts and modules for freezing Python scripts into executables, in much the same way that py2exe and py2app do. Unlike these two tools, cx_Freeze is cross platform and should work on any platform that Python itself works on. It supports Python 2.3 or

Re: How to safely maintain a status file

2012-07-13 Thread Chris Angelico
On Fri, Jul 13, 2012 at 2:26 PM, rantingrickjohn...@gmail.com wrote: On Thursday, July 12, 2012 10:13:47 PM UTC-5, Steven D#39;Aprano wrote: Rick has obviously never tried to open a file for reading when somebody else has it opened, also for reading, and discovered that despite Windows being

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-13 Thread Frederic Rentsch
On Tue, 2012-07-10 at 15:11 -0700, Rick Johnson wrote: I've tried to condense your code using the very limited info you have provided. I have removed unnecessarily configuring of widgets and exaggerated the widget borders to make debugging easier. Read below for QA. ## START CONDENSED CODE

Re: lambda in list comprehension acting funny

2012-07-13 Thread Steven D'Aprano
On Thu, 12 Jul 2012 21:33:40 -0700, rusi wrote: On Jul 11, 11:41 am, Daniel Fetchinson fetchin...@googlemail.com wrote: funcs = [ lambda x: x**i for i in range( 5 ) ] print funcs[0]( 2 ) print funcs[1]( 2 ) print funcs[2]( 2 ) This gives me 16 16 16 When I was excepting 1 2 4

Re: How to safely maintain a status file

2012-07-13 Thread Steven D'Aprano
On Thu, 12 Jul 2012 21:26:20 -0700, rantingrickjohnson wrote: On Thursday, July 12, 2012 10:13:47 PM UTC-5, Steven D#39;Aprano wrote: Rick has obviously never tried to open a file for reading when somebody else has it opened, also for reading, and discovered that despite Windows being

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-13 Thread Peter Otten
Frederic Rentsch wrote: I'm sorry I can't post an intelligible piece that does NOT work. I obviously can't post the whole thing. How about a pastebin then? Or even bitbucket/github as you need to track changes anyway? It is way too convoluted. Convoluted code is much easier to debug than

help needed with subprocess, pipes and parameters

2012-07-13 Thread nuffi
If I copy and paste the following command into a command window, it does what I need. c:\Programs\bob\bob.exe -x -y C:\text\path\to some\file.txt | c:\Programs\kate\kate.exe -A 2 --dc Print Media Is Dead --da Author --dt Title --hf Times --bb 14 --aa --font Ariel - C:\rtf\path\to

Re: Writing a wrapper - any tips?

2012-07-13 Thread Martin P. Hellwig
On Friday, 13 July 2012 05:03:23 UTC+1, Temia Eszteri wrote: I#39;m going to be looking into writing a wrapper for the Allegro 5 game development libraries, either with ctypes or Cython. They technically have a basic 1:1 ctypes wrapper currently, but I wanted to make something more pythonic,

Re: adding a simulation mode

2012-07-13 Thread andrea crotti
2012/7/13 Steven D'Aprano steve+comp.lang.pyt...@pearwood.info: Well of course it does. If copytree fails, the try block ends and execution skips straight to the except block, which runs, and then the program halts because there's nothing else to be done. That at least is my guess, based on

Re: Writing a wrapper - any tips?

2012-07-13 Thread Stefan Behnel
Martin P. Hellwig, 13.07.2012 09:39: On Friday, 13 July 2012 05:03:23 UTC+1, Temia Eszteri wrote: I#39;m going to be looking into writing a wrapper for the Allegro 5 game development libraries, either with ctypes or Cython. They technically have a basic 1:1 ctypes wrapper currently, but I

New Python build regr test___all__ fails at 'ctypes.macholib.dyld'

2012-07-13 Thread John Pote
Hi, I have built Python 2.7.3 from source and although the interpreter starts up and runs scripts (so far OK) the 'test___all__' regression test fails. The machine I'm building on is a virtual server running a version of Red Hat Linux Build commands: ./configure --prefix /usr

Mocked object returning another Mocked object

2012-07-13 Thread Jean-Michel Pichavant
Greetings Fellow Group, I'd need your help to fix some issues I have with my unitary tests. I'm trying to bring them to the next level by Mocking equipments controlled by my application. Despite me reading http://www.voidspace.org.uk/python/mock/index.html I cannot figure out how to do the

Re: Mocked object returning another Mocked object

2012-07-13 Thread Ulrich Eckhardt
Am 13.07.2012 12:09, schrieb Jean-Michel Pichavant: I have an App object with the 'target' attribute. This target is controlling a piece of hardware. The hardware itself holds a software, hence the target object having an 'api' attribute. I hope I make sense. So basically I'd like

Re: Keeping the Console Open with IDLE

2012-07-13 Thread summerholidaylearning
On Friday, February 20, 2009 4:06:42 AM UTC, W. eWatson wrote: I#39;m using IDLE for editing, but execute programs directly. If there are execution or quot;compilequot; errors, the console closes before I can see what it contains. How do I prevent that? --

Re: code review

2012-07-13 Thread Albert van der Horst
In article 4ff0f8e0$0$29988$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 01 Jul 2012 05:55:24 -0400, Terry Reedy wrote: On 7/1/2012 2:54 AM, Steven D'Aprano wrote: So no, Python has always included chained comparisons, and yes, it is

Re: Using a CMS for small site?

2012-07-13 Thread Albert van der Horst
In article pu28v7t3nstsamp9emp1781utck1mei...@4ax.com, Gilles nos...@nospam.com wrote: Hello Someone I know with no computer knowledge has a studio appartment to rent in Paris and spent four months building a small site in Joomla to find short-time renters. The site is just... - a few web pages

Initial nose experience

2012-07-13 Thread Roy Smith
I've been using unittest for many years, but have steadfastly (perhaps stubbornly) avoided newfangled improvements like nose. I finally decided to take a serious look at nose. There were a few pain points I had to work through to get our existing collection of tests to run under nose. I

Re: lambda in list comprehension acting funny

2012-07-13 Thread rusi
On Jul 13, 11:36 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Thu, 12 Jul 2012 21:33:40 -0700, rusi wrote: On Jul 11, 11:41 am, Daniel Fetchinson fetchin...@googlemail.com wrote: funcs = [ lambda x: x**i for i in range( 5 ) ] print funcs[0]( 2 ) print funcs[1]( 2 )

Re: lambda in list comprehension acting funny

2012-07-13 Thread rusi
To come back to the OPs question. Variables can be assigned. Or they can be bound. [C++ programmers will be familiar with the difference between initialization and assignment] List comprehensions are defined in terms of assignment to the local variable rather than binding. Hence the issue.

Re: code review

2012-07-13 Thread Steven D'Aprano
On Fri, 13 Jul 2012 12:30:47 +, Albert van der Horst wrote: Apart from Python, Mathematica, Perl 6, CoffeeScript, Cobra and Clay give chained comparisons the standard meaning. It is, or was, a feature request for Boo, but I can't tell whether it has been implemented or not. Algol 68 does

Re: code review

2012-07-13 Thread Chris Angelico
On Sat, Jul 14, 2012 at 1:04 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Actually, no. Is True less than False, or is it greater? In boolean algebra, the question has no answer. It is only an implementation detail of Python that chooses False True. Maybe in boolean

Re: code review

2012-07-13 Thread Roy Smith
On Friday, July 6, 2012 9:58:10 AM UTC-4, Steven D#39;Aprano wrote: (Sadly, when I say quot;wequot; I mean collectively. Many language designers, and programmers, don#39;t have the foggiest clue as to what makes a good clean design. Hence C++ and PHP.) I'm not going to defend C++, but to be

RE: How to safely maintain a status file

2012-07-13 Thread Prasad, Ramit
Well neat tricks aside, I am of the firm belief that deleting files should never be possible whilst they are open. This is one of the few instances I think Windows does something better than OS X. Windows will check before you attempt to delete (i.e. move to Recycling Bin) while OS X will move

RE: lambda in list comprehension acting funny

2012-07-13 Thread Prasad, Ramit
VERBOSE = True def function(arg): if VERBOSE: print(calling function with arg %r % arg) process(arg) def caller(): VERBOSE = False function(1) - Python semantics: function sees VERBOSE False Haskell semantics:

Re: code review

2012-07-13 Thread rusi
On Jul 13, 8:36 pm, Chris Angelico ros...@gmail.com wrote: On Sat, Jul 14, 2012 at 1:04 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Actually, no. Is True less than False, or is it greater? In boolean algebra, the question has no answer. It is only an implementation

Re: adding a simulation mode

2012-07-13 Thread Hans Mulder
On 13/07/12 04:16:53, Steven D'Aprano wrote: On Thu, 12 Jul 2012 16:37:42 +0100, andrea crotti wrote: 2012/7/12 John Gordon gor...@panix.com: In mailman.2043.1342102625.4697.python-l...@python.org andrea crotti andrea.crott...@gmail.com writes: Well that's what I thought, but I can't find

Re: lambda in list comprehension acting funny

2012-07-13 Thread rusi
On Jul 13, 9:12 pm, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: VERBOSE = True def function(arg):     if VERBOSE:        print(calling function with arg %r % arg)     process(arg) def caller():     VERBOSE = False     function(1)

RE: adding a simulation mode

2012-07-13 Thread Prasad, Ramit
Please do NOT catch BaseException, since that is the wrong thing to do. I would agree if you had said in production code. If you are investigating why a third-party function is stopping your interpreter, then catching BaseException may tell you that the code is raising the wrong kind of

Re: adding a simulation mode

2012-07-13 Thread Chris Angelico
On Sat, Jul 14, 2012 at 3:08 AM, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: I would say the opposite. In production code usually I want it to recover, log as much information as I need (including sending any notifications), and NOT just die. In development, not catching the exception will

Re: lambda in list comprehension acting funny

2012-07-13 Thread Chris Angelico
On Sat, Jul 14, 2012 at 2:46 AM, rusi rustompm...@gmail.com wrote: Ok let me restate: if python were to work that way (without the global) we could say either a Python chooses to have dynamic scoping of variables or b There is a bug in python's scoping rules Or c, there's a declaration at

Re: [Python] RE: How to safely maintain a status file

2012-07-13 Thread Chris Gonnerman
On 07/13/2012 11:00 AM, Prasad, Ramit wrote: Well neat tricks aside, I am of the firm belief that deleting files should never be possible whilst they are open. This is one of the few instances I think Windows does something better than OS X. Windows will check before you attempt to delete (i.e.

Re: lambda in list comprehension acting funny

2012-07-13 Thread Hans Mulder
On 13/07/12 18:12:40, Prasad, Ramit wrote: VERBOSE = True def function(arg): if VERBOSE: print(calling function with arg %r % arg) process(arg) def caller(): VERBOSE = False function(1) - Python semantics: function

RE: [Python] RE: How to safely maintain a status file

2012-07-13 Thread Prasad, Ramit
Well neat tricks aside, I am of the firm belief that deleting files should never be possible whilst they are open. This is one of the few instances I think Windows does something better than OS X. Windows will check before you attempt to delete (i.e. move to Recycling Bin) while OS X

RE: lambda in list comprehension acting funny

2012-07-13 Thread Prasad, Ramit
VERBOSE = True def function(arg): if VERBOSE: print(calling function with arg %r % arg) process(arg) def caller(): VERBOSE = False function(1) - Python semantics: function sees VERBOSE False Haskell

Re: [Python] RE: How to safely maintain a status file

2012-07-13 Thread Chris Angelico
On Sat, Jul 14, 2012 at 3:59 AM, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: I lean slightly towards the POSIX handling with the addition that any additional write should throw an error. You are now saving to a file that will not exist the moment you close it and that is probably not

Re: [Python] RE: How to safely maintain a status file

2012-07-13 Thread Hans Mulder
On 13/07/12 19:59:59, Prasad, Ramit wrote: I lean slightly towards the POSIX handling with the addition that any additional write should throw an error. You are now saving to a file that will not exist the moment you close it and that is probably not expected. I'd say: it depends. If the

Re: lambda in list comprehension acting funny

2012-07-13 Thread Ian Kelly
On Fri, Jul 13, 2012 at 11:53 AM, Hans Mulder han...@xs4all.nl wrote: The function `function` refers to a variable `VERBOSE` that isn't local. In some programming langauages, the interpreter would then scan the call stack at run-time, looking for a scope where that name is defined. It would

Re: lambda in list comprehension acting funny

2012-07-13 Thread Hans Mulder
On 13/07/12 20:54:02, Ian Kelly wrote: I've also seen the distinction described as early vs. late binding on this list, but I'm not sure how precise that is -- I believe that terminology more accurately describes whether method and attribute names are looked up at compile-time or at run-time,

Re: Keeping the Console Open with IDLE

2012-07-13 Thread Rodrick Brown
I think you can use pythonw.exe which will read stdin and for any input before closing. (I read this a while back, ma guy here.) Sent from my iPhone On Jul 13, 2012, at 7:27 AM, summerholidaylearn...@gmail.com summerholidaylearn...@gmail.com wrote: On Friday, February 20, 2009 4:06:42 AM UTC,

Re: [Python] RE: How to safely maintain a status file

2012-07-13 Thread MRAB
On 13/07/2012 19:28, Hans Mulder wrote: On 13/07/12 19:59:59, Prasad, Ramit wrote: I lean slightly towards the POSIX handling with the addition that any additional write should throw an error. You are now saving to a file that will not exist the moment you close it and that is probably not

RE: How to safely maintain a status file

2012-07-13 Thread Chris Gonnerman
On 07/13/2012 12:59 PM, Prasad, Ramit wrote: I lean slightly towards the POSIX handling with the addition that any additional write should throw an error. You are now saving to a file that will not exist the moment you close it and that is probably not expected. Ramit But if I created, then

Re: [Python] RE: How to safely maintain a status file

2012-07-13 Thread Christian Heimes
Am 13.07.2012 21:57, schrieb MRAB: It's possible to create a temporary file even in Windows. Windows has a open() flag named O_TEMPORARY for temporary files. With O_TEMPORARY the file is removed from disk as soon as the file handle is closed. On POSIX OS it's common practice to unlink temporary

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-13 Thread Frederic Rentsch
On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote: Frederic Rentsch wrote: I'm sorry I can't post an intelligible piece that does NOT work. I obviously can't post the whole thing. How about a pastebin then? Or even bitbucket/github as you need to track changes anyway? It is way

Re: Python and Qt4 Designer

2012-07-13 Thread Jean Dubois
Op vrijdag 13 juli 2012 03:52:51 UTC+2 schreef Vincent Vande Vyvre het volgende: On 12/07/12 08:42, Jean Dubois wrote: gt; On 12 jul, 02:59, Vincent Vande Vyvre lt;vincent.vandevy...@swing.begt; gt; wrote: gt;gt; On 11/07/12 17:37, Jean Dubois wrote: gt;gt; gt;gt; gt;gt; gt;gt; gt;gt;

ANN: Urwid 1.0.2

2012-07-13 Thread Ian Ward
Announcing Urwid 1.0.2 -- Urwid home page: http://excess.org/urwid/ Manual: http://excess.org/urwid/wiki/UrwidManual Tarball: http://excess.org/urwid/urwid-1.0.2.tar.gz About this release: === This is a stable bug-fix-only release. A number of bugs

Python professional certification

2012-07-13 Thread Mark Lawrence
Google tells me that various certifications are available but I'd like to know if any of these are approved by the PSF or whoever would be responsible? If there's anything out there I've missed it :-( -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: code review

2012-07-13 Thread Terry Reedy
From now on, for each operator I would have to remember wether it is a supposedly comparison operator or not. I believe the following rule is true: if a op b is True or False raises, then op is a potentially chained comparison operation. They are (not) equal (and (not) is), the 4 order

Re: Tkinter.event.widget: handler gets name instead of widget.

2012-07-13 Thread Terry Reedy
On 7/13/2012 4:24 PM, Frederic Rentsch wrote: On Fri, 2012-07-13 at 09:26 +0200, Peter Otten wrote: Another random idea: run your code on a more recent python/tcl installation. That might have been clearer as python + tcl/tk installation. I next spent a day with an attempt to upgrade

Re: Python professional certification

2012-07-13 Thread Ethan Furman
Mark Lawrence wrote: Google tells me that various certifications are available but I'd like to know if any of these are approved by the PSF or whoever would be responsible? If there's anything out there I've missed it :-( There is an O'Reilly Python Certification class offered in

howto do a robust simple cross platform beep

2012-07-13 Thread Gelonida N
Hi, I just want to use a beep command that works cross platform. I tried the simplest approach (just printing the BEL character '\a' chr(7) to the console. This fails on my Ubuntu 12.04 host, as the pcspkr is in the list of the blacklisted kernel modules. I found another snippet trying

Re: How to safely maintain a status file

2012-07-13 Thread Steven D'Aprano
On Fri, 13 Jul 2012 15:15:13 -0500, Chris Gonnerman wrote: On 07/13/2012 12:59 PM, Prasad, Ramit wrote: I lean slightly towards the POSIX handling with the addition that any additional write should throw an error. You are now saving to a file that will not exist the moment you close it and

Re: lambda in list comprehension acting funny

2012-07-13 Thread rusi
On Jul 13, 10:53 pm, Hans Mulder han...@xs4all.nl wrote: If you add `global VERBOSE` to `caller`, then there is only one variable named `VERBOSE` and what `function` does, depends on the most recent assignment to that variable. If you remove your `global VERBOSE`, then there are two

Re: howto do a robust simple cross platform beep

2012-07-13 Thread Steven D'Aprano
On Sat, 14 Jul 2012 03:00:05 +0200, Gelonida N wrote: How do others handle simple beeps? I just want to use them as alert, when certain events occur within a very long running non GUI application. Why? Do you hate your users? What I do at the moment is: For Windows I use winsound.Beep

Re: lambda in list comprehension acting funny

2012-07-13 Thread Steven D'Aprano
On Fri, 13 Jul 2012 19:31:24 -0700, rusi wrote: Consider the following def foo(x): i = 100 if x: j = [i for i in range(10)] return i else: return i A simpler example: def foo(): i = 100 j = [i for i in range(10)] return i In Python 3,

Re: lambda in list comprehension acting funny

2012-07-13 Thread rusi
On Jul 14, 8:43 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 13 Jul 2012 19:31:24 -0700, rusi wrote: Consider the following def foo(x):     i = 100     if x:         j = [i for i in range(10)]         return i     else:         return i A simpler

[OT] Simulation Results Managment

2012-07-13 Thread moogyd
Hi, This is a general question, loosely related to python since it will be the implementation language. I would like some suggestions as to manage simulation results data from my ASIC design. For my design, - I have a number of simulations testcases (TEST_XX_YY_ZZ), and within each of these

[issue15344] devinabox: failure when running make_a_box multiple times

2012-07-13 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: I just got the same error with a clean install. I'll have to poke at it some other time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15344

[issue15296] Minidom can't create ASCII representation

2012-07-13 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Serhiy - why did you remove that documentation bit? Because it's not relevant anymore. With patch you will never get UnicodeError exceptions in case of unrepresentable text data. -- ___ Python

[issue13686] Some notes on the docs of multiprocessing

2012-07-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset caea3c64442b by Eli Bendersky in branch 'default': Some fixes for the documentation of multiprocessing (per issue #13686) http://hg.python.org/cpython/rev/caea3c64442b -- nosy: +python-dev

[issue13686] Some notes on the docs of multiprocessing

2012-07-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Switching this to 3.3 only Fixes for 1-3 committed in caea3c64442b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13686 ___

[issue15296] Minidom can't create ASCII representation

2012-07-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7b97cea795d8 by Eli Bendersky in branch 'default': Issue #15296: Fix minidom.toxml/toprettyxml for non-unicode encodings. Patch by Serhiy Storchaka, with some minor style adjustments by me.

[issue15296] Minidom can't create ASCII representation

2012-07-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Fixed in 3.3 Thanks for the patch -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15296 ___

[issue15342] os.path.join behavior

2012-07-13 Thread Ned Deily
Ned Deily n...@acm.org added the comment: os.path.join is working as documented. See http://docs.python.org/library/os.path.html#os.path.join If any component is an absolute path, all previous components (on Windows, including the previous drive letter, if there was one) are thrown away, and

[issue13686] Some notes on the docs of multiprocessing

2012-07-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1110692aac71 by Eli Bendersky in branch 'default': Additional fixes to multiprocessing docs (for issue #13686) http://hg.python.org/cpython/rev/1110692aac71 -- ___ Python

[issue13686] Some notes on the docs of multiprocessing

2012-07-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Done (except 5 and 6, which are non-issues on a second look) -- status: open - closed versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13686

[issue1767933] Badly formed XML using etree and utf-16

2012-07-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Serhiy, can you also take a look at #9458 - it may be related? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1767933 ___

[issue14190] Minor C API documentation bugs

2012-07-13 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Closing, as I don't think it's terribly important to backport this. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14190

[issue15307] Patch for --symlink support in pyvenv with framework python

2012-07-13 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Fixing sys.executable to point to the stub launcher instead of the interpreter in the fw will also fix other unrelated issues, like making python3-32 work properly in 64-/32-bit builds for IDLE and for tests that spawn interpreters in subprocesses.

[issue15238] shutil.copystat should copy Linux extended attributes

2012-07-13 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Hynek: You must forgive me, I'm a recovering Windows programmer. I thought extended attributes were a Linux-only thing. Can you tell me what other platforms they are available on? And/or suggest some alternate language?

[issue15307] Patch for --symlink support in pyvenv with framework python

2012-07-13 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I removed the call to realpath from pythonw because resolving symlinks breaks the feature. Realpath also converts relative paths to absolute paths, and that probably explains the new failure you're having. I'll try to find a solution

[issue4832] idle filename extension

2012-07-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 677a9326b4d4 by Ned Deily in branch 'default': Issue #4832: Modify IDLE to save files with .py extension by http://hg.python.org/cpython/rev/677a9326b4d4 -- nosy: +python-dev

[issue4832] IDLE does not supply a default ext of .py on Windows or OS X for new file saves

2012-07-13 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Committed for 3.3. I'm +0.5 for 2.7 and 3.2. It seems like a bug to me. Terry, I'll leave it up to you to handle that and any further doc updates you want to make. -- title: idle filename extension - IDLE does not supply a default ext of

[issue15342] os.path.join behavior

2012-07-13 Thread Pan Yongzhi
Pan Yongzhi fossi...@users.sourceforge.net added the comment: I know this is working as documented. But working as documented does not mean it is not a bug. I cannot deduce that it will append a separator if joining with an empty string from the documentation. Also, this behavior is implicit,

[issue11445] python.exe on OS X shared-llbrary build erroneously linked to MacPorts python library

2012-07-13 Thread Eduardo Cereto Carvalho
Changes by Eduardo Cereto Carvalho eduardocer...@gmail.com: -- nosy: +Eduardo.Cereto.Carvalho ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11445 ___

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Well os.listdir doesn't fail to access a UNC path on Windows x64 in general. So presumably this particular path is not accessible by the buildbot process owner? -- ___ Python tracker

[issue11624] distutils should support a custom list of exported symbols for Windows dlls.

2012-07-13 Thread Daniel Holth
Daniel Holth dho...@fastmail.fm added the comment: I must have missed the export_symbols keyword argument to Extension(), or it was added. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, this particular path is the build directory itself, so it's certainly accessible through the normal (non-UNC) path. There has to be something else :-) Jeremy told me his buildbot process runs as a service, perhaps that is related?

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: It's using an administrative share (\\server\d$) and those are usually restricted with share permissions -- different from NTFS permissions. That the process runs as a service is likely to have an effect since services are conventionally run

[issue9458] xml.etree.ElementTree.ElementTree.write(): encoding handling problems

2012-07-13 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: ElementTree write works with two kinds of output -- binary and text. The difference between them is only determined by encoding argument. If encoding is unicode, then output is text, else it is binary. There is no other way for filename

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It's using an administrative share (\\server\d$) and those are usually restricted with share permissions -- different from NTFS permissions. That the process runs as a service is likely to have an effect since services are conventionally run

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: For this particular buildbot setup, maybe yes. But it would be possible in principle to have a buildbot configuration which could allow the test to execute. (eg one running under a user account which can access the path via an admin share). Does

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15338 ___ ___ Python-bugs-list mailing

[issue15345] HOWTOs Argparse tutorial - code example raises SyntaxError

2012-07-13 Thread Simon Hayward
New submission from Simon Hayward simonhayw...@gmail.com: HOWTOs - Argparse Tutorial, the code example will raise a syntax error when run. A trailing python3 reference (if called as a function): 'end=', to suppresses a newline remains. print {}^{} == .format(args.x, args.y), end= Should

[issue15307] Patch for --symlink support in pyvenv with framework python

2012-07-13 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: v5 adds test cases for sys.executable and calls realpath on dirname(argv[0]) in pythonw.c and also has the changes in Ned's v4. The test failure for test_venv is expected, the note in http://docs.python.org/dev/library/venv.html

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Jeremy Kloth
Jeremy Kloth jeremy.kl...@gmail.com added the comment: The buildbot service account is a standard user (per the buildbot servce installation directions). When logged on, the user can access the share. Just when logged on as a service is when it cannot. After much searching, I still cannot

[issue10614] ZipFile: add a filename_encoding argument

2012-07-13 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: umedoblock: your patch is incorrect, as it produces moji-bake. if there is a file name b'f\x94n', it will decode as sjis under your patch (to u'f\u99ac'), even though it was meant as cp437 (i.e. u'f\xf6n'). --

[issue15320] thread-safety issue in regrtest.main()

2012-07-13 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I find the patch complicated. If you are using a Lock, surely you don't need a deque, you can keep the original iterator (which is also more readable since it mirrors the semantics quite closely)? --

[issue10614] ZipFile: add a filename_encoding argument

2012-07-13 Thread umedoblock
umedoblock umedobl...@gmail.com added the comment: Hi, Martin. I tried your test case with attached file. And I got below result. p3 ./encodings.py encoding: sjis, filename: f馬 encoding: cp437, filename: fön sjis_filename = f馬 cp437_filename = fön There are two success cases. So I think that

[issue15342] os.path.join behavior

2012-07-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Whatever the good or bad points of the API design, it is what it is and has been for a very long time. It is not something that is going to change, because the break in backward compatibility would be too large. What is unclear about

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: My guess is that it's to do with Service Hardening. I did a quick dump of my token in an interactive session and as the owner of a service. Quite a few differences. I haven't read up on this area yet so I'm not sure what options there are / how

[issue15053] imp.lock_held() Changed in Python 3.3 mention accidentally one function up

2012-07-13 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c09f454af2c6 by Brett Cannon in branch 'default': Issue #15053: Make sure all functions related to the import lock have http://hg.python.org/cpython/rev/c09f454af2c6 -- nosy: +python-dev

[issue15053] imp.lock_held() Changed in Python 3.3 mention accidentally one function up

2012-07-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15053 ___

[issue15151] Documentation for Signature, Parameter and signature in inspect module

2012-07-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +Yury.Selivanov, larry, yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15151 ___ ___

[issue15338] test_UNC_path failure in test_import

2012-07-13 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Simplest solution might be to catch PermissionError and call skipTest from within. This would allow buildbots to run the test which had access through the relevant share. -- ___ Python tracker

[issue15169] Clear C code under PyImport_ExecCodeModuleObject()

2012-07-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- priority: normal - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15169 ___ ___

[issue15169] Clear C code under PyImport_ExecCodeModuleObject()

2012-07-13 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15169 ___ ___

[issue14600] Change ImportError reference handling, naming

2012-07-13 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Yep, bf23a6c215f6 fixed it, thanks for the ping. Brian or Antoine, can you close this or was there something else? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14600

[issue15346] Tkinter dnd has no documentation

2012-07-13 Thread Daniel Swanson
New submission from Daniel Swanson popcorn.tomato.d...@gmail.com: The title should be self explanatory. I needed Drag-and-drop for a project I was working on, (maybe I shouldn't be refering to it in the past tense as I haven't started yet) so I checked the documentation for tkinter and found:

  1   2   >