Re: Interpreting Left to right?

2011-06-24 Thread Terry Reedy
On 6/24/2011 12:32 AM, Chetan Harjani wrote: x=y=some string And we know that python interprets from left to right. Read the doc. 5.14. Evaluation order Python evaluates expressions from left to right. Notice that while evaluating an assignment, the right-hand side is evaluated before the

Re: Project-wide variable...

2011-06-24 Thread Terry Reedy
On 6/23/2011 11:49 PM, Gnarlodious wrote: 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

reg: playing with the list

2011-06-24 Thread kaustubh joshi
Hey all, I am new here and new to python too. In general new to programming . I was working on aproblem. and need some help. I have a list of numbers say [2,3,5,6,10,15] which all divide number 30. Now i have to reduce this list to the numbers which are prime in number. i.e. [2,3,5] can somebody

Re: search through this list's email archives

2011-06-24 Thread Gabriel Genellina
En Thu, 23 Jun 2011 13:11:32 -0300, Cathy James nambo...@gmail.com escribió: 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? Gmane provides a search capability also:

Re: Interpreting Left to right?

2011-06-24 Thread Ethan Furman
Terry Reedy wrote: On 6/24/2011 12:32 AM, Chetan Harjani wrote: x=y=some string And we know that python interprets from left to right. Read the doc. 5.14. Evaluation order Python evaluates expressions from left to right. Notice that while evaluating an assignment, the right-hand side is

Re: User Authentication

2011-06-24 Thread Michael Ströder
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 and Windows. Any

Looking PDF module

2011-06-24 Thread Hegedüs Ervin
Hello Everyone, I'm looking a good PDF module for Python 2.x - I've never used any PDF in Python, I don't know, what would be a good choice. There are several PDF tool for Python - this is my problem :) What I need: - utf8 support - create header and footer - (in headers there are small images)

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

2011-06-24 Thread mando
I took MacPython 2.6 from here: http://www.python.org/ftp/python/2.6.6/python-2.6.6-macosx10.3.dmg Also I downloaded Tcl/Tk from here http://www.kyngchaos.com/software/frameworks to using the gis software Qgis May be here the issue? -- http://mail.python.org/mailman/listinfo/python-list

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

2011-06-24 Thread Martin v. Loewis
Therefore, Windows has a trick for mark the file like visible, or not, in 32 mode. What trick? It's called file system redirection. When you access \windows\system32 in a 32-bit process, you *actually* access \windows\syswow64, which has entirely different files. The same also happens for

Re: Looking PDF module

2011-06-24 Thread mando
Take a look to reportlab: http://www.reportlab.com/software/opensource/ Bye bye Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Interpreting Left to right?

2011-06-24 Thread Chris Angelico
On Fri, Jun 24, 2011 at 5:14 PM, Ethan Furman et...@stoneleaf.us wrote: -- x = x['huh'] = {} -- x {'huh': {...}} I would have to call that dodgy practice... unless you have a lot of places where you need a dictionary with itself as an element, I would avoid assignments that depend on each

Re: those darn exceptions

2011-06-24 Thread Gregory Ewing
Chris Torek wrote: I can then check the now-valid pid via os.kill(). However, it turns out that one form of trash is a pid that does not fit within sys.maxint. This was a surprise that turned up only in testing, and even then, only because I happened to try a ridiculously large value as one of

how to write to registry without admin rights on win vista/7

2011-06-24 Thread miamia
Hello, In my program I can set to run after system startup (it writes path to Software\Microsoft\Windows\CurrentVersion\Run) but when normal user is logged in my application crashes. I must right click on app an choose Run As Admin and then everything works. How can I do it to write to registry

Re: Looking PDF module

2011-06-24 Thread Hegedüs Ervin
hello, On Fri, Jun 24, 2011 at 12:37:40AM -0700, mando wrote: Take a look to reportlab: http://www.reportlab.com/software/opensource/ thanks, I'll check it out, a. -- http://mail.python.org/mailman/listinfo/python-list

Re: Interpreting Left to right?

