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

2011-06-22 Thread Chris Torek
Now that the exercise has been solved... Instead of really short code to solve the problem, how about some really long code? :-) I was curious about implementing prime factorization as a generator, using a prime-number generator to come up with the factors, and doing memoization of the

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

2011-06-22 Thread Paul Rubin
Chris Torek nos...@torek.net writes: def primes(): Yields sequence of prime numbers via Sieve of Eratosthenes. I think this has the same order-complexity but is enormously slower in practice, and runs out of recursion stack after a while. Exercise: spot the recursion. from

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

2011-06-22 Thread Ian Kelly
On Tue, Jun 21, 2011 at 11:58 PM, Chris Torek nos...@torek.net wrote: I was curious about implementing prime factorization as a generator, using a prime-number generator to come up with the factors, and doing memoization of the generated primes to produce a program that does what factor does,

Re: Don't understand SequenceMatcher from difflib

2011-06-22 Thread Antoon Pardon
On Tue, Jun 21, 2011 at 03:02:57PM -0400, Terry Reedy wrote: On 6/21/2011 9:43 AM, Antoon Pardon wrote: matcher = SequenceMatcher(ls1, ls2) ... What am I doing wrong? Read the doc, in particular, the really stupid signature of the class: class difflib.SequenceMatcher(isjunk=None,

Re: Unicode codepoints

2011-06-22 Thread Vlastimil Brom
2011/6/22 Saul Spatz saul.sp...@gmail.com: Hi, I'm just starting to learn a bit about Unicode. I want to be able to read a utf-8 encoded file, and print out the codepoints it encodes.  After many false starts, here's a script that seems to work, but it strikes me as awfully awkward and

coverage.py: Highlight hot spots in source code

2011-06-22 Thread Thomas Guettler
Hi, I just used coverage.py for the first time, and like it very much. Is it possible to display how many times a line was executed? I want to see lines which are executed very often red and lines which are executed not often green. I know there are other tools like hotshot, but AFAIK they

Re: Unicode codepoints

2011-06-22 Thread Peter Otten
Saul Spatz wrote: Hi, I'm just starting to learn a bit about Unicode. I want to be able to read a utf-8 encoded file, and print out the codepoints it encodes. After many false starts, here's a script that seems to work, but it strikes me as awfully awkward and unpythonic. Have you a

Re: Python 2.7.2 for Windows reports version as 2.7.0?

2011-06-22 Thread Gabriel Genellina
En Sun, 19 Jun 2011 12:35:38 -0300, pyt...@bdurham.com escribió: The version info comes from the DLL - I wonder if the DLL being found is somehow old? Make sure: import sys win32api.GetModuleFileName(sys.dllhandle) Is the DLL you expect. After uninstalling and reinstalling for the

Re: Unicode codepoints

2011-06-22 Thread jmfauth
That seems to me correct. '\\u{:04x}'.format(ord(u'é')) \u00e9 '\\U{:08x}'.format(ord(u'é')) \U00e9 because u'\U00e9' File eta last command, line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-5: end of string in escape sequence u'\U00e9' é

Re: Using django ORM from web browser and from command line apps

2011-06-22 Thread bruno.desthuilli...@gmail.com
On Jun 22, 2:21 am, News123 news1...@free.fr wrote: Out of curiousity: Do you know whether the imports would be executed for each potential command as soon as I call manage.py or only 'on demand'? Why would you care ? Just importing the module shouldn't have any side effect. --

Re: Emails backup in python 3.2

2011-06-22 Thread TheSaint
Michael Hrivnak wrote: Do you have a special reason for wanting to implement your own email storage? Learning python :) It seems very easy to get my mails with the poplib help. Usually I work with Kmail which imports mbox files. I'm not prone to set up a SMTP server on my PC. -- goto

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

2011-06-22 Thread Anny Mous
Chris Torek wrote: Now that the exercise has been solved... Instead of really short code to solve the problem, how about some really long code? :-) I was curious about implementing prime factorization as a generator, using a prime-number generator to come up with the factors, and doing

