Re: Passing ints to a function

2012-06-09 Thread Jussi Piitulainen
stayvoid writes: You want to unpack the list: function(*a)  # like function(a[0], a[1], a[2], ...) Awesome! I forgot about this. Here's something you could have thought of for yourself even when you didn't remember that Python does have special built-in support for applying a function

Re: Passing ints to a function

2012-06-09 Thread Chris Angelico
On Sat, Jun 9, 2012 at 6:29 PM, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: The point is that the function itself can be passed as an argument to the auxiliary function ... And unlike in Javascript, a bound method is fully callable too. Chris Angelico --

Re: mode for file created by open

2012-06-09 Thread Neal Becker
Cameron Simpson wrote: On 08Jun2012 14:36, Neal Becker ndbeck...@gmail.com wrote: | If a new file is created by open ('xxx', 'w') | | How can I control the file permission bits? Is my only choice to use chmod | after opening, or use os.open? | | Wouldn't this be a good thing to have as

Re: next alpha sequence value from var pointing to array

2012-06-09 Thread jdmorgan
Newline was the issue indeed. Thanks for you help Peter. Cheers, Derek -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-09 Thread Dietmar Schwertberger
Am 08.06.2012 17:11, schrieb CM: I'm curious about your point but I don't really understand it. Could you try again without using any scare-quoted words? Maybe given an example of creating a small text editor application with a GUI builder/ IDE in this Pythonic way you are hoping for. Before

Re: mode for file created by open

2012-06-09 Thread Devin Jeanpierre
On Sat, Jun 9, 2012 at 7:42 AM, Neal Becker ndbeck...@gmail.com wrote: Doesn't anyone else think it would be a good addition to open to specify a file creation mode?  Like posix open?  Avoid all these nasty workarounds? I do, although I'm hesitant, because this only applies when mode == 'w',

Strange Problem with pythonw.exe

2012-06-09 Thread asa
Hello subscribers, I've recently encountered a strange problem with Python for Windows. I'm using Windows 7 Pro 64 Bit and Python 3.2.3 64 Bit (also tried 32 bit). The Problem is, that pythonw.exe does not work at all! Therefore no IDLE for me... But python.exe runs just fine. I ran Process

Re: Installing MySQLdb via FTP?

2012-06-09 Thread Tim Johnson
* Corey Richardson co...@octayn.net [120608 11:39]: On Fri, 8 Jun 2012 09:55:23 -0800 Tim Johnson t...@akwebsoft.com t...@akwebsoft.com wrote: See the thread titled Python libraries portable? you will note that Corey Richardson makes the statement that MySQLdb is a C extension. I

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-09 Thread CM
I think that something in the style of Visual BASIC (version 6) is required for either wxPython or PyQt/PySide (or both). In the Visual BASIC editor you can e.g. add a GUI element and directly go to the code editor to fill methods (e.g. an OnClick method). You can do this for wxPython with

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-09 Thread Chris Angelico
On Sat, Jun 9, 2012 at 11:25 PM, Dietmar Schwertberger n...@schwertberger.de wrote: ... for many purposes only simple GUIs are required and it should be possible to create these without studying manuals (on toolkit and GUI editor). A typical simple GUI would e.g. be for a measurement / data

Re: mode for file created by open

