HTSQL 2.1-RC1 : A Query Language for the Accidental Programmer

2011-06-23 Thread Clark C. Evans
We'd like to announce the release candidate for HTSQL 2.1, a high-level query language and web service gateway for relational databases. HTSQL is specifically designed for analytical inquiries and targeted to data analysts and web developers. HTSQL is implemented as a WSGI component, works

PySide 1.0.4 - The winter is coming: Python for Qt released!

2011-06-23 Thread Renato Araujo Oliveira Filho
PySide 1.0.4 - The winter is coming: Python for Qt released! === The PySide team is proud to announce our monthly release of PySide project. Major changes == PySide now is 100% compatible with squish[1] About PySide

ANN: ETS 4.0 released

2011-06-23 Thread Ilan Schnell
Hello, I am happy to announce the release of ETS 4.0. This is the first major release of the Enthought Tool Suite in almost three years. This release removes the 'enthought' namespace from all projects. For example: from enthought.traits.api import HasTraits is now simply:: from

Re: How can I speed up a script that iterates over a large range (600 billion)?

2011-06-23 Thread Tim Roberts
Mel mwil...@the-wire.com wrote: It certainly can be done faster. I ran it against the factor finder that I wrote, and it popped up the answer mwilson@tecumseth:~$ bin/factors.py 600851475143 71 839 1471 ... before I could glance at my watch. factors.py works, as does yours, by testing for

Python 2.7 and cmd on Windows 7 64 (files lost)

2011-06-23 Thread Michel Claveau - MVP
Hi! (sorry for my bad english...) On Win 7 64 bits: Command-Line CD \Python27 dir C:\Windows\System32\SoundRecorder.exe:== OK Python.exe import os os.system(dir C:\\Windows\\System32\\SoundRecorder.exe) == Do not found the file !!! and os.system(cmd /k) then dir

Re: python 3 constant

2011-06-23 Thread Waldek M.
Dnia Wed, 22 Jun 2011 22:17:49 +0100, Noah Hall napisał(a): On Wed, Jun 22, 2011 at 7:54 PM, sidRo slacky2...@gmail.com wrote: How to declare a constant in python 3? There aren't true constants in Python, but instead we use a standard defined by PEP 8, which states constants are in all

Need help about for loop in python 3.2

2011-06-23 Thread kkiranmca
Hi i am new for this version and could please help me . -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help about for loop in python 3.2

2011-06-23 Thread Chris Rebert
On Wed, Jun 22, 2011 at 11:50 PM, kkiranmca kkiran...@gmail.com wrote: Hi i am new for this version and could please help me . You didn't pose an actual question... Cheers, Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: doing cross platform file work

2011-06-23 Thread Gurpreet Singh
File system paths are a thing you need to take care moving from one OS to other. Perhaps simplest way to avoid this in windows is install cygwin and enjoy. Keep your accessible files in directories /var or /home which are common (but not in something like /cygdrive/c - Cygwin equilvalent of C:) -

Re: python 3 constant

2011-06-23 Thread Ben Finney
Waldek M. wm@localhost.localdomain writes: Still, I'd reallly like to have constants as a built-in... If you mean creating a binding which can't be re-bound: −1. The ability to re-bind any attribute, even ones which the author thought should be constant, makes writing unit tests much easier. I

Re: Need help about for loop in python 3.2