Re: Tkinter/scrollbar/canvas question

2011-06-22 Thread agb
Saul Spatz wrote: very helpful stuff snipped You need to do the update_idletasks to force the canvas to be mapped before you figure out the bounding box. Until the canvas is mapped to the screen, the bounding box is (0,0,1,1) so there no scrolling possible. (You can call update_ideltasks

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

2011-06-22 Thread Chris Angelico
On Wed, Jun 22, 2011 at 10:01 PM, Anny Mous b1540...@tyldd.com wrote:            prime = table[i]            del table[i] I don't fully understand your algorithm, but I think these two lines can be rewritten as: prime=table.pop(i) Interesting algo. A recursive generator, not sure I've seen

free computer ebooks updated 5 ebooks every day or more

2011-06-22 Thread basio basio
Denodev eBook - Blog PDF eBook. Free download eBook. Newest eBooks updated everyday. All eBooks are completely free. Come and stay here. subscribe for newsletters. subscribe for rss. www.denodev.com -- http://mail.python.org/mailman/listinfo/python-list

User Authentication

2011-06-22 Thread Anurag
Hi All, I am working on application which needs to do a authentication against LDAP, if LDAP not installed then local system account (administrator user in windows and root user in Linux). This should work on both Windows and Linux. Which library I should use for that. Regards, Anurag --

Re: Unicode codepoints

2011-06-22 Thread Saul Spatz
Thanks. I agree with you about the generator. Using your first suggestion, code points above U+ get separated into two surrogate pair characters fron UTF-16. So instead of U=10 I get U+DBFF and U+DFFF. -- http://mail.python.org/mailman/listinfo/python-list

Re: User Authentication

2011-06-22 Thread Tim Golden
On 22/06/2011 14:34, 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 (administrator user in windows and root user in Linux). This should work on both Windows and Linux. Which library I should use

Re: User Authentication

2011-06-22 Thread Adam Tauno Williams
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 (administrator user in windows and root user in Linux). This should work on both Windows and Linux. See

Python Regular Expressions

2011-06-22 Thread Andy Barnes
Hi, I am hoping someone here can help me with a problem I'd like to resolve with Python. I have used it before for some other projects but have never needed to use Regular Expressions before. It's quite possible I am following completley the wrong tack for this task (so any advice appreciated).

Re: Unicode codepoints

2011-06-22 Thread Saul Spatz
Thanks very much. This is the elegant kind of solution I was looking for. I had hoped there was a way to do it without even addressing the matter of surrogates, but apparently not. The reason I don't like this is that it depends on knowing that python internally stores strings in UTF-16. I

Re: Python Regular Expressions

2011-06-22 Thread Andy Barnes
to expand. I have parsed one of the lines manually to try and break the process I'm trying to automate down. source: Theurgic Lore, Lore, n/a, 105, 70, 30, Distil Mana output: TheurgicLore [label={ Theurgic Lore |{Lore|n/a}|{105|70|30}}]; DistilMana - TheurgicLore; This is the steps I would

Re: Python Regular Expressions

2011-06-22 Thread Neil Cerutti
On 2011-06-22, Andy Barnes andy.bar...@gmail.com wrote: to expand. I have parsed one of the lines manually to try and break the process I'm trying to automate down. source: Theurgic Lore, Lore, n/a, 105, 70, 30, Distil Mana output: TheurgicLore [label={ Theurgic Lore

Re: Python Regular Expressions

2011-06-22 Thread Peter Otten
Andy Barnes wrote: Hi, I am hoping someone here can help me with a problem I'd like to resolve with Python. I have used it before for some other projects but have never needed to use Regular Expressions before. It's quite possible I am following completley the wrong tack for this task (so

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

2011-06-22 Thread MRAB
On 22/06/2011 06:58, Chris Torek wrote: Now that the exercise has been solved... Instead of really short code to solve the problem, how about some really long code? :-) I was curious about implementing prime factorization as a generator, using a prime-number generator to come up with the

what happens inside?

2011-06-22 Thread Chetan Harjani
why tuples are immutable whereas list are mutable? why when we do x=y where y is a list and then change a element in x, y changes too( but the same is not the case when we change the whole value in x ), whereas, in tuples when we change x, y is not affected and also we cant change each individual

Re: what happens inside?

2011-06-22 Thread Andrew Berg
On 2011.06.22 10:45 AM, Chetan Harjani wrote: why tuples are immutable whereas list are mutable? Tuples are more efficient and more appropriate for a list of items that doesn't need to change. why when we do x=y where y is a list and then change a element in x, y changes too( but the same is

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

2011-06-22 Thread Ian Kelly
On Wed, Jun 22, 2011 at 6:01 AM, Anny Mous b1540...@tyldd.com wrote: def sieve():    Yield prime integers efficiently.    This uses the Sieve of Eratosthenes, modified to generate the primes    lazily rather than the traditional version which operates on a fixed    size array of integers.  

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 21, 9:12 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 8:00 pm, Ethan Furman et...@stoneleaf.us wrote: Adam Chapman wrote: Thanks Ethan No way could I have worked that out in my state of stress! For your second idea, would I need to type that into

Re: what happens inside?

2011-06-22 Thread Noah Hall
On Wed, Jun 22, 2011 at 4:45 PM, Chetan Harjani chetan.harj...@gmail.com wrote: why tuples are immutable whereas list are mutable? Because an immutable data type was needed, and a mutable type was also needed ;) why when we do x=y where y is a list and then change a element in x, y changes

