[ANN] Android Debug Bridge (ADB) Scripting Language For Android (SL4A) convenience library

2011-11-28 Thread Stef Mientki
hello, The information on ADB / SL4A is quiet overwhelming. Despite that, especially for people, not familiar with Linux, it's not an easy task to get their first program running. This library allows you to easy upload and run Python files on a Android device, without pressing any button on

Re: Proper way to delete/kill a logger?

2011-11-28 Thread Chris Withers
On 28/11/2011 04:16, cassiope wrote: I've been trying to migrate some code to using the standard python logging classes/objects. And they seem quite capable of doing what I need them to do. Unfortunately there's a problem in my unit tests. It's fairly common to have to create quite a few

Re: my new project, is this the right way?

2011-11-28 Thread 88888 Dihedral
On Sunday, November 27, 2011 4:49:14 PM UTC+8, 8 Dihedral wrote: On Sunday, November 27, 2011 4:29:52 PM UTC+8, 8 Dihedral wrote: On Sunday, November 27, 2011 12:03:26 PM UTC+8, Matt Joiner wrote: Sounds like you want a key-value store. If it's a lot of data, you may still want a

Re: lxml precaching DTD for document verification.

2011-11-28 Thread Gelonida N
Thanks Stefan, On 11/28/2011 08:38 AM, Stefan Behnel wrote: Gelonida N, 27.11.2011 18:57: I'd like to verify some (x)html / / html5 / xml documents from a server. These documents have a very limited number of different doc types / DTDs. So what I would like to do is to build a small DTD

Re: sick of distribute, setup, and all the rest...

2011-11-28 Thread Steven D'Aprano
On Sun, 27 Nov 2011 23:18:15 -0800, rusi wrote: On Nov 28, 9:37 am, alex23 wuwe...@gmail.com wrote: With that approach in mind, I've never had any real issues using pip, virtualenv etc for managing my development environment. Yes that is in a way my point also: we discuss (things like)

python 2.5 and ast

2011-11-28 Thread Andrea Crotti
I'm happily using the ast module to analyze some code, but my scripts need also to run unfortunately on python 2.5 The _ast was there already, but the ast helpers not yet. Is it ok if I just copy over the source from the ast helpers in my code base or is there a smarter way? (I don't even need

Cursor.fetchall

2011-11-28 Thread Jayron Soares
Hi guys! I'm stuck at a problem, when I run the follow code: http://pastebin.com/4Gd9V325 I get this error: Traceback (most recent call last): File /home/jayron/Downloads/grafos.py, line 49, in module g, e = ministro_lei() File /home/jayron/Downloads/grafos.py, line 24, in ministro_lei

Re: Cursor.fetchall

2011-11-28 Thread Felipe Vinturini
Hi Jayron, Instead of using Q to loop over the result, use: dbcursor. resp = dbcursor.fetchall() I hope it helps. Regards, Felipe. On Mon, Nov 28, 2011 at 9:54 AM, Jayron Soares jayronsoa...@gmail.comwrote: Hi guys! I'm stuck at a problem, when I run the follow code:

cmd.Cmd asking questions?

