ANN: PyEnchant 1.6.3 - now with OSX!

2010-08-17 Thread Ryan Kelly
Hi All, I'm pleased to announce the release of PyEnchant version 1.6.3: http://pypi.python.org/pypi/pyenchant/1.6.3/ This release fixes a few bugs, but the biggest new feature is precompiled binary distributions for Mac OS X. They should be considered experimental at this stage, but

Re: update of elements in GUI

2010-08-17 Thread Eric Brunel
In article 24dc97b3-a8b5-4638-9cf5-a397f1eae...@q16g2000prf.googlegroups.com, Jah_Alarm jah.al...@gmail.com wrote: hi, I've already asked this question but so far the progress has been small. I'm running Tkinter. I have some elements on the screen (Labels, most importantly) which content

Re: Textvariable display in label (GUI design)

2010-08-17 Thread Eric Brunel
In article ded2beea-2bf9-423d-9457-6b6beb7f7...@n19g2000prf.googlegroups.com, Jah_Alarm jah.al...@gmail.com wrote: On Aug 17, 3:32 am, Eric Brunel eric.bru...@pragmadev.nospam.com wrote: In article 993d9560-564d-47f0-b2db-6f0c6404a...@g6g2000pro.googlegroups.com,  Jah_Alarm

Re: 2 Regex Questions

2010-08-17 Thread Peter Otten
AlphaBravo wrote: 2) How can I split a string into sections that MATCH a regex (rather then splitting by seperator). Tokenizer-style but ignoring every place from where I can't start a match? import re re.compile([abc]+).findall(abcxaaa! abba) ['abc', 'aaa', 'abba'] --

Re: 79 chars or more?

2010-08-17 Thread Lawrence D'Oliveiro
In message mailman.2212.1282012525.1673.python-l...@python.org, AK wrote: As monitors are getting bigger, is there a general change in opinion on the 79 chars limit in source files? WHAT 79-character limit in source files? I currently have my Emacs windows set at 100 characters wide, and I’m

Re: 79 chars or more?

2010-08-17 Thread Michele Simionato
On Aug 17, 6:50 am, AK andrei@gmail.com wrote: On 08/17/2010 12:26 AM, James Mills wrote: By the way, the reason I asked is that we're working on a python tutorial and I realized that even though I'm used to 99, I wasn't sure if it's ok to teach that to new users or not..    -andrei It

Re: looping through possible combinations of McNuggets packs of 6, 9 and 20

2010-08-17 Thread Giacomo Boffi
Paul Rubin no.em...@nospam.invalid writes: Baba raoul...@gmail.com writes: exercise: given that packs of McNuggets can only be bought in 6, 9 or 20 packs, write an exhaustive search to find the largest number of McNuggets that cannot be bought in exact quantity. Is that a homework problem?

Re: segfault with small pyqt script

2010-08-17 Thread Hans-Peter Jansen
On Monday 16 August 2010, 09:22:27 Gelonida wrote: Hi Hans-Peter, It seems, that my other posts did not get through. On 08/15/2010 11:17 PM, Hans-Peter Jansen wrote: For a starter, tell us the versions of python-sip, and python-qt4 or however they're called in Ubuntu. For the record,

Re: 79 chars or more?

2010-08-17 Thread Jean-Michel Pichavant
Michele Simionato wrote: On Aug 17, 6:50 am, AK andrei@gmail.com wrote: On 08/17/2010 12:26 AM, James Mills wrote: By the way, the reason I asked is that we're working on a python tutorial and I realized that even though I'm used to 99, I wasn't sure if it's ok to teach that to new users

Re: Simple Python Sandbox

2010-08-17 Thread Roland Koebler
On Sat, Aug 14, 2010 at 08:01:00PM -0700, Stephen Hansen wrote: As you can see, black listing isn't the best approach here. But I have a two pronged strategy: the black list is only half of the equation. One, I'm blacklisting all the meta functions out of builtins. But blacklists are *never*

Re: 2 Regex Questions

2010-08-17 Thread AlphaBravo
On Aug 17, 10:23 am, Peter Otten __pete...@web.de wrote: AlphaBravo wrote:  2) How can I split a string into sections that MATCH a regex (rather then splitting by seperator). Tokenizer-style but ignoring every place from where I can't start a match? import re