Re: what happens inside?

2011-06-22 Thread Tim Rowe
On 22 June 2011 16:53, Andrew Berg bahamutzero8...@gmail.com wrote: On 2011.06.22 10:45 AM, Chetan Harjani wrote: why tuples are immutable whereas list are mutable? Tuples are more efficient and more appropriate for a list of items that doesn't need to change. And also it sometimes useful to

Re: running an existing script

2011-06-22 Thread Chris Rebert
On Wed, Jun 22, 2011 at 8:54 AM, Adam Chapman adamchapman1...@hotmail.co.uk wrote: snip I've added the python directories to the environment variable path in my computer (http://showmedo.com/videotutorials/video? name=96fromSeriesID=96), which means I can now call python from the windows

Re: running an existing script

2011-06-22 Thread Ethan Furman
Adam Chapman wrote: On Jun 21, 9:12 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 8:00 pm, Ethan Furman et...@stoneleaf.us wrote: Adam Chapman wrote: Thanks Ethan No way could I have worked that out in my state of stress! For your second idea, would I need to type

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 4:54 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 9:12 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 8:00 pm, Ethan Furman et...@stoneleaf.us wrote: Adam Chapman wrote: Thanks Ethan No way could I have worked that out in

Re: running an existing script

2011-06-22 Thread Ethan Furman
Adam Chapman wrote: On Jun 22, 4:54 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 9:12 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 8:00 pm, Ethan Furman et...@stoneleaf.us wrote: Adam Chapman wrote: Thanks Ethan No way could I have worked that

Re: Rant on web browsers