2011-11-28 Thread Tim Chase
Are there best-practices for creating wizards or asking various questions (whether yes/no or text/numeric entry) in a cmd.Cmd class? Something like the imaginary confirm() and get_string() methods here: class MyCmd(cmd.Cmd): def do_name(self,line): s = get_string(prompt=line,

Re: suppressing bad characters in output PCDATA (converting JSON to XML)

2011-11-28 Thread Steven D'Aprano
On Fri, 25 Nov 2011 13:50:01 +, Adam Funk wrote: I'm converting JSON data to XML using the standard library's json and xml.dom.minidom modules. I get the input this way: input_source = codecs.open(input_file, 'rb', encoding='UTF-8', errors='replace') big_json = json.load(input_source)

Re: cmd.Cmd asking questions?

2011-11-28 Thread Robert Kern
On 11/28/11 12:12 PM, Tim Chase wrote: Are there best-practices for creating wizards or asking various questions (whether yes/no or text/numeric entry) in a cmd.Cmd class? Something like the imaginary confirm() and get_string() methods here: class MyCmd(cmd.Cmd): def do_name(self,line): s =

Re: Cursor.fetchall

2011-11-28 Thread Jayron Soares
Hi Felipe, I did, however I got this error: Traceback (most recent call last): File /home/jayron/Downloads/grafos.py, line 48, in module g, e = ministro_lei() File /home/jayron/Downloads/grafos.py, line 34, in ministro_lei for i in G.degree(): TypeError: 'int' object is not iterable

Re: Pragmatics of the standard is() function

2011-11-28 Thread Jean-Michel Pichavant
candide wrote: In which cases should we use the is() function ? The is() function compares identity of objects rather than values so I was wondering in which circumstances comparing identities of objects is really vital. Examining well reputated Python source code, I realize that is()

Re: sick of distribute, setup, and all the rest...

2011-11-28 Thread rusi
On Nov 28, 4:42 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: We don't chase people down on the street and lecture them about the problems we think they are having, we answer questions about ACTUAL problems that they have experienced and asking about. ... ever question gets

Re: Cursor.fetchall

2011-11-28 Thread Jean-Michel Pichavant
Jayron Soares wrote: Hi Felipe, I did, however I got this error: Traceback (most recent call last): File /home/jayron/Downloads/grafos.py, line 48, in module g, e = ministro_lei() File /home/jayron/Downloads/grafos.py, line 34, in ministro_lei for i in G.degree(): TypeError: 'int'

Re: Proper way to delete/kill a logger?

2011-11-28 Thread Jean-Michel Pichavant
cassiope wrote: I've been trying to migrate some code to using the standard python logging classes/objects. And they seem quite capable of doing what I need them to do. Unfortunately there's a problem in my unit tests. It's fairly common to have to create quite a few entities in the course of

Re: sick of distribute, setup, and all the rest...

2011-11-28 Thread Steven D'Aprano
On Mon, 28 Nov 2011 05:14:27 -0800, rusi wrote: On Nov 28, 4:42 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: We don't chase people down on the street and lecture them about the problems we think they are having, we answer questions about ACTUAL problems that they have

Re: sick of distribute, setup, and all the rest...

2011-11-28 Thread Andreas Perstinger
On 2011-11-28 14:14, rusi wrote: On Nov 28, 4:42 pm, Steven D'Apranosteve +comp.lang.pyt...@pearwood.info wrote: We don't chase people down on the street and lecture them about the problems we think they are having, we answer questions about ACTUAL problems that they have experienced and

Re: Proper way to delete/kill a logger?

2011-11-28 Thread Roy Smith
In article mailman.3096.1322488085.27778.python-l...@python.org, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Loggers are static objects managed by the module itself. For reasons I can't quite explain, that sentence makes me want to sing The Lumberjack Song. I'm a logger(*) and I'm

correct usage of a generator?

2011-11-28 Thread Tim
Hi, I need to generate a list of file names that increment, like this: fname1 fname2 fname3 and so on. I don't know how many I'll need until runtime so I figure a generator is called for. def fname_gen(stem): i = 0 while True: i = i+1 yield '%s%d' % (stem,i) blarg =

Re: Proper way to delete/kill a logger?

2011-11-28 Thread cassiope
Thanks Chris and JM, I will explore how much work it's going to take to change the various scripts to _always_ starting the logger from main(). As further explanation - this code predates the logging module, and many of the functions/classes had an optional argument for the home- made logger - and

Re: correct usage of a generator?

2011-11-28 Thread Steven D'Aprano
On Mon, 28 Nov 2011 07:36:17 -0800, Tim wrote: Hi, I need to generate a list of file names that increment, like this: fname1 fname2 fname3 and so on. I don't know how many I'll need until runtime so I figure a generator is called for. def fname_gen(stem): i = 0 while True:

Re: correct usage of a generator?

2011-11-28 Thread Peter Otten
Tim wrote: Hi, I need to generate a list of file names that increment, like this: fname1 fname2 fname3 and so on. I don't know how many I'll need until runtime so I figure a generator is called for. def fname_gen(stem): i = 0 while True: i = i+1 yield '%s%d'

Re: correct usage of a generator?

2011-11-28 Thread Neil Cerutti
On 2011-11-28, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Mon, 28 Nov 2011 07:36:17 -0800, Tim wrote: Hi, I need to generate a list of file names that increment, like this: fname1 fname2 fname3 and so on. I don't know how many I'll need until runtime so I figure a

mailbox module difficulties

2011-11-28 Thread Eduardo Alvarez
Hello, everyone, I'm in the process of learning how to use the mailbox module with python 3.2. I've noticed the following seemingly inconsistent behavior: if I call a Maildir object directly, the module works perfectly. I can, for example, call mailbox.Maildir(~/Maildir).items() and get the

Re: mailbox module difficulties

2011-11-28 Thread Chris Angelico
On Tue, Nov 29, 2011 at 4:21 AM, Eduardo Alvarez !nospam!astrochelon...@gmail.com wrote: if I call a Maildir object directly, the module works perfectly. I can, for example, call mailbox.Maildir(~/Maildir).items() and get the expected list of (key,Message) pairs. however, if I do the

Re: mailbox module difficulties

2011-11-28 Thread Peter Otten
Eduardo Alvarez wrote: however, if I do the following: b = mailbox.Maildir(~/Maildir) b.items() I get an empty list. I don't understand why this is so, specially since the last example in the documentation shows a reference to a Maildir object being created. Why does this happen?

Re: correct usage of a generator?

2011-11-28 Thread Mel Wilson
Tim wrote: Hi, I need to generate a list of file names that increment, like this: fname1 fname2 fname3 and so on. I don't know how many I'll need until runtime so I figure a generator is called for. def fname_gen(stem): i = 0 while True: i = i+1 yield

Re: mailbox module difficulties

2011-11-28 Thread Eduardo Alvarez
On 2011-11-28, Peter Otten __pete...@web.de wrote: Eduardo Alvarez wrote: however, if I do the following: b = mailbox.Maildir(~/Maildir) b.items() I get an empty list. I don't understand why this is so, specially since the last example in the documentation shows a reference to a

Re: suppressing bad characters in output PCDATA (converting JSON to XML)

2011-11-28 Thread Stefan Behnel
Adam Funk, 25.11.2011 14:50: I'm converting JSON data to XML using the standard library's json and xml.dom.minidom modules. I get the input this way: input_source = codecs.open(input_file, 'rb', encoding='UTF-8', errors='replace') It doesn't make sense to use codecs.open() with a b mode.

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Travis Parks
On Nov 27, 6:55 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sun, 27 Nov 2011 14:21:01 -0800, Travis Parks wrote: Personally, I find a lot of good things in Python. I thinking tabs are out-of-date. Even the MAKE community wishes that the need for tabs would go away

Re: correct usage of a generator?

2011-11-28 Thread Tim
thanks everyone. I thought blarg.next() looked a little strange--I'm just learning generators now and I'm glad too see that next(blarg) is the way to go. The example really was just a toy or I would use an iterator. I do need the two (well, the several) generators to not be coupled together so

Re: Return of an old friend

2011-11-28 Thread Den
On Nov 25, 2:13 am, Noah Hall enali...@gmail.com wrote: On Fri, Nov 25, 2011 at 5:08 AM, Matt Joiner anacro...@gmail.com wrote: I haven't heard of you before, but feel like I've missed out on something. Do you (or someone else) care to link to some of your more contentious work? Ignore

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Ian Kelly
On Sun, Nov 27, 2011 at 4:55 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: My language combines generators and collection initializers, instead of creating a whole new syntax for comprehensions. [| for i in 0..10: for j in 0.10: yield return i * j |] Are we supposed to

Re: Pragmatics of the standard is() function

2011-11-28 Thread Den
On Nov 26, 3:01 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sat, 26 Nov 2011 22:20:36 +0100, candide wrote: SNIP That is correct. You probably should rarely use `is`. Apart from testing for None, use of `is` should be rare. -- Steven With respect, I disagree with

Re: Does py2app improves speed?

2011-11-28 Thread Alan Meyer
On 11/24/2011 9:27 AM, Dave Angel wrote: ... Several ways to speed up code. 1) use language features to best advantage 2) use 3rd party libraries that do certain things well 3) use best algorithms, subject to #1 and #2 4) have someone else review the code (perhaps on the list, perhaps within