Re: update of elements in GUI

2010-08-17 Thread Jah_Alarm
thanks. The thing is, the objects actually get updated without this command, but when I run the GUI outside of python shell (i.e. in command prompt as python filename.py or compile it to .exe file) the objects do not get updated. I tried

EARN 10$ PER ADVERTISEMENT OF 60 SEC

2010-08-17 Thread tania tani
MESSAGE NO 1 FOR YOU READ IT. http://www.fineptc.com/index.php?ref=imranraza460 Hello my dear friend, I hope you will be fine. i want to tell you the authentic way to make money

Re: passing variables as object attributes

2010-08-17 Thread Bruno Desthuilliers
Vikas Mahajan a écrit : On 16 August 2010 19:23, Nitin Pawar nitinpawar...@gmail.com wrote: you would need to define a class first with its attiributes and then you may want to initiate the variables by calling the class initilializer Actually I have to dynamically add attributes to a object.

Re: 79 chars or more?

2010-08-17 Thread BartC
James Mills prolo...@shortcircuit.net.au wrote in message news:mailman..1282019212.1673.python-l...@python.org... On Tue, Aug 17, 2010 at 2:12 PM, AK andrei@gmail.com wrote: There's no doubt that there are pro's and con's, but to be fair, it's not like code becomes unreadable over 79

message box in Tkinter

2010-08-17 Thread Jah_Alarm
I need to display a message box at the click of a button. I od the following: from Tkinter import * def msg1(): messagebox.showinfo(message='Have a good day') Button(mainframe,text=About,command=msg1()).grid(column=360,row=36,sticky=W) I get the error msg 'global name 'messagebox' is not

Re: message box in Tkinter

2010-08-17 Thread Matt Saxton
On Tue, 17 Aug 2010 04:02:23 -0700 (PDT) Jah_Alarm jah.al...@gmail.com wrote: When I try importing messagebox from Tkinter i get an error message that this module doesn't exist. I believe what you want is Tkinter.Message -- Matt Saxton m...@scotweb.co.uk --

Re: message box in Tkinter

2010-08-17 Thread Eric Brunel
In article 61cbd1cb-bd6d-49aa-818f-d28c46098...@x18g2000pro.googlegroups.com, Jah_Alarm jah.al...@gmail.com wrote: I need to display a message box at the click of a button. I od the following: from Tkinter import * def msg1(): messagebox.showinfo(message='Have a good day')

Re: update of elements in GUI