2011-06-23 Thread Ben Finney
kkiranmca kkiran...@gmail.com writes: Hi i am new for this version and could please help me . Welcome! Don't ask whether you can ask. Just ask. URL:http://catb.org/~esr/faqs/smart-questions.html -- \ “I put contact lenses in my dog's eyes. They had little | `\ pictures of

Re: Python 2.7 and cmd on Windows 7 64 (files lost)

2011-06-23 Thread Thorsten Kampe
* Michel Claveau - MVP (Thu, 23 Jun 2011 08:33:20 +0200) On Win 7 64 bits: Command-Line CD \Python27 dir C:\Windows\System32\SoundRecorder.exe:== OK Python.exe import os os.system(dir C:\\Windows\\System32\\SoundRecorder.exe) == Do not found the file !!! and

Re: Python 2.7 and cmd on Windows 7 64 (files lost)

2011-06-23 Thread Tim Golden
On 23/06/2011 07:33, Michel Claveau - MVP wrote: Hi! (sorry for my bad english...) On Win 7 64 bits: Command-Line CD \Python27 dir C:\Windows\System32\SoundRecorder.exe:== OK Python.exe import os os.system(dir C:\\Windows\\System32\\SoundRecorder.exe) == Do not found the

Re: User Authentication

2011-06-23 Thread Tim Golden
On 23/06/2011 06:02, Anurag wrote: On Jun 22, 7:01 pm, Adam Tauno Williamsawill...@whitemice.org wrote: On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote: Hi All, I am working on application which needs to do a authentication against LDAP, if LDAP not installed then local system account

Re: Python 2.7 and cmd on Windows 7 64 (files lost)

2011-06-23 Thread Thorsten Kampe
* Tim Golden (Thu, 23 Jun 2011 08:31:26 +0100) Certain commands, including dir and copy are not executables in their own right, but merely subcommands of cmd.exe. Right, internal commands. You've got two options in Python: os.system (rcmd /c dir c:\windows) os.system automatically

Re: Python 2.7 and cmd on Windows 7 64 (files lost)

2011-06-23 Thread Tim Golden
On 23/06/2011 09:08, Thorsten Kampe wrote: * Tim Golden (Thu, 23 Jun 2011 08:31:26 +0100) Certain commands, including dir and copy are not executables in their own right, but merely subcommands of cmd.exe. Right, internal commands. You've got two options in Python: os.system (rcmd /c

Re: those darn exceptions

2011-06-23 Thread Gregory Ewing
Chris Torek wrote: Oops! It turns out that os.kill() can raise OverflowError (at least in this version of Python, not sure what Python 3.x does). Seems to me that if this happens it indicates a bug in your code. It only makes sense to pass kill() something that you know to be the pid of an

Re: those darn exceptions

2011-06-23 Thread Steven D'Aprano
On Thu, 23 Jun 2011 06:16 pm Gregory Ewing wrote: Generally I think some people worry far too much about anticipating and catching exceptions. Don't do that, just let them happen. If you come across a specific exception that it makes sense to catch, then catch just that particular one. Let

Re: Python 2.7 and cmd on Windows 7 64 (files lost)

2011-06-23 Thread Michel Claveau - MVP
Re ! This is because 32-bit processes (Python, 32-bit cmd) cannot see the 64-bit DLLs in System32. Thanks. You are right... but it is not enought. This command: echo %PROCESSOR_ARCHITECTURE% give the statut: 32: x86 64: AMD64 and DIR C:\Windows\System32\SoundRecorder.exe is OK

help me in knowing the syntax for loop and switch statements in python 3.2

2011-06-23 Thread mahantesh varavattekar
Hi, i am new to python please help to let me know the syntax for python 3.2. with examples. and how can i use these things for ranges -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I speed up a script that iterates over a large range (600 billion)?

2011-06-23 Thread Slaunger
As a general note concerning the use of Python on Project Euler, and the one minute guideline. For problems 1-100, each problem is easily solved in less than 1 minute processing time *if* the algorithms and math is done right and with thought. My project Euler scripts solves the first 100

Re: writable iterators?

2011-06-23 Thread Thomas 'PointedEars' Lahn
[Sorry for over-quoting, I am not sure how to trim this properly] Steven D'Aprano wrote: On Thu, 23 Jun 2011 09:30 am Thomas 'PointedEars' Lahn wrote: Mel wrote: Steven D'Aprano wrote: I *guess* that what you mean by writable iterators is that rebinding e should change seq in place, i.e.

Re: help me in knowing the syntax for loop and switch statements in python 3.2

2011-06-23 Thread Laurent Claessens
Le 23/06/2011 11:48, mahantesh varavattekar a écrit : Hi, i am new to python please help to let me know the syntax for python 3.2. with examples. and how can i use these things for ranges http://lmgtfy.com/?q=python+syntax+range+example Laurent --

Re: help me in knowing the syntax for loop and switch statements in python 3.2

2011-06-23 Thread Ben Finney
mahantesh varavattekar mvaravatte...@gmail.com writes: i am new to python please help to let me know the syntax for python 3.2. with examples. Welcome! Please work your way through the Python tutorial from the beginning URL:http://docs.python.org/release/3.2/tutorial/. Run each example,

Re: python 3 constant

2011-06-23 Thread Waldek M.
Dnia Thu, 23 Jun 2011 17:22:37 +1000, Ben Finney napisał(a): If you mean creating a binding which can't be re-bound: −1. Perhaps. Or perhaps that could be done in some other fashion; I admit that I usually stick to more strict languages and while Python's flexibility is great... I'm really

Re: python 3 constant

2011-06-23 Thread Ben Finney
Waldek M. wm@localhost.localdomain writes: Dnia Thu, 23 Jun 2011 17:22:37 +1000, Ben Finney napisał(a): The ability to re-bind any attribute, even ones which the author thought should be constant, makes writing unit tests much easier. I don't see that putative benefits of constant

PyPad 2.7.1 Update 4 (Python on iPad and iPhone)

2011-06-23 Thread Jon Dowdall
Hi All, I'm pleased to announce that PyPad (Python environment for iOS) 2.7.1 Update 4 is now available in the iTunes App Store. New in this version is the ability to create custom modules. Modules can be independent or can include other user modules to build larger frame works. Plans for

LDAP: How get all users belongs to a group.

2011-06-23 Thread sajuptpm
Hi, How get all users belongs to a group using python ldap module. -- http://mail.python.org/mailman/listinfo/python-list

Project-wide variable...

2011-06-23 Thread Gnarlodious
Is there a way to declare a project-wide variable and use that in all downstream modules? -- Gnarlir -- http://mail.python.org/mailman/listinfo/python-list

Re: Project-wide variable...

2011-06-23 Thread Calvin Spealman
No, but you can define a name in one module and import that into others. On Thu, Jun 23, 2011 at 9:41 AM, Gnarlodious gnarlodi...@gmail.com wrote: Is there a way to declare a project-wide variable and use that in all downstream modules? -- Gnarlir --

Re: Project-wide variable...

2011-06-23 Thread Noah Hall
On Thu, Jun 23, 2011 at 2:41 PM, Gnarlodious gnarlodi...@gmail.com wrote: Is there a way to declare a project-wide variable and use that in all downstream modules? Well, the standard way you should do it is to use import to import a certain variable - for example - a.py - x = 3 from a

Re: LDAP: How get all users belongs to a group.

2011-06-23 Thread Ken Watford
On Thu, Jun 23, 2011 at 9:14 AM, sajuptpm sajup...@gmail.com wrote: Hi, How get all users belongs to a group using python ldap module. Depends on what you mean by users and group, what information you already have, and what information you want to get. I'll assume you mean posix accounts and

Re: Project-wide variable...

2011-06-23 Thread Gnarlodious
On Jun 23, 7:59 am, Noah Hall wrote: from a import x I'm doing that: import Module.Data as Data However I end up doing it in every submodule, so it seems a little redundant. I wish I could load the variable in the parent program and have it be available in all submodules. Am I missing

Re: Project-wide variable...

2011-06-23 Thread Peter Otten
Gnarlodious wrote: On Jun 23, 7:59 am, Noah Hall wrote: from a import x I'm doing that: import Module.Data as Data from Module import Data There, you saved three more characters . However I end up doing it in every submodule, so it seems a little redundant. I wish I could load the

Re: Project-wide variable...

2011-06-23 Thread Noah Hall
On Thu, Jun 23, 2011 at 3:09 PM, Gnarlodious gnarlodi...@gmail.com wrote: On Jun 23, 7:59 am, Noah Hall wrote: from a import x I'm doing that: import Module.Data as Data Well, that's not quite the same. You're using Module.Data as Data - I guess you've done this because you've realised that

Re: writable iterators?

2011-06-23 Thread Ian Kelly
On Wed, Jun 22, 2011 at 3:54 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Fortunately, that's not how it works, and far from being a limitation, it would be *disastrous* if iterables worked that way. I can't imagine how many bugs would occur from people reassigning to the

Re: User Authentication

2011-06-23 Thread Anurag
My application is a web based application for both windows and Linux. The web part is developed using Django. So if Python does not support it then any support for local sytem account authentication in Django? I am looking for a common library for both Linux and Windows. Any help will be Gr8

Re: Project-wide variable...

2011-06-23 Thread bruno.desthuilli...@gmail.com
On Jun 23, 4:42 pm, Peter Otten __pete...@web.de wrote: (snip) However I end up doing it in every submodule, so it seems a little redundant. I wish I could load the variable in the parent program and have it be available in all submodules. Am I missing something? You can modify the builtin

Re: python 3 constant

2011-06-23 Thread Chris Angelico
On Thu, Jun 23, 2011 at 9:58 PM, Waldek M. wm@localhost.localdomain wrote: Of course, it is just my personal opinion. It might be not pythonic, I may be wrong, yet - concept of constants is not something new and if other languages, like C/C++/Java/Perl/ (bash even) have them, I can't see the

Re: writable iterators?

2011-06-23 Thread Neal Becker
Ian Kelly wrote: On Wed, Jun 22, 2011 at 3:54 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Fortunately, that's not how it works, and far from being a limitation, it would be *disastrous* if iterables worked that way. I can't imagine how many bugs would occur from people

Re: User Authentication

2011-06-23 Thread Tim Golden
On 23/06/2011 16:07, Anurag wrote: My application is a web based application for both windows and Linux. The web part is developed using Django. So if Python does not support it then any support for local sytem account authentication in Django? I am looking for a common library for both Linux

search through this list's email archives

2011-06-23 Thread Cathy James
Dear All, I looked through this forum's archives, but I can't find a way to search for a topic through the archive. Am I missing something? Thanks as always. CJ. -- http://mail.python.org/mailman/listinfo/python-list

Re: search through this list's email archives

2011-06-23 Thread Hans Mulder
On 23/06/11 18:11:32, Cathy James wrote: I looked through this forum's archives, but I can't find a way to search for a topic through the archive. Am I missing something? One way to search the past contributions to this forum is to go to http://groups.google.com/advanced_search and specify

[no subject]

2011-06-23 Thread MURTAZA HUSSAIN
murtaza.ned...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: search through this list's email archives

2011-06-23 Thread Philip Semanchuk
On Jun 23, 2011, at 12:11 PM, Cathy James wrote: Dear All, I looked through this forum's archives, but I can't find a way to search for a topic through the archive. Am I missing something? http://www.google.com/search?q=site%3Amail.python.org%2Fpipermail%2Fpython-list%2F+++banana --

performance critical Python features

2011-06-23 Thread Eric Snow
I was thinking about the different features of Python that have an impact on performance. Here are the obvious ones I could think of: Features most impactful on performance: - function calls - loops Features least impactful on performance: - imports - function definitions - class definitions

Re: Project-wide variable...

2011-06-23 Thread Guillaume Martel-Genest
On Jun 23, 9:41 am, Gnarlodious gnarlodi...@gmail.com wrote: Is there a way to declare a project-wide variable and use that in all downstream modules? -- Gnarlir What about using an environment variable? -- http://mail.python.org/mailman/listinfo/python-list

Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

2011-06-23 Thread mando
I've installed MacPython 2.6 under mac os x 2.6 and the IDLE doesn't work. I post error log. Suggestions? Thanks a lot. Luca 23/06/11 19.18.01 Apple80211 framework[211] ACInterfaceGetPower called with NULL interface 23/06/11 19.18.01 [0x0-0x1f61f6].org.python.IDLE[2470] Traceback

Re: Project-wide variable...

2011-06-23 Thread Noah Hall
On Thu, Jun 23, 2011 at 6:18 PM, Guillaume Martel-Genest guillaum...@gmail.com wrote: On Jun 23, 9:41 am, Gnarlodious gnarlodi...@gmail.com wrote: Is there a way to declare a project-wide variable and use that in all downstream modules? What about using an environment variable? Yes, that's

Re: Project-wide variable...

2011-06-23 Thread Gnarlodious
On Jun 23, 8:42 am, Peter Otten wrote: from Module import Data There, you saved three more characters . OK I get it, LOL. But I don't think it's a good idea. Remember that explicit is better than implicit. Thanks, now I know what that means. -- Gnarlie --

Re: Project-wide variable...

2011-06-23 Thread Gnarlodious
On Jun 23, 11:42 am, Noah Hall wrote: What about using an environment variable? Yes, that's fine, but only if the data is suitable for it. In this case, the variable is a namespace containing the property of a folder full of plist files. I access any dictionary item anywhere in my webapp

Re: Project-wide variable...

2011-06-23 Thread Terry Reedy
On 6/23/2011 10:09 AM, Gnarlodious wrote: On Jun 23, 7:59 am, Noah Hall wrote: from a import x I'm doing that: import Module.Data as Data However I end up doing it in every submodule, so it seems a little redundant. I wish I could load the variable in the parent program and have it be

Re: writable iterators?

2011-06-23 Thread Chris Torek
(I apologize for the length of this article -- if I had more time, I could write something shorter...) In article mailman.296.1308770918.1164.python-l...@python.org Neal Becker ndbeck...@gmail.com wrote: AFAICT, the python iterator concept only supports readable iterators, not write. Is this

Re: Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

2011-06-23 Thread python
Benjamin, You'll have to install Tcl yourself. The 2.6 binaries were compiled against a newer version than Apple ships. Does this requirement apply to Python 2.7 or Python 3.2 for the Mac or is this requirement Python 2.6 specific? Thank you, Malcolm --

Re: Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

2011-06-23 Thread Benjamin Kaplan
On Jun 23, 2011 10:42 AM, mando mandol...@gmail.com wrote: I've installed MacPython 2.6 under mac os x 2.6 and the IDLE doesn't work. I post error log. Suggestions? Thanks a lot. Luca You'll have to install Tcl yourself. The 2.6 binaries were compiled against a newer version than Apple

Re: performance critical Python features

2011-06-23 Thread Chris Angelico
On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow ericsnowcurren...@gmail.com wrote: So, which are the other pieces of Python that really need the heavy optimization and which are those that don't?  Thanks. Things that are executed once (imports, class/func definitions) and things that primarily wait

Re: those darn exceptions

2011-06-23 Thread Chris Torek
In article 96gb36fc6...@mid.individual.net, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Torek wrote: Oops! It turns out that os.kill() can raise OverflowError (at least in this version of Python, not sure what Python 3.x does). Seems to me that if this happens it indicates a bug

Re: python 3 constant

2011-06-23 Thread Waldek M.
Dnia Fri, 24 Jun 2011 01:29:38 +1000, Chris Angelico napisał(a): You can have them in Python. Just run your code through cpp (the C preprocessor) first. Voila! It's handy for other things too. Don't like Python's lack of then and end if? [...] Yup, got the sarcasm, that's for sure. But your

How do you print a string after it's been searched for an RE?

2011-06-23 Thread John Salerno
After I've run the re.search function on a string and no match was found, how can I access that string? When I try to print it directly, it's an empty string, I assume because it has been consumed. How do I prevent this? It seems to work fine for this 2.x code: import urllib.request import re

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread Ian Kelly
On Thu, Jun 23, 2011 at 1:58 PM, John Salerno johnj...@gmail.com wrote: After I've run the re.search function on a string and no match was found, how can I access that string? When I try to print it directly, it's an empty string, I assume because it has been consumed. How do I prevent this?

Re: Mac OS X 10.6.6 and MacPyhton 2.6 idle doesn't work

2011-06-23 Thread Ned Deily
In article 1308852410.2257.1466520...@webmail.messagingengine.com, pyt...@bdurham.com wrote: You'll have to install Tcl yourself. The 2.6 binaries were compiled against a newer version than Apple ships. Does this requirement apply to Python 2.7 or Python 3.2 for the Mac or is this

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread John Salerno
On Jun 23, 3:47 pm, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Jun 23, 2011 at 1:58 PM, John Salerno johnj...@gmail.com wrote: After I've run the re.search function on a string and no match was found, how can I access that string? When I try to print it directly, it's an empty string, I

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread Thomas L. Shinnick
There is also print(match_obj.string) which gives you a copy of the string searched. See end of section 6.2.5. Match Objects At 02:58 PM 6/23/2011, John Salerno wrote: After I've run the re.search function on a string and no match was found, how can I access that string? When I try to

Re: python 3 constant

2011-06-23 Thread Chris Angelico
2011/6/24 Waldek M. wm@localhost.localdomain: Dnia Fri, 24 Jun 2011 01:29:38 +1000, Chris Angelico napisał(a): You can have them in Python. Just run your code through cpp (the C preprocessor) first. Voila! It's handy for other things too. Don't like Python's lack of then and end if? [...]

GOZERBOT 0.9.2 RELEASED

2011-06-23 Thread Bart Thate
Hello new world ! i’m glad to announce the release of version GOZERBOT 0.9.2, a bot that has been declared dead but has arrived from the pits of hell to serve our people here well ;] Discovered that SQLAlchemy has been fixed in such a way that it was easy to resurrect the thing, and release a new

Re: How do you print a string after it's been searched for an RE?

2011-06-23 Thread John Salerno
On Jun 23, 4:47 pm, Thomas L. Shinnick tshin...@prismnet.com wrote: There is also        print(match_obj.string) which gives you a copy of the string searched.  See end of section 6.2.5. Match Objects I tried that, but the only time I wanted the string printed was when there *wasn't* a match,

Re: writable iterators?

2011-06-23 Thread Chris Torek
In article iu00fs1...@news3.newsguy.com I wrote, in part: Another possible syntax: for item in container with key: which translates roughly to bind both key and item to the value for lists, but bind key to the key and value for the value for dictionary-ish items. Then ... the OP would

Re: doing cross platform file work

2011-06-23 Thread Rhodri James
On Thu, 23 Jun 2011 08:13:18 +0100, Gurpreet Singh karamheenkuriy...@gmail.com wrote: ...Cygwin spam. Twice. Please don't mail to both comp.lang.python and python-list. They are gatewayed to each other, so we see your messages twice, which makes us roughly half as likely to respond to

Re: doing cross platform file work

2011-06-23 Thread Ryan Kelly
On Wed, 2011-06-22 at 10:44 -0700, Tim Hanson wrote: Thanks for your responses to my student question about using OS paths in Python. For the more general case, I am a Linux user interested in making my scripts platform neutral, which would include Linux, Unix (including Mac), and

compile 32bit application in python for use on 64bit win machine

2011-06-23 Thread miamia
Hello, I am using 32bit win xp pro and compiling my python scripts as exe with py2exe. Everything works ok on 32bit windows platforms. But how can I compile my program for use on 64bit Windows? On 64bit windows this error occures in event log: Activation context generation failed for C:\Program

Re: compile 32bit application in python for use on 64bit win machine

2011-06-23 Thread Andrew Berg
On 2011.06.23 06:24 PM, miamia wrote: Hello, I am using 32bit win xp pro and compiling my python scripts as exe with py2exe. Everything works ok on 32bit windows platforms. But how can I compile my program for use on 64bit Windows? On 64bit windows this error occures in event log:

Re: performance critical Python features

2011-06-23 Thread Steven D'Aprano
On Fri, 24 Jun 2011 04:00:17 +1000, Chris Angelico wrote: On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow ericsnowcurren...@gmail.com wrote: So, which are the other pieces of Python that really need the heavy optimization and which are those that don't?  Thanks. Things that are executed once

Re: writable iterators?

2011-06-23 Thread Neal Becker
Chris Torek wrote: In article iu00fs1...@news3.newsguy.com I wrote, in part: Another possible syntax: for item in container with key: which translates roughly to bind both key and item to the value for lists, but bind key to the key and value for the value for dictionary-ish items. Then

Re: Project-wide variable...

2011-06-23 Thread Gnarlodious
On Jun 23, 12:10 pm, Terry Reedy wrote: from test import ftest,itest def test_main(): if __name__ == '__main__':      test_main() I don't understand this. Can you explain, or refer me to some documentation? -- Gnarlie http://Gnarlodious.com --

Re: performance critical Python features

2011-06-23 Thread Chris Angelico
On Fri, Jun 24, 2011 at 10:07 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Fri, 24 Jun 2011 04:00:17 +1000, Chris Angelico wrote: On Fri, Jun 24, 2011 at 2:58 AM, Eric Snow ericsnowcurren...@gmail.com wrote: So, which are the other pieces of Python that really need the

Re: writable iterators?

2011-06-23 Thread Dan Stromberg
On Wed, Jun 22, 2011 at 12:28 PM, Neal Becker ndbeck...@gmail.com wrote: AFAICT, the python iterator concept only supports readable iterators, not write. Is this true? for example: for e in sequence: do something that reads e e = blah # will do nothing I believe this is not a

Re: Project-wide variable...

2011-06-23 Thread Steven D'Aprano
On Thu, 23 Jun 2011 19:01:59 -0700, Gnarlodious wrote: On Jun 23, 12:10 pm, Terry Reedy wrote: from test import ftest,itest def test_main(): if __name__ == '__main__':      test_main() I don't understand this. Can you explain, or refer me to some documentation? What part don't you

Re: python 3 constant

2011-06-23 Thread alex23
Waldek M. w...@localhost.localdomain wrote: But your point was...? That it's easier for you to find ways to achieve what you want than it is require Python to change to accommodate your need. -- http://mail.python.org/mailman/listinfo/python-list

Re: Project-wide variable...

2011-06-23 Thread Gnarlodious
Let me restate my question. Say I have a script Executable.py that calls all other scripts and controls them: #!/usr/local/bin/python from Module import Data import ModuleTest ModuleTest.py has this: print(Data.Plist.Structure) Running Executable.py gives me this: NameError: name 'Data' is not

Re: Project-wide variable...

2011-06-23 Thread Gnarlodious
Idea: It occurs to me that my application class inherits object. Can I set that to inherit an object that already includes data? So every subsequent class would start off with data loaded (except for class Data). Seems like it should already be invented. -- Gnarlie --

Re: Project-wide variable...

2011-06-23 Thread alex23
On Jun 24, 2:01 pm, Gnarlodious gnarlodi...@gmail.com wrote: Seems like it should already be invented. If you're finding you're importing the same data into every single module, then you're doing something wrong. Creating dependencies across modules like you're wanting is a recipe for suffering.

Re: Using __abstractmethod__ with non-methods

2011-06-23 Thread Eric Snow
Just a follow up on the longer post I made [1]: Is it bad to set __abstractmethod__ on non-functions in order to trigger the ABC abstractness checks? If not, are __isabstractmethod__ on objects and __abstractmethods__ on classes misleading names? Like I said before, I don't mean to imply that

Interpreting Left to right?

2011-06-23 Thread Chetan Harjani
x=y=some string And we know that python interprets from left to right. so why it doesnt raise a name error here saying name 'y' is not defined? another example: (1,2) + 3, here, python raises a TypeError can only concatenate tuple(not int) to tuple but we know (3,) is a tuple as seen by

Re: Interpreting Left to right?

2011-06-23 Thread Chris Angelico
On Fri, Jun 24, 2011 at 2:32 PM, Chetan Harjani chetan.harj...@gmail.com wrote: x=y=some string And we know that python interprets from left to right. so why it doesnt raise a name error here saying name 'y' is not defined? In most languages, the answer is that the = operator associates right

[issue10206] python program starting with unmatched quote spews spaces to stdout

2011-06-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: I'm unable to reproduce this. I checked out the commit 65614:18989ad44636 (corresponding to r85814, right?), built and ran python -c ', but didn't get a space flood on my face. Just a normal SyntaxError. -- nosy: +petri.lehtinen

[issue10206] python program starting with unmatched quote spews spaces to stdout

2011-06-23 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I remember that I could reproduce it at the time. The issue was indeed fixed in r85904. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10206

[issue10206] python program starting with unmatched quote spews spaces to stdout

2011-06-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: By checking out the parent of r85904 I now can reproduce this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10206 ___

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2011-06-23 Thread Chris Withers
Chris Withers ch...@simplistix.co.uk added the comment: Hmm, I'd argue it's a bug: File /usr/lib64/python2.5/urllib2.py, line 972, in get_algorithm_impls return H, KD UnboundLocalError: local variable 'H' referenced before assignment ...does not say anything like: The digest

[issue12390] urllib.parse.urlencode encoding lists as strings

2011-06-23 Thread Joesph
Joesph someone...@gmail.com added the comment: Hrm, yes. 'Tis what I get for working while sick. -- resolution: invalid - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12390 ___

[issue12390] urllib.parse.urlencode encoding lists as strings

2011-06-23 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Joseph, resolution applies for the bug not the process. tc. :) -- resolution: accepted - invalid ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12390

[issue9921] os.path.join('x','') behavior

2011-06-23 Thread Brian Brazil
Brian Brazil brian.bra...@gmail.com added the comment: David's change sounds good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9921 ___

[issue10206] python program starting with unmatched quote spews spaces to stdout

2011-06-23 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Attached a test case. The patch is against the current default tip. -- Added file: http://bugs.python.org/file22427/issues10206_test.patch ___ Python tracker rep...@bugs.python.org

[issue12391] packaging install fails to clean up temp files

2011-06-23 Thread Vinay Sajip
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: There are a number of places in packaging.install where temporary directories are created, but never cleaned up: 1. In _move_files, if no destination path is passed in, one is created using mkdtemp(), but it's not clear where this would

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-06-23 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12386 ___ ___ Python-bugs-list

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-06-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: All Python 3.x buildbots are green (except FreeBSD 7.2, but it's not related to this issue). Let close this issue. -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue11223] interruption of locks by signals not guaranteed when locks are implemented using POSIX condition variables; add sys.thread_info

2011-06-23 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 07655b3dee4f by Victor Stinner in branch '3.2': Issue #11223: skip test_lock_acquire_interruption() on FreeBSD6 http://hg.python.org/cpython/rev/07655b3dee4f -- ___ Python tracker

[issue11223] interruption of locks by signals not guaranteed when locks are implemented using POSIX condition variables; add sys.thread_info

2011-06-23 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 3f18a03a2a1e by Victor Stinner in branch 'default': (null merge 3.2 for issue #11223) python 3.3 has already a better fix http://hg.python.org/cpython/rev/3f18a03a2a1e -- ___ Python

[issue11223] interruption of locks by signals not guaranteed when locks are implemented using POSIX condition variables; add sys.thread_info

2011-06-23 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset e5183f16c49d by Victor Stinner in branch '3.2': Issue #11223: skip also test_rlock_acquire_interruption() on FreeBSD6 http://hg.python.org/cpython/rev/e5183f16c49d New changeset 54fb77e0762c by Victor Stinner in branch 'default':

[issue6715] xz compressor support

2011-06-23 Thread jeremybanks
Changes by jeremybanks jer...@jeremybanks.ca: -- nosy: +jeremybanks ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715 ___ ___ Python-bugs-list

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2011-06-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Oh, the bad error message is definitely a bug. The question is whether we can also add md5-sess support while fixing it. Sounds like Senthil thinks no, in which case this issue needs to be split into two parts. --

  1   2   >