Re: python 2.5 and ast

2011-11-28 Thread Terry Reedy
On 11/28/2011 6:45 AM, Andrea Crotti wrote: I'm happily using the ast module to analyze some code, but my scripts need also to run unfortunately on python 2.5 The _ast was there already, but the ast helpers not yet. Is it ok if I just copy over the source from the ast helpers in my code base

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Neil Cerutti
On 2011-11-28, Ian Kelly ian.g.ke...@gmail.com wrote: I think the implication is that Unit has only one syntax for creating functions, which is lambda-style. In any case, why does Python require a special keyword? def is only used in a statement context, and lambda is only used in an

remove characters before last occurance of .

2011-11-28 Thread plsullivan1
I need for GIS.GIS.Cadastral\GIS.GIS.Citylimit to be Citylimit. The cadastral and citylimit will be different as I readlines from a list. In other words, the above could be GIS.GIS.Restricted\GIS.GIS.Pipeline and I would need Pipeline. s = GIS.GIS.Cadastral\GIS.GIS.Citylimit NeededValue =

Re: Pragmatics of the standard is() function

2011-11-28 Thread Ethan Furman
Den wrote: With respect, I disagree with advice that the use of a language construct should be rare. All constructs should be used *appropriately*. +1 ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Gregory Ewing
Travis Parks wrote: I thinking tabs are out-of-date. Even the MAKE community wishes that the need for tabs would go away The situation with make is a bit different, because it *requires* tabs in certain places -- spaces won't do. Python lets you choose which to use as long as you don't mix

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Gregory Ewing
Neil Cerutti wrote: I've always held with the anti-functional style conspiracy interpretation of Python's lambda expressions. They were added but grudgingingly, made weak on purpose to discourage their use. Seems to me that Python's lambdas are about as powerful as they can be given the

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Alemu mihretu
Hello all, My python runs and crashes after another run. I am getting errors like Microsoft Visual C++ Runtime Library program c:\Python27\pythonw.exe This application has requested the Runtime to terminate it in an usuak way. Please contact the application's support team for more information.