2011-06-22 Thread Thomas 'PointedEars' Lahn
[I am biting only because this is my field of expertise, and I am really getting tired reading from people not having a shadow of a trace of a minimum clue what these languages that I like can and can't do.] Chris Angelico wrote: Random rant and not very on-topic. Feel free to hit Delete and

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 5:51 pm, Ethan Furman et...@stoneleaf.us wrote: Adam Chapman wrote: On Jun 22, 4:54 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 9:12 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 8:00 pm, Ethan Furman et...@stoneleaf.us wrote: Adam

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 5:51 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 22, 5:51 pm, Ethan Furman et...@stoneleaf.us wrote: Adam Chapman wrote: On Jun 22, 4:54 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 21, 9:12 pm, Adam Chapman

Re: Unicode codepoints

2011-06-22 Thread jmfauth
On 22 juin, 16:07, Saul Spatz saul.sp...@gmail.com wrote: Thanks very much.  This is the elegant kind of solution I was looking for.  I had hoped there was a way to do it without even addressing the matter of surrogates, but apparently not.  The reason I don't like this is that it depends

Re: running an existing script

2011-06-22 Thread Ethan Furman
Adam Chapman wrote: Thanks a lot, must be getting close now... I changed the indentation one lines 136-168, and put in the command window: nfold.py --booster=Adaboost --folds=5 --data=spambase.data -- spec=spambase.spec --rounds=500 --tree=ADD_ALL --generate no syntax errors this time, it just

Re: Security test of embedded Python

2011-06-22 Thread Irmen de Jong
On 22-6-2011 4:44, Chris Angelico wrote: Followup: The test box has been administratively taken offline after about an hour of testing. Thank you to everyone who participated; it seems we have a lot of changes to make! Monty failed the test. But it was an incredibly successful test. And

doing cross platform file work

2011-06-22 Thread Tim Hanson
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 Windows. I have looked at the python.org os segment and didn't

Re: sorry, possibly too much info. was: Re: How can I speed up a script that iterates over a large range (600 billion)?

2011-06-22 Thread Irmen de Jong
On 22-6-2011 5:02, John Salerno wrote: Thanks. So far they are helping me with Python too, but definitely not as much as more general exercises would, I'm sure. The part about writing the code is fun, but once that's done, I seem to end up stuck with an inefficient implementation because I

Re: doing cross platform file work

2011-06-22 Thread John Gordon
In mailman.292.1308764714.1164.python-l...@python.org Tim Hanson tjhan...@yahoo.com writes: 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 Windows. I have looked at the python.org os

Re: running an existing script

2011-06-22 Thread Adam Chapman
On Jun 22, 6:13 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 22, 5:51 pm, Adam Chapman adamchapman1...@hotmail.co.uk wrote: On Jun 22, 5:51 pm, Ethan Furman et...@stoneleaf.us wrote: Adam Chapman wrote: On Jun 22, 4:54 pm, Adam Chapman

Re: running an existing script

2011-06-22 Thread Ethan Furman
Adam Chapman wrote: Thanks again Ethan, It did begin to run nfold.py this time, after I added the environment variable CLASSPATH to my system. It threw back a java error, but I guess this isn;t the right place to be asking about that

connect windows share

2011-06-22 Thread Travis Altman
I want to be able to connect to a windows share via python. My end goal is to be able to recursively search through windows shares. I want to do this in Linux as well. So given a share such as \\computer\test I would like to search through the test directory and any sub directories for any file

python 3 constant

2011-06-22 Thread sidRo
How to declare a constant in python 3? -- http://mail.python.org/mailman/listinfo/python-list

Re: connect windows share

2011-06-22 Thread Tim Golden
On 22/06/2011 19:38, Travis Altman wrote: I want to be able to connect to a windows share via python. My end goal is to be able to recursively search through windows shares. I want to do this in Linux as well. So given a share such as \\computer\test I would like to search through the test

writable iterators?

2011-06-22 Thread Neal Becker
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 limitation on the for loop, but a limitation on the python iterator concept. Is

Re: writable iterators?

2011-06-22 Thread Ethan Furman
Neal Becker 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 limitation on the for loop, but a limitation on the python

Re: writable iterators?

2011-06-22 Thread Benjamin Kaplan
On Jun 22, 2011 12:31 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 limitation on

Re: connect windows share

2011-06-22 Thread Benjamin Kaplan
On Jun 22, 2011 11:44 AM, Travis Altman travisalt...@gmail.com wrote: I want to be able to connect to a windows share via python. My end goal is to be able to recursively search through windows shares. I want to do this in Linux as well. So given a share such as \\computer\test I would like

Re: python 3 constant

2011-06-22 Thread Benjamin Kaplan
On Jun 22, 2011 12:03 PM, sidRo slacky2...@gmail.com wrote: How to declare a constant in python 3? -- You don't. Python doesn't have declarations (other than global and nonlocal). Convention is that anything in all caps should be considered a constant but there's no language-level enforcement

Re: python 3 constant

2011-06-22 Thread Noah Hall
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 caps, for example, PI = 3.14, as opposed to pi = 3.14 which could

Re: writable iterators?

2011-06-22 Thread Steven D'Aprano
On Wed, 22 Jun 2011 15:28:23 -0400, Neal Becker 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 limitation on the for

Re: writable iterators?

2011-06-22 Thread Mel
Steven D'Aprano wrote: On Wed, 22 Jun 2011 15:28:23 -0400, Neal Becker 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

Re: Unicode codepoints

2011-06-22 Thread Vlastimil Brom
2011/6/22 Saul Spatz saul.sp...@gmail.com: Thanks.  I agree with you about the generator.  Using your first suggestion, code points above U+ get separated into two surrogate pair characters fron UTF-16.  So instead of U=10 I get U+DBFF and U+DFFF. --

PyPad 2.7.1 Update 4

2011-06-22 Thread Jon Dowdall
Hi All, I'm pleased to announce that PyPad 2.7.1 (Update 4), a simple python environment for the iPad / iPhone, is now available in the iTunes store. It can be found at: http://itunes.apple.com/au/app/pypad/id428928902?mt=8 Update 4 adds the ability to create multiple modules and import

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

2011-06-22 Thread Terry Reedy
On 6/22/2011 1:32 AM, Paul Rubin wrote: Terry Reedytjre...@udel.edu writes: If the best C program for a problem takes 10 seconds or more, then applying the same 1 minute limit to Python is insane, and contrary to the promotion of good algorithm thinking. The Euler problems are not the

Re: what happens inside?

2011-06-22 Thread Terry Reedy
On 6/22/2011 11:45 AM, Chetan Harjani wrote: why tuples are immutable whereas list are mutable? Because tuples do not have mutation methods, which lists do. Tuple and lists both have .__getitem__ but tuples do not have .__setitem__ or .__delitem__ (or .append, .extend, .sort, or .reverse).

Re: writable iterators?

2011-06-22 Thread Neal Becker
Steven D'Aprano wrote: On Wed, 22 Jun 2011 15:28:23 -0400, Neal Becker 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

Re: writable iterators?

2011-06-22 Thread Chris Kaynor
You could probably implement something like this using generators and the send method (note the example is untested and intended for 2.6: I lack Python on this machine): def gen(list_): for i, v in enumerate(list_): list_[i] = yield v def execute(): data = range(10) iterator =

Re: writable iterators?

2011-06-22 Thread Thomas 'PointedEars' Lahn
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. you would expect that seq should now equal [42, 42]. Is that what you mean? It's not clear. Fortunately, that's not how it works, and far from being a

Re: writable iterators?

2011-06-22 Thread MRAB
On 23/06/2011 00:10, Neal Becker wrote: Steven D'Aprano wrote: On Wed, 22 Jun 2011 15:28:23 -0400, Neal Becker 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 #

Why are my signals being ignored?

2011-06-22 Thread Anthony Papillion
Hello Everyone, So I figured out the last problem about why I couldn't load my UI files but now I've got something that has be totally stumped. I've worked on it most of the day yesterday, Google'd it, and fought with it today and I'm admitting defeat and coming to the group with hat in hand

Re: writable iterators?

2011-06-22 Thread Steven D'Aprano
On Thu, 23 Jun 2011 09:10 am Neal Becker wrote: Steven D'Aprano wrote: On Wed, 22 Jun 2011 15:28:23 -0400, Neal Becker 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

Re: writable iterators?

2011-06-22 Thread Steven D'Aprano
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. you would expect that seq should now equal [42, 42]. Is that what you mean? It's not

Re: Handling import errors

2011-06-22 Thread Guillaume Martel-Genest
I did not think about using a global variable, and the top-level try...except solution is interesting. After further thinking, I have to reformulate my initial question: How do I manage to run code before my imports? For example, I want to make sure that I can use the logging module in the case

How to run a function in SPE on Python 2.5

2011-06-22 Thread bill lawhorn
I have a program: decrypt2.py which contains this function: def scramble2Decrypt(cipherText): halfLength = len(cipherText) // 2 oddChars = cipherText[:halfLength] evenChars = cipherText[halfLength:] plainText = for i in range(halfLength): plainText = plainText +

Re: How to run a function in SPE on Python 2.5

2011-06-22 Thread MRAB
On 23/06/2011 03:19, bill lawhorn wrote: I have a program: decrypt2.py which contains this function: def scramble2Decrypt(cipherText): halfLength = len(cipherText) // 2 oddChars = cipherText[:halfLength] evenChars = cipherText[halfLength:] plainText = for i in

Re: writable iterators?

2011-06-22 Thread Carl Banks
On Wednesday, June 22, 2011 4:10:39 PM UTC-7, Neal Becker wrote: AFAIK, the above is the only python idiom that allows iteration over a sequence such that you can write to the sequence. And THAT is the problem. In many cases, indexing is much less efficient than iteration. Well, if your

Re: How to run a function in SPE on Python 2.5

2011-06-22 Thread FunAt Work
Not tried SPE. But in PyScripter, as simple as that. import sys def scramble2Decrypt(cipherText): halfLength = len(cipherText) // 2 oddChars = cipherText[:halfLength] evenChars = cipherText[halfLength:] plainText = for i in range(halfLength): plainText = plainText +

Re: parse date string having EDT

2011-06-22 Thread Tim Roberts
Ben Finney ben+pyt...@benfinney.id.au wrote: Tim Roberts t...@probo.com writes: Right, because strptime doesn't support %Z. Au contraire: Support for the %Z directive is based on the values contained in tzname and whether daylight is true. Because of this, it is platform-specific

Re: writable iterators?

2011-06-22 Thread FunAt Work
Don't relate it anyhow to foreach of perl I would say, although the behaviour may be same in some aspect -- http://mail.python.org/mailman/listinfo/python-list

Re: User Authentication

2011-06-22 Thread Anurag
On Jun 22, 7:01 pm, Adam Tauno Williams awill...@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 (administrator user in windows and

Re: what happens inside?

2011-06-22 Thread FunAt Work
Do the same thing with an interconversion of tuple and list and you will be off to the older way: a=(1,2,3) b=list(a) b[0]=11 print a print b Output: (1, 2, 3) [11, 2, 3] -- http://mail.python.org/mailman/listinfo/python-list

Re: connect windows share

2011-06-22 Thread FunAt Work
On my cygwin system I just do the following for my network drive 'q' import commands print commands.getoutput('ls /cygdrive/q') Run it as - python fileList.py Here is the output: DataTables Functions Object_Repositories Recovery_Scenarios Scripts --

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-22 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: What are these directories? Look and see for yourself. Are they still used? Sure. If you do import DLFCN, it will come from that directory. -- ___ Python tracker rep...@bugs.python.org

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326 ___ ___ Python-bugs-list

[issue12380] bytearray methods center, ljust, rjust don't accept a bytearray as the fill character

2011-06-22 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12380 ___ ___ Python-bugs-list

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So people who say sys.platform shouldn't be used: what do you propose to do with Lib/plat-linux2 (or, more generally, Lib/plat-*)? These directories look useless to me. (IIRC, putting an obvious syntax error there does not trigger any failure

[issue7434] general pprint rewrite

2011-06-22 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +aronacher ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7434 ___ ___

[issue7434] general pprint rewrite

2011-06-22 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Link to Armin's work on a pprint improvement based on a Ruby pprint tool: https://github.com/mitsuhiko/prettyprint -- ___ Python tracker rep...@bugs.python.org

[issue7434] general pprint rewrite

2011-06-22 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Mine still lies here: https://bitbucket.org/langacore/nattyprint -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7434 ___

[issue9561] distutils: set encoding to utf-8 for input and output files

2011-06-22 Thread Michał Górny
Michał Górny mgo...@gentoo.org added the comment: Now that installing scripts with unicode characters was fixed, shall I open a separate bug for writing egg files with utf8 chars in author name? -- ___ Python tracker rep...@bugs.python.org

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-06-22 Thread Vinay Sajip
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: This part of install_distinf.run(): if install_data.get_resources_out() != []: resources_path = os.path.join(self.distinfo_dir, 'RESOURCES') logger.info('creating %s',

[issue9561] distutils: set encoding to utf-8 for input and output files

2011-06-22 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Please file a separate issue. -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___

[issue12087] install_egg_info fails with UnicodeEncodeError depending on locale

2011-06-22 Thread Michał Górny
Changes by Michał Górny mgo...@gentoo.org: -- nosy: +mgorny ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12087 ___ ___ Python-bugs-list mailing

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Indeed, the lib/plat- directories should continue to work just fine using linux3, correct? Or using linux, if we change sys.platform. (Note: just because we don't import them in the test suite doesn't mean that user code in the field

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: the platform does external calls to system commands such as uname, I guess it’s the platform module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12326

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-06-22 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Here's a patch. -- keywords: +needs review, patch stage: - patch review Added file: http://bugs.python.org/file22423/kevent_openbsd.diff ___ Python tracker rep...@bugs.python.org

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-06-22 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file22423/kevent_openbsd.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12181 ___

[issue1874] email parser does not register a defect for invalid Content-Transfer-Encoding on multipart messages

2011-06-22 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 5a2602939d5d by R David Murray in branch 'default': #1874: detect invalid multipart CTE and report it as a defect. http://hg.python.org/cpython/rev/5a2602939d5d -- nosy: +python-dev ___

[issue1874] email parser does not register a defect for invalid Content-Transfer-Encoding on multipart messages

2011-06-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the patches. I didn't use them, but they were helpful references. This is in a grey area between a bug and a feature request. The fact is, though, that for the most part the email module currently doesn't make extra effort

[issue12387] IDLE save hotkey problem

2011-06-22 Thread Jacob VB
New submission from Jacob VB jacob.andrew...@gmail.com: IDLE (for Python 3.2) fails to save using the ctrl-s keyboard shortcut when caps-lock is enabled, and instead only saves when ctrl-shift-s is pressed. When caps-lock is disabled, all shortcuts work normally. -- components: IDLE

[issue12387] IDLE save keyboard shortcut problem

2011-06-22 Thread Jacob VB
Changes by Jacob VB jacob.andrew...@gmail.com: -- title: IDLE save hotkey problem - IDLE save keyboard shortcut problem ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12387 ___

[issue12387] IDLE save keyboard shortcut problem

2011-06-22 Thread Jacob VB
Jacob VB jacob.andrew...@gmail.com added the comment: IDLE (for Python 3.2) fails to save using the ctrl-s keyboard shortcut when caps-lock is enabled, and instead only saves when ctrl-shift-s is pressed. When caps-lock is disabled, all shortcuts work normally. --

[issue12313] make install misses test dirs for packaging and email modules

2011-06-22 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: The changes have been checked in by Barry and David, so I'm closing this issue. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-22 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset da3af4b131d7 by Victor Stinner in branch '3.2': Issue #12383: fix test_empty_env() of subprocess on Mac OS X http://hg.python.org/cpython/rev/da3af4b131d7 New changeset 29819072855a by Victor Stinner in branch 'default': (merge 3.2)

  1   2   >