2011-06-24 Thread Chetan Harjani
Now its all clear. Thanks @ethan .. ur example is really scary. I didnt understand ur example fully although. See this is what i take it as: x=x['huh']={} first python checks check that there are two = operators. so it evaluates the RHS(since for = it is RHS to LHS) experession of right most (why

Re: how to write to registry without admin rights on win vista/7

2011-06-24 Thread Duncan Booth
miamia peterirbi...@gmail.com wrote: Hello, In my program I can set to run after system startup (it writes path to Software\Microsoft\Windows\CurrentVersion\Run) but when normal user is logged in my application crashes. I must right click on app an choose Run As Admin and then everything

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

2011-06-24 Thread Michael Ströder
sajuptpm wrote: How get all users belongs to a group using python ldap module. There are several ways of storing grouping information in a LDAP server. I assume the groups are normal group entries of object class 'groupOfNames' which is most commonly used. Such an entry has the attribute

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

2011-06-24 Thread sajuptpm
Hi, Thanks for reply. dn: cn=My-Group-1, ou=Groups, o=CUST equivalentToMe: cn=TDS7034,ou=Internal PCA,o=CUST objectClass: groupOfNames objectClass: top objectClass: swarePointers ACL: 2#entry#[Root]#member cn: My-Group-1 member: cn=AJP2203,ou=Internal PCA,o=CUST member:

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

2011-06-24 Thread sajuptpm
I am using Openldap (openldap 2.3.43-12.el5_5.2 and openldap.i386 0:2.3.43_2.2.29-12.el5_6.7) -- http://mail.python.org/mailman/listinfo/python-list

Re: Question regarding DNS resolution in urllib2

2011-06-24 Thread saurabh verma
Michael Hrivnak wrote: The latest libcurl includes the CURLOPTS_RESOLVE option (http://curl.haxx.se/libcurl/c/curl_easy_setopt.html) that will do what you want. It may not have made its way into pycurl yet, but you could just call the command-line curl binary with the --resolve option. This

Want to build an app for linux

2011-06-24 Thread saurabh verma
Hi all , May be I'm just asking a silly/old question . I have some open web APIs which i can use , on it I want to develop an desktop application , probably cross platform but mostly I'm aiming at *unix platforms . I've got no experience in programming desktop application , but thats not

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

2011-06-24 Thread sajuptpm
--- User cn=AJP2203,ou=Internal PCA,o=CUST has group memberships to the following Groups: groupMembership: cn=My-Group-1,ou=Groups,o=CUST groupMembership: cn=My-Group-2,u=Groups,o=CUST groupMembership: cn=My-Group-3,ou=Groups,o=CUST

Re: Want to build an app for linux

2011-06-24 Thread Adam Tauno Williams
On Fri, 2011-06-24 at 15:55 +0530, saurabh verma wrote: Hi all , May be I'm just asking a silly/old question . I have some open web APIs which i can use , on it I want to develop an desktop application , probably cross platform but mostly I'm aiming at *unix platforms . I've got no

Re: Want to build an app for linux

2011-06-24 Thread saurabh verma
Adam Tauno Williams wrote: On Fri, 2011-06-24 at 15:55 +0530, saurabh verma wrote: Hi all , May be I'm just asking a silly/old question . I have some open web APIs which i can use , on it I want to develop an desktop application , probably cross platform but mostly I'm aiming at *unix

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

2011-06-24 Thread Michael Ströder
sajuptpm wrote: --- User cn=AJP2203,ou=Internal PCA,o=CUST has group memberships to the following Groups: groupMembership: cn=My-Group-1,ou=Groups,o=CUST groupMembership: cn=My-Group-2,u=Groups,o=CUST groupMembership: cn=My-Group-3,ou=Groups,o=CUST

Re: Want to build an app for linux

2011-06-24 Thread saurabh verma
On Fri, Jun 24, 2011 at 4:24 PM, Anthony Papillion papill...@gmail.comwrote: Hi Saurabh, I'm an experienced developer with quite a few years invested in both desktop and web development. But up until a few weeks ago, I'd really never touched Python much less developed a desktop app in it.

Binary neural network in Python

2011-06-24 Thread Igor Begić
Hello, I,m new in Python, I want to design and train a binary neural network classifiers in Python. This model of neural network should make preprocessing expert system model to deal with the original telecommunications alarms. *The model can be seen as the simplest kind of feed-**forward

Re: Project-wide variable...

2011-06-24 Thread Gnarlodious
On Jun 24, 12:27 am, Terry Reedy wrote: 1) Can I tell Executable.py to share Data with ModuleTest.py? After the import is complete, yes. import ModuleTest ModuleTest.Data = Data This works if the use of Data is inside a function that is not called during import, not if the use of Data is

Re: Looking PDF module

2011-06-24 Thread neil.suffi...@gmail.com
You might also want to have a look at Pisa ( http://www.xhtml2pdf.com/ ) . It's based on reportlab but might suit you better. -- http://mail.python.org/mailman/listinfo/python-list

Re: Want to build an app for linux

2011-06-24 Thread J.O. Aho
Adam Tauno Williams wrote: On Fri, 2011-06-24 at 15:55 +0530, saurabh verma wrote: Hi all , May be I'm just asking a silly/old question . I have some open web APIs which i can use , on it I want to develop an desktop application , probably cross platform but mostly I'm aiming at *unix

Re: Want to build an app for linux

2011-06-24 Thread J.O. Aho
saurabh verma wrote: Quick question : Is creating jazzy UI feasible with python + gtk ? like round shaped corners , color schemes etc etc. Button shapes and colors are generally done in themes and luckily people using QT/gtk2 are allowed to change themes themselves which makes that the apps

Re: Want to build an app for linux

2011-06-24 Thread saurabh verma
I prefer QT and you have qt-creator: http://qt.nokia.com/products/developer-tools and PyQT/SIP: http://www.riverbankcomputing.co.uk/software/pyqt/intro IMHO you will get a better looking thing than with gtk2. Thanks Aho , Will surely look into it . --

Re: Want to build an app for linux

2011-06-24 Thread saurabh verma
J.O. Aho wrote: saurabh verma wrote: Quick question : Is creating jazzy UI feasible with python + gtk ? like round shaped corners , color schemes etc etc. Button shapes and colors are generally done in themes and luckily people using QT/gtk2 are allowed to change themes themselves

Re: reg: playing with the list

2011-06-24 Thread Colin J. Williams
On 24-Jun-11 03:01 AM, kaustubh joshi wrote: Hey all, I am new here and new to python too. In general new to programming . I was working on aproblem. and need some help. I have a list of numbers say [2,3,5,6,10,15] which all divide number 30. Now i have to reduce this list to the numbers which

WORK FROM HOME - EARN $15,000 WEEKLY ( PART TIME JOBS)

2011-06-24 Thread ruchikajai...@yahoo.in
WORK FROM HOME - EARN $15,000 WEEKLY ( PART TIME JOBS) REGISTER NOW START EARNING AT http://www.work8home.com -- http://mail.python.org/mailman/listinfo/python-list

Re: reg: playing with the list

2011-06-24 Thread Laurent Claessens
You might try writing the boolean function is_prime(n) for almost any n. There was a recent discussion on this topic. Since the guy is new in programming, I complete the answer, just in case. Using the function is_prime(n), FIRST POSSIBILITY : new_list=[] for n in old_list: if

Re: search through this list's email archives

2011-06-24 Thread Grant Edwards
On 2011-06-24, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 23 Jun 2011 13:11:32 -0300, Cathy James nambo...@gmail.com escribi?: 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? Gmane provides a

Re: reg: playing with the list

2011-06-24 Thread Noah Hall
On Fri, Jun 24, 2011 at 8:01 AM, kaustubh joshi kandrjo...@gmail.com wrote: Hey all, I am new here and new to python too. In general new to programming . I was working on aproblem. and need some help. I have a list of numbers say [2,3,5,6,10,15] which all divide number 30. Now i have to

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

2011-06-24 Thread John Gordon
In 34110eed-96bc-499f-9a4e-068f2720f...@h12g2000pro.googlegroups.com sajuptpm sajup...@gmail.com writes: dn: cn=My-Group-1,ou=Groups,o=CUST member: cn=AJP2203,ou=Internal PCA,o=CUST member: cn=AZE9632,ou=Internal PCA,o=CUST member: cn=BTC4979,ou=Internal PCA,o=CUST * I have group

unzip problem

2011-06-24 Thread Ahmed, Shakir
Hi, I am getting following error message while unziping a .zip file. Any help or idea is highly appreciated. Error message Traceback (most recent call last): File C:\Zip_Process\py\test2_new.py, line 15, in module outfile.write(z.read(name)) IOError: (22, 'Invalid argument')

Re: unzip problem

2011-06-24 Thread Steven D'Aprano
On Fri, 24 Jun 2011 10:55:52 -0400, Ahmed, Shakir wrote: Hi, I am getting following error message while unziping a .zip file. Any help or idea is highly appreciated. How do you know it is when unzipping the file? Maybe it is, or maybe it isn't. The line giving the error has *two* IO

Re: unzip problem

2011-06-24 Thread Philip Semanchuk
On Jun 24, 2011, at 10:55 AM, Ahmed, Shakir wrote: Hi, I am getting following error message while unziping a .zip file. Any help or idea is highly appreciated. Error message Traceback (most recent call last): File C:\Zip_Process\py\test2_new.py, line 15, in module

Re: Looking PDF module

2011-06-24 Thread Cameron Laird
On Jun 24, 6:45 am, neil.suffi...@gmail.com neil.suffi...@gmail.com wrote: You might also want to have a look at Pisa (http://www.xhtml2pdf.com/ ) . It's based on reportlab but might suit you better. There's more to the story. As with many things, the answer is, it depends. In this case, there

RE: unzip problem

2011-06-24 Thread Ahmed, Shakir
On Fri, 24 Jun 2011 10:55:52 -0400, Ahmed, Shakir wrote: Hi, I am getting following error message while unziping a .zip file. Any help or idea is highly appreciated. How do you know it is when unzipping the file? Maybe it is, or maybe it isn't. The line giving the error has *two* IO

RE: unzip problem

2011-06-24 Thread Ahmed, Shakir
-Original Message- From: python-list-bounces+shahmed=sfwmd@python.org [mailto:python-list-bounces+shahmed=sfwmd@python.org] On Behalf Of Philip Semanchuk Sent: Friday, June 24, 2011 11:18 AM To: Lista-Comp-Lang-Python list Subject: Re: unzip problem On Jun 24, 2011, at 10:55

Re: unzip problem

2011-06-24 Thread Ethan Furman
Ahmed, Shakir wrote: Hi, I am getting following error message while unziping a .zip file. Any help or idea is highly appreciated. Error message Traceback (most recent call last): File C:\Zip_Process\py\test2_new.py, line 15, in module outfile.write(z.read(name)) IOError: (22,

RE: unzip problem

2011-06-24 Thread steve+comp . lang . python
Ahmed, Shakir wrote: The problem is happening when it is coming to write option. The * is not the real name of the zip file, I just hide the name. Please don't waste our time by showing us fake code that doesn't do what you say it does. You said that The script is here, but that was not

python overloading

2011-06-24 Thread anand jeyahar
Not sure, this is the right place, redirect me if it's not. I was curious about the functionoverloading( http://svn.python.org/view/sandbox/trunk/overload/) and was trying to do a svn checkout of the branch and failed. Is it restricted access for even checkout? How do i get read-only access?

Re: those darn exceptions

2011-06-24 Thread Chris Torek
Chris Torek wrote: I can then check the now-valid pid via os.kill(). However, it turns out that one form of trash is a pid that does not fit within sys.maxint. This was a surprise that turned up only in testing, and even then, only because I happened to try a ridiculously large value as one

Re: unzip problem

2011-06-24 Thread Ethan Furman
Ahmed, Shakir wrote: Thanks for your help and really appreciate your time. I changed the code as you mentioned and here it is: fn = open('T:\\applications\\tst\\py\\Zip_Process\\Zip\\myzip.zip', 'rb') z = zipfile.ZipFile(fn) for name in z.namelist(): data = z.read(name) ptr = 0

Re: how to write to registry without admin rights on win vista/7

2011-06-24 Thread Andrew Berg
On 2011.06.24 03:48 AM, Duncan Booth wrote: http://stackoverflow.com/questions/130763/request-uac-elevation-from-within-a-python-script Heh. On Windows 7, using 'runas' for the operation in os.startfile() gives me a normal UAC prompt. Is there any way to ask for elevation from a

Re: NEED HELP-process words in a text file

2011-06-24 Thread Cousin Stanley
Chris Rebert wrote: Netiquette comment: Please avoid SHOUTING The brilliant beam of light that first thought capitilized words amounted to shouting never programmed cobol, fortran, or pl/1 in the 1960s or 1970s :-) How or why this behavior was cultivated and

Re: unzip problem

2011-06-24 Thread Ethan Furman
Ahmed, Shakir wrote: Thanks once again and you are right I am trying to unzip in the network share drive. here is the script now: If I am doing any wrong. : ## code start here import zipfile import os import time dir1 = T:\\applications\\tst\\py\\Zip_Process test = '%s/shp'%dir1 os.chdir(test)

Re: NEED HELP-process words in a text file

2011-06-24 Thread John Gordon
In iu2ns9$kkq$1...@dont-email.me Cousin Stanley cousinstan...@gmail.com writes: How or why this behavior was cultivated and continues to spread is mind boggling The behavior of writing in all caps, or the behavior of equating such writing with shouting? -- John Gordon

Re: Interpreting Left to right?

2011-06-24 Thread Tycho Andersen
On Fri, Jun 24, 2011 at 12:14:27AM -0700, Ethan Furman wrote: The example given to me when I had this question: -- x = x['huh'] = {} -- x {'huh': {...}} As you can see, the creation of the dictionary is evaluated, and bound to the name 'x'; then the key 'huh' is set to the same

Re: Interpreting Left to right?

2011-06-24 Thread Ethan Furman
Tycho Andersen wrote: On Fri, Jun 24, 2011 at 12:14:27AM -0700, Ethan Furman wrote: The example given to me when I had this question: -- x = x['huh'] = {} -- x {'huh': {...}} As you can see, the creation of the dictionary is evaluated, and bound to the name 'x'; then the key 'huh' is set

RE: unzip problem - solved

2011-06-24 Thread Ahmed, Shakir
-Original Message- From: Ethan Furman [mailto:et...@stoneleaf.us] Sent: Friday, June 24, 2011 3:47 PM To: Ahmed, Shakir Cc: Python Subject: Re: unzip problem Ahmed, Shakir wrote: Thanks once again and you are right I am trying to unzip in the network share drive. here is the script

Re: Interpreting Left to right?

2011-06-24 Thread Tycho Andersen
On Fri, Jun 24, 2011 at 01:13:08PM -0700, Ethan Furman wrote: Tycho Andersen wrote: On Fri, Jun 24, 2011 at 12:14:27AM -0700, Ethan Furman wrote: The example given to me when I had this question: -- x = x['huh'] = {} -- x {'huh': {...}} As you can see, the creation of the dictionary

Re: unzip problem - solved

2011-06-24 Thread Ethan Furman
Ahmed, Shakir wrote: Here is the final code that worked to unzip a large file in the network drive. CHUNK_SIZE = 10 * 1024 * 1024 fh = open('T:\\applications\\tst\\py\\Zip_Process\\Zip\\myzip.zip', 'rb') z = zipfile.ZipFile(fh) for name in z.namelist(): fn = open(name, 'wb') ptr = 0

Significant figures calculation

2011-06-24 Thread Harold
Hi, I am looking for an easy way to do significant figure calculations in python (which I want to use with a class that does unit calculations). Significant figure calculations should have the semantics explained, e.g., here: http://chemistry.about.com/od/mathsciencefundamentals/a/sigfigures.htm

Re: Interpreting Left to right?

2011-06-24 Thread Ned Deily
In article 20110624200618.gk6...@point.cs.wisc.edu, Tycho Andersen ty...@tycho.ws wrote: Yes, I understand that, but I guess I don't understand *why* things are done that way. What is the evaluation order principle at work here? I would have expected: tmp = {} x['huh'] = tmp # NameEror!

Re: Significant figures calculation

2011-06-24 Thread Steven D'Aprano
On Fri, 24 Jun 2011 13:05:41 -0700, Harold wrote: Hi, I am looking for an easy way to do significant figure calculations in python (which I want to use with a class that does unit calculations). Significant figure calculations should have the semantics explained, e.g., here:

Re: Significant figures calculation

2011-06-24 Thread Jerry Hill
On Fri, Jun 24, 2011 at 4:46 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Really? It works for me. import decimal D = decimal.Decimal decimal.getcontext().prec = 2 D('32.01') + D('5.325') + D('12') Decimal('49') I'm curious. Is there a way to get the number of

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

2011-06-24 Thread Ned Deily
In article 09cae8bf-4b1f-40ea-af36-4ba130c41...@m18g2000vbl.googlegroups.com, mando mandol...@gmail.com wrote: I took MacPython 2.6 from here: http://www.python.org/ftp/python/2.6.6/python-2.6.6-macosx10.3.dmg Also I downloaded Tcl/Tk from here

Re: Interpreting Left to right?

2011-06-24 Thread Terry Reedy
On 6/24/2011 4:06 PM, Tycho Andersen wrote: tmp = {} x['huh'] = tmp # NameEror! That is, the right hand sides of assignments are evaluated before the left hand sides. That is (somehow?) not the case here. You are parsing a = b = c as a = (b = c) which works in a language in which assignment

Re: Interpreting Left to right?

2011-06-24 Thread Tycho Andersen
On Fri, Jun 24, 2011 at 01:24:24PM -0700, Ned Deily wrote: In article 20110624200618.gk6...@point.cs.wisc.edu, Tycho Andersen ty...@tycho.ws wrote: Yes, I understand that, but I guess I don't understand *why* things are done that way. What is the evaluation order principle at work here? I

Re: Looking PDF module

2011-06-24 Thread Ervin Hegedüs
hello, On Fri, Jun 24, 2011 at 09:59:17AM -0700, Cameron Laird wrote: Hegedüs Ervin, it's quite likely that ReportLab will be a good technical fit for you. it's a good news :) Are you in a position to pay licensing fees for advanced features? no :( Do you have any requirements to *merge*

Re: Project-wide variable...

2011-06-24 Thread Terry Reedy
On 6/24/2011 7:30 AM, Gnarlodious wrote: On Jun 24, 12:27 am, Terry Reedy wrote: 1) Can I tell Executable.py to share Data with ModuleTest.py? After the import is complete, yes. import ModuleTest ModuleTest.Data = Data This works if the use of Data is inside a function that is not called

Re: Interpreting Left to right?

2011-06-24 Thread Tycho Andersen
On Fri, Jun 24, 2011 at 05:02:00PM -0400, Terry Reedy wrote: On 6/24/2011 4:06 PM, Tycho Andersen wrote: tmp = {} x['huh'] = tmp # NameEror! That is, the right hand sides of assignments are evaluated before the left hand sides. That is (somehow?) not the case here. You are parsing a =

Re: python overloading

2011-06-24 Thread Terry Reedy
On 6/24/2011 2:01 PM, anand jeyahar wrote: Not sure, this is the right place, redirect me if it's not. I was curious about the functionoverloading(http://svn.python.org/view/sandbox/trunk/overload/) and was trying to do a svn checkout of the branch and failed. Is it restricted access for even

Re: NEED HELP-process words in a text file

2011-06-24 Thread Cousin Stanley
John Gordon wrote: In iu2ns9$kkq$1...@dont-email.me Cousin Stanley cousinstan...@gmail.com writes: How or why this behavior was cultivated and continues to spread is mind boggling The behavior of writing in all caps, or the behavior of equating such writing with shouting ? The

Re: search through this list's email archives

2011-06-24 Thread Gabriel Genellina
En Fri, 24 Jun 2011 11:33:23 -0300, Grant Edwards invalid@invalid.invalid escribió: On 2011-06-24, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 23 Jun 2011 13:11:32 -0300, Cathy James nambo...@gmail.com escribi?: I looked through this forum's archives, but I can't find a way to

Re: Interpreting Left to right?

2011-06-24 Thread Ned Deily
In article 20110624210835.gl6...@point.cs.wisc.edu, Tycho Andersen ty...@tycho.ws wrote: On Fri, Jun 24, 2011 at 01:24:24PM -0700, Ned Deily wrote: In article 20110624200618.gk6...@point.cs.wisc.edu, Tycho Andersen ty...@tycho.ws wrote: Yes, I understand that, but I guess I don't

Re: how to write to registry without admin rights on win vista/7

2011-06-24 Thread Andrew Berg
On 2011.06.24 03:48 AM, Duncan Booth wrote: http://stackoverflow.com/questions/130763/request-uac-elevation-from-within-a-python-script Heh. On Windows 7, using 'runas' for the operation in os.startfile() gives me a normal UAC prompt. Is there any way to ask for elevation from a

Re: NEED HELP-process words in a text file

2011-06-24 Thread Steven D'Aprano
On Fri, 24 Jun 2011 19:17:29 +, Cousin Stanley wrote: Chris Rebert wrote: Netiquette comment: Please avoid SHOUTING The brilliant beam of light that first thought capitilized words amounted to shouting never programmed cobol, fortran, or pl/1 in the 1960s or 1970s :-)

Re: those darn exceptions

2011-06-24 Thread Ben Finney
Chris Torek nos...@torek.net writes: But again, this is why I would like to have the ability to use some sort of automated tool, where one can point at any given line of code and ask: what exceptions do you, my faithful tool, believe can be raised as a consequence of this line of code? “Why,

Re: Interpreting Left to right?

2011-06-24 Thread Chris Angelico
On Sat, Jun 25, 2011 at 7:02 AM, Terry Reedy tjre...@udel.edu wrote: If I have ever used this sort of multiple assignment, it has been for simple unambiguous things like a = b = 0. For which it's extremely useful. Initialize a whole bunch of variables to zero... or to a couple of values:

Re: Significant figures calculation

2011-06-24 Thread steve+comp . lang . python
Jerry Hill wrote: I'm curious. Is there a way to get the number of significant digits for a particular Decimal instance? I spent a few minutes browsing through the docs, and didn't see anything obvious. I was thinking about setting the precision dynamically within a function, based on the

Re: Interpreting Left to right?

2011-06-24 Thread Ben Finney
Tycho Andersen ty...@tycho.ws writes: On Fri, Jun 24, 2011 at 01:24:24PM -0700, Ned Deily wrote: http://docs.python.org/py3k/reference/simple_stmts.html#assignment-statements Perhaps I'm thick, but (the first thing I did was read the docs and) I still don't get it. From the docs: An

Re: Interpreting Left to right?

2011-06-24 Thread Terry Reedy
On 6/24/2011 5:08 PM, Tycho Andersen wrote: An assignment statement evaluates the expression list (remember that this can be a single expression or a comma-separated list, the latter yielding a tuple) and assigns the single resulting object to each of the target lists, from left to right.

Installing Python Apps on Mac Lion

2011-06-24 Thread JKPeck
The Lion version of the OS on the Mac comes with Python 2.7 installed, but it is in /System/Library/Frameworks/..., and this area is not writable by third party apps. So is there a consensus on what apps that typically install under the Python site-packages directory should do in this

Re: Significant figures calculation

2011-06-24 Thread Harold
I tried to modify the DecimalContext (e.g. getcontext().prec = 2) but that did not lead to the correct behavior. Really? It works for me. You are right, I did something wrong when attempting to set the precision. And the trick with rounding the decimal with the unary + is neat. It's the

what's the big deal for print()

2011-06-24 Thread pipehappy
Hi, Why people want print() instead of print str? That's not a big deal and the old choice is more natural. Anyone has some clue? -- http://mail.python.org/mailman/listinfo/python-list

Re: NEED HELP-process words in a text file

2011-06-24 Thread Ethan Furman
Steven D'Aprano wrote: On Fri, 24 Jun 2011 19:17:29 +, Cousin Stanley wrote: Chris Rebert wrote: Netiquette comment: Please avoid SHOUTING The brilliant beam of light that first thought capitilized words amounted to shouting never programmed cobol, fortran, or pl/1 in the

Re: what's the big deal for print()

2011-06-24 Thread John Gordon
In d3558c5d-0fe6-4da7-843d-c2f45b2bf...@y13g2000yqy.googlegroups.com pipehappy pipeha...@gmail.com writes: Why people want print() instead of print str? That's not a big deal and the old choice is more natural. Anyone has some clue? Because the new Python uses print(). print str is the old

Re: what's the big deal for print()

2011-06-24 Thread Terry Reedy
On 6/24/2011 10:39 PM, pipehappy wrote: Hi, Why people want print() instead of print str? That's not a big deal and the old choice is more natural. Anyone has some clue? print as a function instead of a statement is consistent with input as a function, can be overridden with custom versions,

Re: those darn exceptions

2011-06-24 Thread Chris Angelico
On Sat, Jun 25, 2011 at 10:25 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: No. The answer is *still* “why, any exception at all”. The name ‘os.read’ could be re-bound at run-time to any object at all, so a code checker that you “point at any given line of code” can't know what the name

Re: what's the big deal for print()

2011-06-24 Thread steve+comp . lang . python
John Gordon wrote: In d3558c5d-0fe6-4da7-843d-c2f45b2bf...@y13g2000yqy.googlegroups.com pipehappy pipeha...@gmail.com writes: Why people want print() instead of print str? That's not a big deal and the old choice is more natural. Anyone has some clue? Because the new Python uses print().

Re: Installing Python Apps on Mac Lion

2011-06-24 Thread Ned Deily
In article 2ffee45b-8987-4fb4-8c8b-c1eed728e...@glegroupsg2000goo.googlegroups.com , JKPeck jkp...@gmail.com wrote: The Lion version of the OS on the Mac comes with Python 2.7 installed, but it is in /System/Library/Frameworks/..., and this area is not writable by third party apps. So

Re: how to write to registry without admin rights on win vista/7

2011-06-24 Thread Thorsten Kampe
* miamia (Fri, 24 Jun 2011 01:08:55 -0700 (PDT)) In my program I can set to run after system startup (it writes path to Software\Microsoft\Windows\CurrentVersion\Run) Under HKLM oder HKCU? The path itself is of course irrelevant. but when normal user is logged in my application crashes.

[issue12353] argparse cannot handle empty arguments

2011-06-24 Thread Torsten Landschoff
Torsten Landschoff t.landsch...@gmx.net added the comment: Your unit test isn't consistent with the other unit tests in that set, which makes me suspicious that it isn't testing what we need to test. That is because I did not try to understand the machinery behind the argparse unit tests

[issue12353] argparse cannot handle empty arguments

2011-06-24 Thread Torsten Landschoff
Torsten Landschoff t.landsch...@gmx.net added the comment: Here is another possible patch that will catch the problem. But this enables the fromfile_prefix_chars option for all tests checking empty and space arguments. This way a problem that occurs only without that option might be hidden.

[issue11104] distutils sdist ignores MANIFEST

2011-06-24 Thread Stephen Thorne
Stephen Thorne step...@thorne.id.au added the comment: I have 2 patches, with tests, that applies on python2.7 and the python3 series of branches, attached this ticket. I have also got a signed contributor agreement lodged with the PSF. Can I please have someone either apply my patches or

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-24 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Here's a patch to add the two functions (with docs and tests). You'll need to run autoreconf before compiling. -- assignee: - rosslagerwall keywords: +patch nosy: +rosslagerwall stage: - patch review type: - feature request

[issue11909] Doctest sees directives in strings when it should only see them in comments

2011-06-24 Thread Devin Jeanpierre
Devin Jeanpierre jeanpierr...@gmail.com added the comment: You're right, and good catch. If a doctest starts with a #coding:XXX line, this should break. One option is to replace the call to tokenize.tokenize with a call to tokenize._tokenize and pass 'utf-8' as a parameter. Downside: that's a

[issue12361] Memory Leak in File Logging

2011-06-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Marked as pending since no further information is available. I will close this issue in two weeks unless more information becomes available; even after this, if you get more information, you can re-open this issue. Also please note that

[issue12393] Packaging should provide support for extensible categories

2011-06-24 Thread Vinay Sajip
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: Some installation locations are platform-dependent and cannot be categorised into a small but fixed number of categories. This is particularly true for the Windows ecosystem - PowerShell, Office, SharePoint all have specific locations

[issue12394] Packaging should provide better support for executable scripts on Windows

2011-06-24 Thread Vinay Sajip
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: At present, packaging support for scripts on Windows is the same as for any other system. This is sub-optimal, for the following reasons: 1. Windows doesn't support #! lines to find the correct executable for a script. On a system with

[issue12394] Packaging should provide better support for executable scripts on Windows

2011-06-24 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Are you aware of PEP 397? http://www.python.org/dev/peps/pep-0397/ -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-24 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Cool, a patch! Some comments. Why do you wait until the end of PyInit_signal() to set initialized to 1? If this variable is only present to call PyStructSequence_InitType() only once, you can set initialized to 1 directly in the

  1   2   3   >