Re: remove characters before last occurance of .

2011-11-28 Thread Ethan Furman
plsulliv...@gmail.com wrote: s = GIS.GIS.Cadastral\GIS.GIS.Citylimit NeededValue = Citylimit NeededValue = s.rsplit('.', 1)[1] ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: remove characters before last occurance of .

2011-11-28 Thread Arnaud Delobelle
On 28 November 2011 20:45, Ethan Furman et...@stoneleaf.us wrote: plsulliv...@gmail.com wrote: s = GIS.GIS.Cadastral\GIS.GIS.Citylimit NeededValue = Citylimit NeededValue = s.rsplit('.', 1)[1] Also: s[s.rfind(.) + 1:] 'Citylimit' s.rpartition(.)[2] 'Citylimit' -- Arnaud --

Re: remove characters before last occurance of .

2011-11-28 Thread plsullivan1
Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Neil Cerutti
On 2011-11-28, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Neil Cerutti wrote: I've always held with the anti-functional style conspiracy interpretation of Python's lambda expressions. They were added but grudgingingly, made weak on purpose to discourage their use. Seems to me that

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Travis Parks
On Nov 28, 2:32 pm, Ian Kelly ian.g.ke...@gmail.com wrote: On Sun, Nov 27, 2011 at 4:55 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: My language combines generators and collection initializers, instead of creating a whole new syntax for comprehensions. [| for i in

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Travis Parks
On Nov 28, 3:40 pm, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Travis Parks wrote: I thinking tabs are out-of-date. Even the MAKE community wishes that the need for tabs would go away The situation with make is a bit different, because it *requires* tabs in certain places -- spaces

Re: Cursor.fetchall

2011-11-28 Thread Jean-Michel Pichavant
Jean-Michel Pichavant wrote: PS : Try to code document in English, it's much better especially when asking for help on this list, mixing spanish and english has few benefits since you may bother both spanish and english ppl :o) Actually it is english mixed with portuguese, sorry if I

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Chris Angelico
On Tue, Nov 29, 2011 at 8:29 AM, Travis Parks jehugalea...@gmail.com wrote: Languages that don't support exceptions as part of their signature lead to capturing generic Exception all throughout code. It is one of those features I wish .NET had. At the same time, with my limited experience with

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Steven D'Aprano
On Mon, 28 Nov 2011 12:32:59 -0700, Ian Kelly wrote: On Sun, Nov 27, 2011 at 4:55 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [...] Lambdas and functions are the same thing in my language, so no need for a special keyword. That does not follow. Lambdas and def functions

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Chris Angelico
On Tue, Nov 29, 2011 at 9:24 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Because the syntax is completely different. One is a statement, and stands alone, the other is an expression. Even putting aside the fact that lambda's body is an expression, and a def's body is a

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Steven D'Aprano
On Mon, 28 Nov 2011 13:29:06 -0800, Travis Parks wrote: Exception handling is one of those subjects few understand and fewer can implement properly in modern code. Languages that don't support exceptions as part of their signature lead to capturing generic Exception all throughout code. It is

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread DevPlayer
On Nov 27, 6:55 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Sun, 27 Nov 2011 14:21:01 -0800, Travis Parks wrote: Personally, I find a lot of good things in Python. I thinking tabs are out-of-date. Even the MAKE community wishes that the need for tabs would go away

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread DevPlayer
I do not understand why the interpreter preprocesses each logical line of source code using something as simple as this: correction: I do not understand why the interpreter - does not- preprocess each logical line of source code using something as simple as this: --

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Chris Angelico
On Tue, Nov 29, 2011 at 11:54 AM, DevPlayer devpla...@gmail.com wrote: To me, I would think the interpreter finding the coder's intended indent wouldn't be that hard. And just make the need for consistant spaces or tabs irrevelent simply by reformatting the indent as expected. Pretty much all

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Travis Parks
On Nov 28, 5:24 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 28 Nov 2011 12:32:59 -0700, Ian Kelly wrote: On Sun, Nov 27, 2011 at 4:55 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: [...] Lambdas and functions are the same thing in my language,

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Chris Angelico
On Tue, Nov 29, 2011 at 1:42 PM, Travis Parks jehugalea...@gmail.com wrote: A good example I have run into is recursion. When a local function calls itself, the name of the function may not be part of scope (non- local). Languages that support tail-end recursion optimization can't optimize. In

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Travis Parks
On Nov 28, 8:49 pm, Chris Angelico ros...@gmail.com wrote: On Tue, Nov 29, 2011 at 11:54 AM, DevPlayer devpla...@gmail.com wrote: To me, I would think the interpreter finding the coder's intended indent wouldn't be that hard. And just make the need for consistant spaces or tabs irrevelent

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Travis Parks
On Nov 28, 5:57 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 28 Nov 2011 13:29:06 -0800, Travis Parks wrote: Exception handling is one of those subjects few understand and fewer can implement properly in modern code. Languages that don't support exceptions as

Re: Does py2app improves speed?

2011-11-28 Thread Dave Angel
On 11/28/2011 03:03 PM, Alan Meyer wrote: On 11/24/2011 9:27 AM, Dave Angel wrote: ... Several ways to speed up code. 1) use language features to best advantage 2) use 3rd party libraries that do certain things well 3) use best algorithms, subject to #1 and #2 4) have someone else review the