2012-06-09 Thread Chris Angelico
On Sun, Jun 10, 2012 at 12:08 AM, Devin Jeanpierre jeanpierr...@gmail.com wrote: I do, although I'm hesitant, because this only applies when mode == 'w', and open has a large and growing list of parameters. True, but keyword arguments don't cost much complexity. open(file, mode='r',

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-09 Thread Dietmar Schwertberger
Am 09.06.2012 17:34, schrieb CM: You can do this for wxPython with Boa Constructor easily. You can bind an event handler for a wx.EVT_BUTTON to, e.g., Button1 with Boa and it will add this code for you to the bottom of your code: def OnButton1Button(self,evt): evt.Skip() And you can

Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-09 Thread Chris Angelico
On Sun, Jun 10, 2012 at 3:07 AM, Dietmar Schwertberger n...@schwertberger.de wrote: None of these were such that I could propagate it as GUI development tool for non-programmers / casual users. Sure, some are good for designing the GUI, but at the point where the user code is to be added, most

Re: Strange Problem with pythonw.exe

2012-06-09 Thread Terry Reedy
On 6/9/2012 10:23 AM, a...@vorsicht-bissig.de wrote: Hello subscribers, I've recently encountered a strange problem with Python for Windows. I'm using Windows 7 Pro 64 Bit and Python 3.2.3 64 Bit (also tried 32 bit). The Problem is, that pythonw.exe does not work at all! Therefore no IDLE for

Re: Installing MySQLdb via FTP?

2012-06-09 Thread Tim Johnson
* Tim Johnson t...@akwebsoft.com [120609 07:30]: http://mysql-python.hg.sourceforge.net/hgweb/mysql-python/MySQLdb-2.0/file/566baac88764/src It definitely is. The C extension part is the '_mysql' module, here it is /usr/lib64/python2.7/site-packages/_mysql.so. MySQLdb (of which

Re: mode for file created by open

2012-06-09 Thread Terry Reedy
On 6/9/2012 10:08 AM, Devin Jeanpierre wrote: On Sat, Jun 9, 2012 at 7:42 AM, Neal Beckerndbeck...@gmail.com wrote: Doesn't anyone else think it would be a good addition to open to specify a file creation mode? Like posix open? Avoid all these nasty workarounds? I do, although I'm

Re: mode for file created by open

2012-06-09 Thread Neal Becker
Terry Reedy wrote: On 6/9/2012 10:08 AM, Devin Jeanpierre wrote: On Sat, Jun 9, 2012 at 7:42 AM, Neal Beckerndbeck...@gmail.com wrote: Doesn't anyone else think it would be a good addition to open to specify a file creation mode? Like posix open? Avoid all these nasty workarounds? I do,

which one do you prefer? python with C# or java?

2012-06-09 Thread Yesterday Paid
I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard choice...I like Visual studio(because my first lang is VB6 so I'm familiar with that)

Re: mode for file created by open

2012-06-09 Thread Cameron Simpson
On 09Jun2012 07:42, Neal Becker ndbeck...@gmail.com wrote: | Cameron Simpson wrote: | Doesn't anyone else think it would be a good addition to open to specify a file | creation mode? Like posix open? Avoid all these nasty workarounds? -1 open() is cross platform. os.open() is platform

Re: mode for file created by open

2012-06-09 Thread Cameron Simpson
On 09Jun2012 18:25, Neal Becker ndbeck...@gmail.com wrote: | I haven't seen the current code - I'd guess it just uses posix open. | So I would guess it wouldn't be difficult to add the creation mode argument. | How about call it cr_mode? What shall it contain on Windows? What shall it contain on

Re: mode for file created by open

2012-06-09 Thread Terry Reedy
On 6/9/2012 6:25 PM, Neal Becker wrote: Terry Reedy wrote: The original open builtin was a thin wrapper around old C's stdio.open. Open no longer has that constraint. After more discussion here, someone could open a tracker issue with a specific proposal. Keep in mind that 'mode' is already a

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread becky_lewis
Lisp and Clojure are functional languages. Learning one of those (or a similar language) will help by providing you with a fairly different perspective on how to approach programming problems. Personally I think learning Lisp or Clojure is good advice. However, if you're really adamant about

Re: mode for file created by open

2012-06-09 Thread Cameron Simpson
On 09Jun2012 19:03, Terry Reedy tjre...@udel.edu wrote: | So I would guess it wouldn't be difficult to add the creation mode argument. | | On posix system, probably not. On windows, just ignore it, unless 'root' | can be mapped to 'admin'. Oh please NO! Either implement it correctly, or raise

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread Devin Jeanpierre
On Sat, Jun 9, 2012 at 7:04 PM, becky_lewis bex.le...@gmail.com wrote: Lisp and Clojure are functional languages. Sorry, pet peeve. Lisps are a class of languages that are only united by their common syntax and their use of syntax transformations (macros). Most lisps are not really functional at

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread Tim Johnson
* Yesterday Paid howmuchisto...@gmail.com [120609 14:52]: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard choice...I like Visual

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread Paul Rubin
Yesterday Paid howmuchisto...@gmail.com writes: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) Why do you want to do that? First of all, why not stick with learning one language at a time? Get

[Q] How to specify options for 'setup.py install' by environment variable?

2012-06-09 Thread Makoto Kuwata
Hi, setup.py install command supports options such as --prefix, --install-scripts, and so on. For example: $ python setup.py install --prefix=$PWD/local --install-scripts=$PWD/bin Question: is it possible to specify these options by environment variable? I want to specify --prefix or

Nexus Programming Language

2012-06-09 Thread Adam Campbell
The Nexus programming language version 0.5.0 has been released. It is an object-oriented, dynamically-typed, reflective programming language, drawing from Lua and Ruby. www.nexuslang.org -- http://mail.python.org/mailman/listinfo/python-list

Re: [Q] How to specify options for 'setup.py install' by environment variable?

2012-06-09 Thread Ned Deily
In article caftm5rucoaztp89mbpw4utiska8zq58q9evjel1ofulbc-p...@mail.gmail.com, Makoto Kuwata k...@kuwata-lab.com wrote: Hi, setup.py install command supports options such as --prefix, --install-scripts, and so on. For example: $ python setup.py install --prefix=$PWD/local

compiling py 2.7.3 with openssl

2012-06-09 Thread V N
RHEL 5.3 x86_64 / Python 2.7.3 compiled as shown below == PYTHON=Python-2.7.3 tar xjf bin/$PYTHON.tar.bz2 cd $PYTHON PYHOME=/usr/local/$PYTHON; export PYHOME LDFLAGS=-L/usr/local/lib64; export LDFLAGS CPPFLAGS=-I/usr/local/include/ncurses -I/usr/local/include/readline

Re: [Q] How to specify options for 'setup.py install' by environment variable?

2012-06-09 Thread Makoto Kuwata
On Sun, Jun 10, 2012 at 11:55 AM, Ned Deily n...@acm.org wrote: In article caftm5rucoaztp89mbpw4utiska8zq58q9evjel1ofulbc-p...@mail.gmail.com,  Makoto Kuwata k...@kuwata-lab.com wrote: Hi, setup.py install command supports options such as --prefix, --install-scripts, and so on. For

Re: Nexus Programming Language

2012-06-09 Thread rusi
On Jun 10, 7:46 am, Adam Campbell abcampbell...@gmail.com wrote: The Nexus programming language version 0.5.0 has been released. It is an object-oriented, dynamically-typed, reflective programming language, drawing from Lua and Ruby.www.nexuslang.org What does nexus have that python doesn't?

[issue14984] netrc module allows read of non-secured .netrc file

2012-06-09 Thread bruno Piguet
bruno Piguet bruno.pig...@gmail.com added the comment: Do you agree that the attached patch could be a practical solution ? The patch is for the 2.6 version of the lib. Transposition to other versions should be trivial. If we don't want to break backward compatibility, the solution is to add a

[issue10053] Don’t close fd when FileIO.__init__ fails

2012-06-09 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Anyone? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10053 ___ ___ Python-bugs-list mailing list

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-09 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Martin, are you still committed to this? I still think code duplication is bad (especially for security related code) but I’d be willing to write a fwalk-less version so it doesn’t look like I’m just defending my code here. --

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-06-09 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Martin, are you still committed to this? Yes, I'll provide a patch RSN. I doubt that there will be that much code duplication. -- ___ Python tracker rep...@bugs.python.org

[issue15021] xmlrpc server hangs

2012-06-09 Thread Abhishek Singh
Abhishek Singh abhishekrsi...@gmail.com added the comment: I have a pretty complicated setup. 100's of threads, xmlrpc being in the main thread and providing show routines for my program. I have 10's of such processes doing some heavy duty simulation/crunching. The threads and program is in

[issue14984] netrc module allows read of non-secured .netrc file

2012-06-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the patch. I think the extra check should be done unconditionally in the case where we've looked up the default .netrc file. Adding a feature to 3.3 to provide an optional check for other files (with default False) would

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-09 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: Its not a bug though it has maintenance problems because if you change manual is False to not manual it no longer works correctly. -- ___ Python tracker rep...@bugs.python.org

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2012-06-09 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Patch looks great - thanks David. -- assignee: docs@python - michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14971 ___

[issue15040] stdlib compatability with pypy: mailbox.py

2012-06-09 Thread mattip
New submission from mattip matti.pi...@gmail.com: These are changes necessary to mailbox.py and its tests so that tests pass (windows platform) on pypy 1.9.0. Files must be explicitly closed on pypy. I would like to submit these as a compatability issue type, but that category does not

[issue13598] string.Formatter doesn't support empty curly braces {}

2012-06-09 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: it has maintenance problems because if you change manual is False to not manual it no longer works correctly. So you should probably comment the initialisation appropriately. -- ___ Python

[issue15040] stdlib compatability with pypy: mailbox.py

2012-06-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I see some code changes, but no added tests for those code changes. msg.fp doesn't exist in Python3. I'd like to understand those changes better, but I don't know when I'll have the time or if it is worth the effort. -- nosy:

[issue15040] stdlib compatability with pypy: mailbox.py

2012-06-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Oh, and the code changes should presumably be applied to Python3 as well (once there are tests), so I've added those versions. It might be better to have two patches, one for the close of _file, and the other for the msg.fp stuff (since

[issue15041] tkinter see also list is from Python2

2012-06-09 Thread Daniel Swanson
New submission from Daniel Swanson popcorn.tomato.d...@gmail.com: I was looking for information about menus in tkinter and checked the see also list. The second is copyrighted 1999, the third says Python 2.5 and the first is pretty much just links to the second and third. The forth is a book.

[issue15041] tkinter documentation see also list in Python3 is from Python2

2012-06-09 Thread Daniel Swanson
Changes by Daniel Swanson popcorn.tomato.d...@gmail.com: -- title: tkinter see also list is from Python2 - tkinter documentation see also list in Python3 is from Python2 type: - enhancement ___ Python tracker rep...@bugs.python.org

[issue14680] pydoc with -w option does not work for a lot of help topics

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. Are you interested in making a patch? Also, could you tell if the bug happens in 3.2? -- nosy: +eric.araujo stage: - needs patch ___ Python tracker rep...@bugs.python.org

[issue14680] pydoc with -w option does not work for a lot of help topics

2012-06-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: docs@python - components: +Library (Lib) -Documentation nosy: -docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14680 ___

[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Text LGTM; I haven’t looked at the position in the doc file though. Sandro, once again I’m adding you to nosy in the hope that you’ll have time to make a review and maybe a commit, with my thanks! -- nosy: +sandro.tosi

[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Please also take my note about pipes.quote in my OP into account. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14616 ___

[issue14843] support define_macros / undef_macros in setup.cfg

2012-06-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Added file: http://bugs.python.org/file25870/ac776ef41428.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14843 ___

[issue14848] Use shutil.move instead of os.rename in packaging

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: OK. Can you paste the full traceback for the error? -- stage: - needs patch title: os.rename should not be used - Use shutil.move instead of os.rename in packaging ___ Python tracker

[issue14843] support define_macros / undef_macros in setup.cfg

2012-06-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file25870/ac776ef41428.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14843 ___

[issue14843] support define_macros / undef_macros in setup.cfg

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Looks like the diff generator can’t be used for not up-to-date clones. Could you update a diff? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14843

[issue14850] The inconsistency of codecs.charmap_decode

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: What is the use case for passing a string subclass to charmap_decode? Or in other words, how did you stumble upon the bug? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue14927] add Do not supply 'int' argument to random.shuffle docstring

2012-06-09 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +easy nosy: +sandro.tosi stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14927 ___

[issue14968] Section Inplace Operators of :mod:`operator` should be a subsection

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Sandro: I added 2.7 to indicate it should be checked too. As you said, the bug wasn’t there, because there is no In-place Operators section (which I think there should be, i.e. backporting #9717 (if you do that, please use a full commit

[issue15003] make PyNamespace_New() public

2012-06-09 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The type is available as types.SimpleNamespace (sorry for being OT) Is this documented in whatsnew? Also, I remember a discussion about making it public or not, but don’t recall a decision. I personally find it bad that we have structseqs

[issue3955] maybe doctest doesn't understand unicode_literals?

2012-06-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I fail to see the problem here. If the module has 'from __future__ import unicode_literals, then the docstring output clauses would need to be changed to reflect the fact that the input literals are now unicode. What am I missing?

[issue2020] _sha256 module missing if openssl is not in a normal directory.

2012-06-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Since there's been no response, I'm closing this. -- keywords: +buildbot nosy: +r.david.murray resolution: - out of date stage: - committed/rejected status: pending - closed ___ Python

[issue6165] strftime incorrectly processes DST flag when passed time touples

2012-06-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Closing because of lack of response. -- nosy: +r.david.murray status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6165

[issue9722] PyObject_Print with Visual Studio 2010

2012-06-09 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9722 ___ ___