2010-08-17 Thread Jah_Alarm
In MATLAB this command is drawnow, just in case On Aug 17, 9:49 pm, Jah_Alarm jah.al...@gmail.com wrote: thanks. The thing is, the objects actually get updated without this command, but when I run the GUI outside of python shell (i.e. in command prompt as python filename.py or compile it to

Re: update of elements in GUI

2010-08-17 Thread Eric Brunel
(Top-post corrected; please don't do that, it makes messages very hard to read via usenetŠ) In article 26c363c8-11d7-49b9-a1c1-251ab5ff9...@p22g2000pre.googlegroups.com, Jah_Alarm jah.al...@gmail.com wrote: On Aug 17, 7:19 pm, Eric Brunel eric.bru...@pragmadev.nospam.com wrote: You have to

Re: 79 chars or more?

2010-08-17 Thread Neil Cerutti
On 2010-08-17, Michael Torrie torr...@gmail.com wrote: In general if I find myself consistently going longer than 75 or 80 characters, I need to refactor my code to make it more manageable. If I have to scroll up five pages to find the beginning of a block, that normally means my code could

Re: 79 chars or more?

2010-08-17 Thread Roy Smith
In article i4deqq$4e...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.2212.1282012525.1673.python-l...@python.org, AK wrote: As monitors are getting bigger, is there a general change in opinion on the 79 chars limit in source files?

Re: Python why questions

2010-08-17 Thread Lie Ryan
On 08/16/10 21:54, David Cournapeau wrote: On Mon, Aug 16, 2010 at 9:53 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: On Aug 7, 2010, at 9:14 PM, John Nagle wrote: The languages which have real multidimensional arrays, rather than arrays of arrays, tend to use 1-based subscripts.

Re: 79 chars or more?

2010-08-17 Thread Martin Gregorie
On Tue, 17 Aug 2010 13:00:51 +1000, James Mills wrote: Roy, under normal circumstances I would agree with you and have a different opinion. However being vision impaired restricts the available width (irregardless of the width of the monitor) of text I'm able to view at once. I'm with James

Re: Opposite of split

2010-08-17 Thread Stefan Schwarzer
Hi Alex, On 2010-08-16 18:44, Alex van der Spek wrote: Anybody catches any other ways to improve my program (attached), you are most welcome. Help me learn, that is one of the objectives of this newsgroup, right? Or is it all about exchanging the next to impossible solution to the never to

Python for MultiTouch!

2010-08-17 Thread Ron
Along with the news of Unbuntu supporting multitouch, I saw this and just had to share, I think its really nice: PyMT http://the-space-station.com/2010/8/16/python-multitouch:-pymt-0-5-released -- http://mail.python.org/mailman/listinfo/python-list

Re: 79 chars or more?

2010-08-17 Thread Stefan Schwarzer
Hi Neil, On 2010-08-17 14:42, Neil Cerutti wrote: On 2010-08-17, Michael Torrie torr...@gmail.com wrote: In general if I find myself consistently going longer than 75 or 80 characters, I need to refactor my code to make it more manageable. If I have to scroll up five pages to find the

scrapelib for web scraping

2010-08-17 Thread Ron
Shameless plug for a web scraping tool my son is involved in creating, called scrapelib. He is on leave from university and is a consultant for the Sunlight Foundation creating something called the Fifty States Project to monitor lobbyist money to state governments in the USA.

Podcast about Python's versions and implementations

2010-08-17 Thread Ron
New podcast up is a look at the various versions and implementations of Python, including Python 3, Python 2, PyPy, IronPython, Jython, Stackless, Psycho, Shedskin, Cython, Unladen Swallow, Berp, etc. http://www.awaretek.com/python/ Ron -- http://mail.python.org/mailman/listinfo/python-list

Re: Python why questions

2010-08-17 Thread Robert Kern
On 8/16/10 11:10 PM, Steven D'Aprano wrote: On Mon, 16 Aug 2010 22:56:20 -0500, Robert Kern wrote: On 8/16/10 9:29 PM, Roy Smith wrote: In articlei4cqg0$ol...@lust.ihug.co.nz, Lawrence D'Oliveirol...@geek-central.gen.new_zealand wrote: In

Re: 79 chars or more?

2010-08-17 Thread Neil Cerutti
On 2010-08-17, Stefan Schwarzer sschwar...@sschwarzer.net wrote: Hi Neil, On 2010-08-17 14:42, Neil Cerutti wrote: Looking through my code, the split-up lines almost always include string literals or elimination of meaningless temporary variables, e.g.: self.expiration_date =

Re: Opposite of split

2010-08-17 Thread Neil Cerutti
On 2010-08-17, Stefan Schwarzer sschwar...@sschwarzer.net wrote: Hi Alex, On 2010-08-16 18:44, Alex van der Spek wrote: Anybody catches any other ways to improve my program (attached), you are most welcome. Help me learn, that is one of the objectives of this newsgroup, right? Or is it all

Re: 79 chars or more?

2010-08-17 Thread AK
On 08/17/2010 10:28 AM, Stefan Schwarzer wrote: Hi Neil, On 2010-08-17 14:42, Neil Cerutti wrote: On 2010-08-17, Michael Torrietorr...@gmail.com wrote: In general if I find myself consistently going longer than 75 or 80 characters, I need to refactor my code to make it more manageable. If I

Re: 79 chars or more?

2010-08-17 Thread D'Arcy J.M. Cain
On Tue, 17 Aug 2010 16:28:02 +0200 Stefan Schwarzer sschwar...@sschwarzer.net wrote: I'd probably reformat this to self.expiration_date = translate_date( find(response, 'MPNExpirationDate').text, '%Y-%m-%d', '%m%d%Y') or even

Re: EOFError with fileinput

2010-08-17 Thread Alex van der Spek
Thanks all! I understand better now. I had no idea that EOFError was an exception. I was looking for a function to tell me when the end of a sequential file is reached as in all of the 4 programming languages that I do know this is a requirement. Will modify my program accordingly. Alex van

Re: Opposite of split

2010-08-17 Thread Grant Edwards
On 2010-08-17, Neil Cerutti ne...@norwich.edu wrote: On 2010-08-17, Stefan Schwarzer sschwar...@sschwarzer.net wrote: Hi Alex, On 2010-08-16 18:44, Alex van der Spek wrote: Anybody catches any other ways to improve my program (attached), you are most welcome. Help me learn, that is one of

Python Developer - HFT Trading firm - Chicago, IL

2010-08-17 Thread Rich Moss
Python developer needed for math/trading applications and research at leading HFT firm. The person we are searching for will have a strong background with python programming and the ability to work with very large historical datasets. You should have a very strong math background as well. This

Re: 79 chars or more?

2010-08-17 Thread Stefan Schwarzer
On 2010-08-17 17:44, AK wrote: On 08/17/2010 10:28 AM, Stefan Schwarzer wrote: I'd probably reformat this to self.expiration_date = translate_date( find(response, 'MPNExpirationDate').text, '%Y-%m-%d', '%m%d%Y') or even self.expiration_date

Open a command pipe for reading

2010-08-17 Thread Rodrick Brown
I have a fairly large file 1-2GB in size that I need to process line by line but I first need to convert the file to text using a 3rd party tool that prints the records also line by line. I've tried using Popen to do this with no luck. I'm trying to simulate /bin/foo myfile.dat And as the

Re: 79 chars or more?

2010-08-17 Thread AK
On 08/17/2010 12:21 PM, Stefan Schwarzer wrote: On 2010-08-17 17:44, AK wrote: On 08/17/2010 10:28 AM, Stefan Schwarzer wrote: I'd probably reformat this to self.expiration_date = translate_date( find(response, 'MPNExpirationDate').text, '%Y-%m-%d',

Re: 79 chars or more?

2010-08-17 Thread Neil Cerutti
On 2010-08-17, AK andrei@gmail.com wrote: After all, I think it's a matter of balance between readability, expressiveness and succinctness. If I split a function in two, that still means that understanding the functionality of the code will require scrolling around and looking at the

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Standish P
On Aug 16, 4:20 am, Malcolm McLean malcolm.mcle...@btinternet.com wrote: On Aug 16, 10:20 am, Standish P stnd...@gmail.com wrote: [Q] How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ? Most programs can be written so that most of their memory

Re: passing variables as object attributes

2010-08-17 Thread Vikas Mahajan
I got the concept to get and set object attributes and now can handle similar problems effectively. Thanks to all for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Standish P
Garbage collection doesn't use a stack. It uses a heap, which is in the abstract a collection of memory blocks of different lengths, divided into two lists, generally represented as linked lists: 1.  A list of blocks that are free and may be used to store new data 2.  A list of blocks that

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Standish P
On Aug 16, 11:09 am, Elizabeth D Rather erat...@forth.com wrote: On 8/15/10 10:33 PM, Standish P wrote: If Forth is a general processing language based on stack, is it possible to convert any and all algorithms to stack based ones and thus avoid memory leaks since a pop automatically

Re: Python why questions

2010-08-17 Thread Martin Gregorie
On Tue, 17 Aug 2010 10:22:27 -0500, Robert Kern wrote: On 8/16/10 11:10 PM, Steven D'Aprano wrote: On Mon, 16 Aug 2010 22:56:20 -0500, Robert Kern wrote: On 8/16/10 9:29 PM, Roy Smith wrote: In articlei4cqg0$ol...@lust.ihug.co.nz, Lawrence D'Oliveirol...@geek-central.gen.new_zealand

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread James Kanze
On Aug 17, 6:21 pm, Standish P stnd...@gmail.com wrote: Garbage collection doesn't use a stack. It uses a heap, which is in the abstract a collection of memory blocks of different lengths, divided into two lists, generally represented as linked lists: 1. A list of blocks that are free

[SOLVED]: Copying a file with a question mark in it's name in Windows

2010-08-17 Thread drodrig
On Aug 12, 9:16 am, Aleksey alekse...@gmail.com wrote: On 12 авг, 18:49,drodrigdrod...@magicbrain.com wrote: A python script I use to backup files on a Windows 2003 server occasionally fails to retrieve the size of a file with a question mark in the name. The exception I get is OSError

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Standish P
On Aug 17, 1:17 am, torb...@diku.dk (Torben Ægidius Mogensen) wrote: Standish P stnd...@gmail.com writes: [Q] How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ? Because a stack has push and pop, it is able to release and allocate memory. We envisage

Re: 79 chars or more?

2010-08-17 Thread Almar Klein
On 17 August 2010 18:43, AK andrei@gmail.com wrote: On 08/17/2010 12:21 PM, Stefan Schwarzer wrote: On 2010-08-17 17:44, AK wrote: On 08/17/2010 10:28 AM, Stefan Schwarzer wrote: I'd probably reformat this to self.expiration_date = translate_date(

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Brad
On Aug 17, 10:34 am, Standish P stnd...@gmail.com wrote: On Aug 16, 11:09 am, Elizabeth D Rather erat...@forth.com wrote: How are these heaps being implemented ? Is there some illustrative code or a book showing how to implement these heaps in C for example ? Forth does not use a heap, except

Re: 79 chars or more?

2010-08-17 Thread Terry Reedy
On 8/17/2010 2:26 PM, Almar Klein wrote: On a related note, why is the limit mentioned in PEP8 79 chars, and not 80? I never understood this :) A newline char or block or underline cursor makes 80. The importance depended on the terminal. 80 chars on the last line could especially be a

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Standish P
On Aug 16, 12:20 am, Standish P stnd...@gmail.com wrote: [Q] How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ? Because a stack has push and pop, it is able to release and allocate memory. We envisage an exogenous stack which has malloc() associated with

Re: 79 chars or more?

2010-08-17 Thread MRAB
Almar Klein wrote: [snip] I am in favor of the 80-char limit also. Besides the arguments listed above, when using an IDE it gives you that extra horizontal space to fit some IDE specific tools (such as source structure). I must admit that I'm sometimes slightly frustrated when an

Re: 79 chars or more?

2010-08-17 Thread Terry Reedy
On 8/17/2010 3:47 AM, Lawrence D'Oliveiro wrote: In messagemailman.2212.1282012525.1673.python-l...@python.org, AK wrote: As monitors are getting bigger, is there a general change in opinion on the 79 chars limit in source files? WHAT 79-character limit in source files? Only for stdlib.

Re: bash: syntax error near unexpected token

2010-08-17 Thread Hans Mulder
Benjamin Kaplan wrote: On Mon, Aug 16, 2010 at 11:33 PM, kreglet kreg...@gmail.com wrote: desktop:~/bin$ modtest.py desktop:~/bin$ evenodd(45) bash: syntax error near unexpected token `45' And this is what's supposed to happen any time you try this in any shell. When you call evenodd, bash

Re: Opposite of split

2010-08-17 Thread News123
On 08/17/2010 05:46 PM, Grant Edwards wrote: On 2010-08-17, Neil Cerutti ne...@norwich.edu wrote: On 2010-08-17, Stefan Schwarzer sschwar...@sschwarzer.net wrote: Hi Alex, On 2010-08-16 18:44, Alex van der Spek wrote: Anybody catches any other ways to improve my program (attached), you are

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread John Kelly
On Tue, 17 Aug 2010 11:53:27 -0700 (PDT), Standish P stnd...@gmail.com wrote: Another way to pose my question, as occurred to me presently is to ask if a stack is a good abstraction for programming ? Certainly, it is the main abstraction in Forth and Postscript and implementable readily in C,C++

Re: 79 chars or more?

2010-08-17 Thread Almar Klein
A reason not mentioned much is that some people have trouble following packed lines that are too much longer. Wide-page textbooks routinely put text in two columns for easier reading. This is less of a factor with jagged edge text, but if the limit were increased to say 150, there would be

Re: 79 chars or more?

2010-08-17 Thread Almar Klein
If the display is limited to 80 characters then after printing the 80th the cursor will be at the start of the next line and the newline will cause the display to leave a blank line (unless the display has some intelligence and supports pending newlines, of course). Ahah! So Windows users

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread John Passaniti
On Aug 17, 2:53 pm, Standish P stnd...@gmail.com wrote: Another way to pose my question, as occurred to me presently is to ask if a stack is a good abstraction for programming ? Certainly, it is the main abstraction in Forth and Postscript and implementable readily in C,C++ and I assume

Re: 79 chars or more?

2010-08-17 Thread Stefan Schwarzer
Hi Andrei, On 2010-08-17 18:43, AK wrote: But let me ask you, would you really prefer to have: self.expiration_date = translate_date( find(response, 'MPNExpirationDate').text, '%Y-%m-%d', '%m%d%Y') (or the 4-line version of this above), even when

Re: 79 chars or more?

2010-08-17 Thread AK
On 08/17/2010 03:32 PM, Stefan Schwarzer wrote: Hi Andrei, On 2010-08-17 18:43, AK wrote: But let me ask you, would you really prefer to have: self.expiration_date = translate_date( find(response, 'MPNExpirationDate').text, '%Y-%m-%d', '%m%d%Y')

Python 2.6.6 release candidate 2 now available.

2010-08-17 Thread Barry Warsaw
Hello fellow Python enthusiasts, The source tarballs and Windows installers for the second (and hopefully last) Python 2.6.6 release candidate is now available: http://www.python.org/download/releases/2.6.6/ We've had a handful of important fixes since rc1, and of course a huge number of

Re: Open a command pipe for reading

2010-08-17 Thread Chris Rebert
On Tue, Aug 17, 2010 at 9:40 AM, Rodrick Brown rodrick.br...@gmail.com wrote: I have a fairly large file 1-2GB in size that I need to process line by line but I first need to convert the file to text using a 3rd party tool that prints the records also line by line. I've tried using Popen to

subprocess.Popen calling httpd reload never finishes

2010-08-17 Thread Nan
Hi folks -- I have a Python script running under Apache/mod_wsgi that needs to reload Apache configs as part of its operation. The script continues to execute after the subprocess.Popen call. The communicate() method returns the correct text (Reloading httpd: [ OK ]), and I get a returncode

Re: Open a command pipe for reading

2010-08-17 Thread Thomas Jollans
On Tuesday 17 August 2010, it occurred to Rodrick Brown to exclaim: I have a fairly large file 1-2GB in size that I need to process line by line but I first need to convert the file to text using a 3rd party tool that prints the records also line by line. I've tried using Popen to do this

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Standish P
On Aug 17, 12:32 pm, John Passaniti john.passan...@gmail.com wrote: On Aug 17, 2:53 pm, Standish P stnd...@gmail.com wrote: Another way to pose my question, as occurred to me presently is to ask if a stack is a good abstraction for programming ? Certainly, it is the main abstraction in

Looking for an appropriate encoding standard that supports all languages

2010-08-17 Thread ata.jaf
I am developing a little program in Mac with wxPython. But I have problems with the characters that are not in ASCII. Like some special characters in French or Turkish. So I am looking for a way to solve this. Like an encoding standard that supports all languages. Or some other way. Thanks Ata

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Standish P
On Aug 17, 1:19 pm, Standish P stnd...@gmail.com wrote: On Aug 17, 12:32 pm, John Passaniti john.passan...@gmail.com wrote: On Aug 17, 2:53 pm, Standish P stnd...@gmail.com wrote: Another way to pose my question, as occurred to me presently is to ask if a stack is a good abstraction

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread Elizabeth D Rather
On 8/17/10 10:19 AM, Standish P wrote: On Aug 17, 12:32 pm, John Passanitijohn.passan...@gmail.com wrote: ... It is true that the other languages such as F/PS also have borrowed lists from lisp in the name of nested-dictionaries and mathematica calls them nested-tables as its fundamental data

Re: Looking for an appropriate encoding standard that supports all languages

2010-08-17 Thread Thomas Jollans
On Tuesday 17 August 2010, it occurred to ata.jaf to exclaim: I am developing a little program in Mac with wxPython. But I have problems with the characters that are not in ASCII. Like some special characters in French or Turkish. So I am looking for a way to solve this. Like an encoding

Re: looping through possible combinations of McNuggets packs of 6, 9 and 20

2010-08-17 Thread Baba
On Aug 16, 6:28 pm, cbr...@cbrownsystems.com cbr...@cbrownsystems.com wrote: First, suppose d = gcd(x, y, z); then for some x', y', z' we have that x = d*x', y = d*y', z = d*z'; and so for any a, b, c: could you explain the notation? what is the difference btw x and x' ? what is x

Re: EXOR or symmetric difference for the Counter class

2010-08-17 Thread Paddy
On 17 Aug, 02:29, Raymond Hettinger pyt...@rcn.com wrote: [Paddy] Lets say you have two *sets* of integers representing two near-copies of some system, then a measure of their difference could be calculated as: len(X.symmetric_difference(Y)) / (len(X) + len(Y)) * 100 % If the two

Re: Python why questions

2010-08-17 Thread Roy Smith
In article i4ehad$k6...@localhost.localdomain, Martin Gregorie mar...@address-in-sig.invalid wrote: Roy wasn't using numpy/Python semantics but made-up semantics (following Martin Gregorie's made-up semantics to which he was replying) which treat the step size as a true size, not a size

Re: Python why questions

2010-08-17 Thread Roy Smith
In article 4c6a8cf...@dnews.tpgi.com.au, Lie Ryan lie.1...@gmail.com wrote: On 08/16/10 21:54, David Cournapeau wrote: On Mon, Aug 16, 2010 at 9:53 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: On Aug 7, 2010, at 9:14 PM, John Nagle wrote: The languages which have real

Re: 79 chars or more?

2010-08-17 Thread Nobody
On Mon, 16 Aug 2010 22:35:49 -0400, AK wrote: As monitors are getting bigger, is there a general change in opinion on the 79 chars limit in source files? I've experimented with 98 characters per line and I find it quite a bit more comfortable to work with that length, even though sometimes I

Re: Python why questions

2010-08-17 Thread geremy condra
On Tue, Aug 17, 2010 at 7:59 AM, Lie Ryan lie.1...@gmail.com wrote: On 08/16/10 21:54, David Cournapeau wrote: On Mon, Aug 16, 2010 at 9:53 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: On Aug 7, 2010, at 9:14 PM, John Nagle wrote:  The languages which have real multidimensional

Need to import stuff

2010-08-17 Thread abhijeet thatte
Hi, I need to import few files depending on the user input. For eg if user gives an input as abcd then I will have * import abcd.py.* Can not have any hard coding in the code. Does any one know how to solve the problem. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Need to import stuff

2010-08-17 Thread Jerry Hill
On Tue, Aug 17, 2010 at 6:21 PM, abhijeet thatte abhijeet.tha...@gmail.com wrote: Hi, I need to import few files depending on the user input. For eg if user gives an input as abcd then I will have  import abcd.py. Can not have any hard coding in the code. Does any one know how to solve the

Re: EXOR or symmetric difference for the Counter class

2010-08-17 Thread Paddy
On Aug 17, 10:47 pm, Paddy paddy3...@googlemail.com wrote: On 17 Aug, 02:29, Raymond Hettinger pyt...@rcn.com wrote: [Paddy] Lets say you have two *sets* of integers representing two near-copies of some system, then a measure of their difference could be calculated as:

Fwd: Need to import stuff

2010-08-17 Thread abhijeet thatte
Hi, Thanks for the reply. But I guess it does not support nested file paths. If user gives 'abcd' then I need to import */Do/Stuff/abcd*. Out of which only *abcd is taken run time. Do and Stuff are fixed. * *I got an error *ImportError: Import by filename is not supported.. Any solution?? On

Re: EXOR or symmetric difference for the Counter class

2010-08-17 Thread Paddy
On Aug 17, 2:29 am, Raymond Hettinger pyt...@rcn.com wrote: I would like to see someone post a subclass to the ASPN Cookbook that adds a number of interesting, though not common operations.  Your symmetric_difference() method could be one.  A dot_product() operation could be another.  

0 length field in time string

2010-08-17 Thread Rodrick Brown
Anyone know why I'm getting the following error when trying to parse the following string is there a better method to use? #57=2010081708240065 - sample string passed to fmt_datetime def fmt_datetime(tag57): tag57 = tag57[3:len(tag57)] year= int ( tag57[0:4] ) mon = int

Re: 0 length field in time string

2010-08-17 Thread MRAB
Rodrick Brown wrote: Anyone know why I'm getting the following error when trying to parse the following string is there a better method to use? #57=2010081708240065 - sample string passed to fmt_datetime def fmt_datetime(tag57): tag57 = tag57[3:len(tag57)] year= int (

Re: subprocess.Popen calling httpd reload never finishes

2010-08-17 Thread Albert Hopkins
On Tue, 2010-08-17 at 12:55 -0700, Nan wrote: Hi folks -- I have a Python script running under Apache/mod_wsgi that needs to reload Apache configs as part of its operation. The script continues to execute after the subprocess.Popen call. The communicate() method returns the correct text

Re: update of elements in GUI

2010-08-17 Thread woooee
On Aug 16, 9:07 pm, Jah_Alarm jah.al...@gmail.com wrote: hi, I've already asked this question but so far the progress has been small. I'm running Tkinter. I have some elements on the screen (Labels, most importantly) which content has to be updated every iteration of the algorithm run, e.g.

Re: question about pdb assignment statements

2010-08-17 Thread Steve Ferg
Thanks mucho!! -- http://mail.python.org/mailman/listinfo/python-list

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-17 Thread John Passaniti
On Aug 17, 4:19 pm, Standish P stnd...@gmail.com wrote: It is true that the other languages such as F/PS also have borrowed lists from lisp in the name of nested-dictionaries and mathematica calls them nested-tables as its fundamental data structure. No. you are contradicting an

Re: Python why questions

2010-08-17 Thread Russ P.
On Aug 7, 5:54 am, D'Arcy J.M. Cain da...@druid.net wrote: Would said beginner also be surprised that a newborn baby is zero years old or would it be more natural to call them a one year old?  Zero based counting is perfectly natural. You're confusing continuous and discrete variables. Time

String substitution VS proper mysql escaping

2010-08-17 Thread Νίκος
=== cursor.execute( ''' SELECT host, hits, date FROM visitors WHERE page = '%s' ORDER BY date DESC ''' % (page) ) === Someone told me NOT to do string substitution (%) on SQL statements and to let MySQLdb do it for me, with proper escaping

Re: String substitution VS proper mysql escaping

2010-08-17 Thread Daniel Kluev
2010/8/18 Νίκος nikos.the.gr...@gmail.com a) I wanted to ask what is proper escaping mean and Proper escaping means that value is wrapped in quotes properly, and quotes and backslashes (or any other special to RDBMS symbol) are escaped with backslashes. why after variable page syntax has a

Re: String substitution VS proper mysql escaping

2010-08-17 Thread Cameron Simpson
On 17Aug2010 20:15, Νίκος nikos.the.gr...@gmail.com wrote: | === | cursor.execute( ''' SELECT host, hits, date FROM visitors WHERE page = | '%s' ORDER BY date DESC ''' % (page) ) | === | | Someone told me NOT to do string substitution (%) on

Re: Need to import stuff

2010-08-17 Thread Daniel Kluev
On Wed, Aug 18, 2010 at 9:40 AM, abhijeet thatte abhijeet.tha...@gmail.comwrote: Hi, Thanks for the reply. But I guess it does not support nested file paths. If user gives 'abcd' then I need to import */Do/Stuff/abcd*. Out of which only *abcd is taken run time. Do and Stuff are fixed. * *I

Re: Need to import stuff

2010-08-17 Thread Abhijeet
Hi, Used imp. It worked. Thanks Daniel Kluev wrote: On Wed, Aug 18, 2010 at 9:40 AM, abhijeet thatte abhijeet.tha...@gmail.com mailto:abhijeet.tha...@gmail.com wrote: Hi, Thanks for the reply. But I guess it does not support nested file paths. If user gives 'abcd' then

[issue9567] Add attribute pointing to wrapped function in functools.update_wrapper

2010-08-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Implemented in r84132 -- stage: unit test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9567

[issue3445] Ignore missing attributes in functools.update_wrapper

2010-08-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Implemented in r84132 (not based on this patch though). -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3445

[issue5215] change value of local variable in debug

2010-08-17 Thread Markus Pröller
Markus Pröller mproel...@googlemail.com added the comment: Hello, I have tested this patch since a while. In the meantime I have switched to Python 2.6.5, but the problem that I described above is still there. Another problem that brought the patch is, that when I move a frame up in the

[issue5215] change value of local variable in debug

2010-08-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In the meantime I have switched to Python 2.6.5, but the problem that I described above is still there. The fix was made for 2.7, and not backported to 2.6. Another problem that brought the patch is, that when I move a frame up in

[issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints)

2010-08-17 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Implemented in r84133 -- resolution: - accepted stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9147

  1   2   3   >