Re: python 2.5 and ast

2011-11-28 Thread Dave Angel
On 11/28/2011 03:08 PM, Terry Reedy wrote: On 11/28/2011 6:45 AM, Andrea Crotti wrote: I'm happily using the ast module to analyze some code, but my scripts need also to run unfortunately on python 2.5 The _ast was there already, but the ast helpers not yet. Is it ok if I just copy over the

Re: Pragmatics of the standard is() function

2011-11-28 Thread alex23
On Nov 29, 5:22 am, Den patents...@gmail.com wrote: On Nov 26, 3:01 pm, Steven D'Aprano steve That is correct. You probably should rarely use `is`. Apart from testing for None, use of `is` should be rare. With respect, I disagree with advice that the use of a language construct should be

Re: Using the Python Interpreter as a Reference

2011-11-28 Thread Ian Kelly
On Mon, Nov 28, 2011 at 7:42 PM, Travis Parks jehugalea...@gmail.com wrote: I find that interesting. I also find it interesting that the common functional methods (all, any, map, filter) are basically built into Python core language. That is unusual for most imperative programming languages

[issue2286] Stack overflow exception caused by test_marshal on Windows x64

2011-11-28 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: Thanks Terry, I am aware of that. We are working on making Python work with VS2010 in issue 13210. I will check with the py3k branch soon and report here if the same problem applies. --

[issue13481] Use an accurate clock in timeit

2011-11-28 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I think this should be rejected. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13481 ___

[issue13492] ./configure --with-system-ffi=LIBFFI-PATH

2011-11-28 Thread Michael Kraus
New submission from Michael Kraus krausmic...@gmail.com: It would be very helpful to have the ability to specify a LIBFFI-PATH during Python configuration via ./configure --with-system-ffi=LIBFFI-PATH We are using the Intel compiler to build Python, NumPy, SciPy, and Cython on a SuSE Linux

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2011-11-28 Thread Yevgen Yampolskiy
Yevgen Yampolskiy genij.m...@gmail.com added the comment: Marian, I have no doubts that the patch cures THIS issue. The problem is that it cures the wrong thing. It is _reconstruct function that needs to be fixed (somebody changed order of 'if' statements between 2.6 and 2.7 releases)

[issue13493] using python embed on AIX 6.1,Modules import error!

2011-11-28 Thread python_hu
New submission from python_hu nari...@163.com: Using python api embed on AIX 6.1,Modules import error,need help! I have compile Python2.5.5 on Aix 6.1 using condigure: ./configure --with-gcc=xlc_r -q64 --with-cxx=xlC_r -q64 --disable-ipv6 AR=ar -X64 when i run Python,and import math

[issue444582] Finding programs in PATH, adding shutil.which

2011-11-28 Thread Weeble
Weeble clockworksa...@gmail.com added the comment: I'm not sure what rules are used by Windows to process the PATH string, but I think they are similar to the rules used to parse the command-line into argv in a C/C++ program: http://msdn.microsoft.com/en-us/library/17w5ykft.aspx I have tested

[issue13493] using python embed on AIX 6.1,Modules import error!

2011-11-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It may be related to issue941346. Can you try with a newer version of Python? 2.5 is not maintained anymore. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org

[issue13473] Add tests for files byte-compiled by distutils[2]

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: See http://bugs.python.org/issue12119#msg146943 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13473 ___

[issue13400] packaging: build command should have options to control byte-compilation

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I suggest to not use pyc and pyo in options, because .pyc and .pyo filename extensions are specific to a subset of Python implementations. Jython uses $py.class filename extension (module$py.class for module.py). But these are extension

[issue13486] msvc9compiler.py doesn't properly generate manifest files.

2011-11-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +mhammond ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13486 ___ ___ Python-bugs-list mailing

[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I have attached an updated patch with a unit test. LGTM. Also, this is not an issue for Python 2.7. The 2.7 implementation assumes any directories mentioned in the path already exist. Cool. The test can still be committed in that branch too.

[issue13494] 'cast' any value to a Boolean?

2011-11-28 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: Docs nit: at http://docs.python.org/dev/library/stdtypes.html#boolean-values we have The built-in function bool() can be used to cast any value to a Boolean ... It's a little unusual to talk about casting in Python. Any objections to

[issue13494] 'cast' any value to a Boolean?

2011-11-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: +1 -- nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13494 ___

[issue12307] Inconsistent formatting of section titles in PEP 0

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: 1b7fed04108c should help make figure out that it needs to rebuild. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12307 ___

[issue12307] Inconsistent formatting of section titles in PEP 0

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Rebuilt! (Another glitch: plain text PEPs really should have an HTML title. If you have time.. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12307

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Is subprocess affected by PYTHONIOENCODING? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6135 ___

[issue10318] make altinstall installs many files with incorrect shebangs

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Can I removed the shebangs in the 3.3 stdlib or do I need to go through with the PEP 8 patch on python-dev first? -- versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue13491] Fixes for sqlite3 doc

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: It is very helpful that you review the docs. Some obvious fixes were made when moving to Python 3 (print, etc.) but apparently the examples were not run. Sphinx can let us run the code blocks in reST files as doctests, but it is currently not

[issue13487] inspect.getmodule fails when module imports change sys.modules

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Maybe it can be caused by an installation happening during the loop. I agree with Erik’s reading of the comment and patch, and don’t think a test is needed. -- nosy: +eric.araujo stage: - patch review type: - behavior versions:

[issue13493] Import error with embedded python on AIX 6.1

2011-11-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- components: -None stage: - test needed title: using python embed on AIX 6.1,Modules import error! - Import error with embedded python on AIX 6.1 type: crash - behavior versions: +Python 2.7 -Python 2.6

[issue13210] Support Visual Studio 2010

2011-11-28 Thread Sébastien Sablé
Sébastien Sablé sa...@users.sourceforge.net added the comment: OK Brian, I checked your clone and I will keep an eye on it. I have done almost the same thing for the moment. My patch queue includes some additional corrections for a few more bugs that prevented me from completely running the

[issue13492] ./configure --with-system-ffi=LIBFFI-PATH

2011-11-28 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13492 ___ ___

[issue13494] 'cast' any value to a Boolean?

2011-11-28 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: +1 -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13494 ___ ___

[issue13210] Support Visual Studio 2010

2011-11-28 Thread Brian Curtin
Brian Curtin br...@python.org added the comment: If you want to clone from that repo, use the vs2010 branch. hg clone http://hg.python.org/sandbox/vs2010port/ hg up vs2010 From there, you can post patches here that I can integrate for you. -- assignee: - brian.curtin

[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 661fb211f220 by Meador Inge in branch '3.2': Issue #12618: py_compile cannot create files in current directory http://hg.python.org/cpython/rev/661fb211f220 New changeset e3647275f468 by Meador Inge in branch

[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Cool. The test can still be committed in that branch too. The regression test for this issue was already committed for 2.7 in bcc7bf3963cc as a part of creating the unit test baseline. I just committed the bug fix to 3.2 and default. Thanks

[issue12618] py_compile cannot create files in current directory

2011-11-28 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12618 ___

[issue13210] Support Visual Studio 2010

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: A tip to make Mercurial download only a subset of all the changesets in the repo: hg clone URI -r branch or hg clone URI#branch (The difference is that in the second form, URI#branch will be recorded in the .hg/hgrc file and subsequent

[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2011-11-28 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Is subprocess affected by PYTHONIOENCODING? Yes, as any Python process. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6135

[issue6135] subprocess seems to use local encoding and give no choice

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: So the users can control the encoding, and this is a doc bug. -- title: subprocess seems to use local 8-bit encoding and gives no choice - subprocess seems to use local encoding and give no choice ___

[issue6135] subprocess seems to use local encoding and give no choice

2011-11-28 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: If you decide this is only a doc bug, please see also related issue 12832. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6135

[issue12832] The documentation for the print function should explain/point to how to control the sys.stdout encoding

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Thanks for the patch. It was reviewed on our code review tool; if you did not get an email (there are glitches), follow the link on the right of your patch in the list of files. -- nosy: +eric.araujo

[issue6135] subprocess seems to use local encoding and give no choice

2011-11-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So the users can control the encoding, and this is a doc bug. Not really. People can control the encoding in the child process (and only if it's a Python 3 process of course). They can't control the encoding in the parent's subprocess pipes and

[issue13400] packaging: build command should have options to control byte-compilation

2011-11-28 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Jython's *$py.class files are byte-compiled modules, not extension modules. There should be a way to disable generation of *.pyo files on command line even if setup.cfg enables it. IMHO it would make more sense if

[issue13400] packaging: build command should have options to control byte-compilation

2011-11-28 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Jython's *$py.class files are byte-compiled modules, not extension modules. Thanks for the data point. Agreed distutils[2] should not say “pyc” and “pyo” then. There should be a way to disable generation of *.pyo files on command line even

  1   2   >