[ANN] PyDSTool 0.88 -- dynamical systems modeling tools

2009-12-28 Thread Rob Clewley
A new release of the dynamical systems modeling toolbox PyDSTool is available from Sourceforge: http://www.sourceforge.net/projects/pydstool/ Highlights from the release notes: * Cleanup of global imports, especially: entire numpy.random and linalg namespaces no longer imported by default *

OSCON 2010: Call for Proposals

2009-12-28 Thread Aahz
Deadline: Feb 1, 2010 OSCON, the O'Reilly Open Source Convention July 19 - 23, 2010 Oregon Convention Center Portland, OR http://post.oreilly.com/rd/9z1zg6ii2gsi1l6cshb1806k2apmotnacpkrk77ttgg Faster, Freer, Smarter: Whatever your Goal, Make It Happen with Open Source More than 2,500 experts,

Re: [ANNOUNCE] PyGTK 2.17.0 - unstable

2009-12-28 Thread Philippe Bouige
Dans comp.lang.python.announce, vous avez écrit : A new unstable development release of the Python bindings for GTK+ has been released. The new release is available from ftp.gnome.org and its mirrors as soon as its synced correctly: http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.17/

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread joy99
On Dec 28, 12:32 pm, Andrew Jonathan Fine eternalsqu...@hotmail.com wrote: To whom it may concern, I am the author of Honeywell Avoids Documentation Costs with Python and other Open Standards! I was laid off by Honeywell several months after I had made my presentation in the 2005 Python

(help)Tkinter, how to make labels scrolling?

2009-12-28 Thread Ren Wenshan
Hi, everyone: I am new to programming and Python and these days I've been working on a tiny program for practice and encountered with a problem. My tiny program read a line from a data file one time, and store it in a list, till the list is full. This is the init. Then when I press

Re: How to iterate the input over a particular size?

2009-12-28 Thread Francesco Bochicchio
On 27 Dic, 22:29, joy99 subhakolkata1...@gmail.com wrote: On Dec 27, 8:42 pm, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sun, Dec 27, 2009 at 9:44 AM, joy99 subhakolkata1...@gmail.com wrote: Dear Group, I am encountering a small question. Suppose, I write the following

Re: How to iterate the input over a particular size?

2009-12-28 Thread Peter Otten
Francesco Bochicchio wrote: Not sure I understood your question, but if you need just to plit a big list in sublists of no more than 9 elements, then you can do someting like: def sublists(biglist, n ): Splits a big list in sublists of max n elements prev_idx = 0; res = []

Re: the need for 64 bits

2009-12-28 Thread Mark Dickinson
On Dec 28, 6:50 am, Mensanator mensana...@aol.com wrote: But with a 64-bit processor, that limitation no longer stops me. i: 11   bits: 10,460,353,205   decimals:  3,148,880,080 i: 12   bits: 94,143,178,829   decimals: 28,339,920,715 Wow! 94 billion bits! 28 billion decimal digits! Of

Re: Question-Answer based web App

2009-12-28 Thread Daniel Fetchinson
I am trying to make a web based application which has a set of questions and answers associated with it such that a report is generated based on the answers a user chooses for each question.It's like facebook apps where we have questions , answers and reports . Should i generate the report

Re: Difference Between Two datetimes

2009-12-28 Thread Roy Smith
In article hh9dmv$f9...@news.eternal-september.org, W. eWatson wolftra...@invalid.com wrote: t1=datetime.datetime.strptime(2009/01/02 13:01:15,%y/%m/%d %H:%M:%S) doesn't do it. ValueError: time data did not match format: data=2009/01/02 13:01:15 fmt=%y/%m/%d %H:%M:%S The first thing that

Re: Simple distributed example for learning purposes?

2009-12-28 Thread Lie Ryan
On 12/27/2009 7:46 AM, Shawn Milochik wrote: The special features of the Shrek DVD showed how the rendering took so much processing power that everyone's workstation was used overnight as a rendering farm. Some kind of video rendering would make a great example. However, it might be a lot of

Re: Difference Between Two datetimes

2009-12-28 Thread W. eWatson
BTW, all times are local to my city. Same time zone. -- http://mail.python.org/mailman/listinfo/python-list

Re: (help)Tkinter, how to make labels scrolling?

2009-12-28 Thread Francesco Bochicchio
On 28 Dic, 09:44, Ren Wenshan renws1...@gmail.com wrote: Hi, everyone:    I am new to programming and Python and these days I've been working on a tiny program for practice and encountered with a problem.    My tiny program read a line from a data file one time, and store it in a list,

Re: easy question, how to double a variable

2009-12-28 Thread Tom Kermode
def twice(parameter = 2) return 4 2009/9/20 daggerdvm dagger...@yahoo.com:  Write the definition of a function  twice , that receives an  int parameter and returns an  int that is twice the value of the parameter. how can i do this -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference Between Two datetimes

2009-12-28 Thread W. eWatson
Lie Ryan wrote: On 12/28/2009 5:42 PM, W. eWatson wrote: You're right. Y. Works fine. The produces datetime.datetime(2009, 1, 2, 13, 1, 15). If I now use t2=datetime.datetime.strptime(2009/01/04 13:01:15,%Y/%m/%d %H:%M:%S) I get tw as datetime.datetime(2009, 1, 4, 13, 1, 15) Then t2-t1 gives,

Python OOP Problem

2009-12-28 Thread Миклухо
Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by Class.forName().newInstance(); For instance: 1)I receive the string: MyObject. 2)o =

Re: Python OOP Problem

2009-12-28 Thread Daniel Fetchinson
Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by Class.forName().newInstance(); For instance: 1)I receive the string: MyObject.

Re: How to iterate the input over a particular size?

2009-12-28 Thread Vlastimil Brom
2009/12/27 joy99 subhakolkata1...@gmail.com: Dear Group, Answers were good. But I am looking for a smarter solution like: for i[:2] in list: etc. or by doing some looping over loop. Do not worry I'll work out the answer. Wishing you a happy day ahead, Regards, Subhabrata. --

Re: Python OOP Problem

2009-12-28 Thread Martin v. Loewis
Миклухо wrote: Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by Class.forName().newInstance(); For instance: 1)I receive the

Re: Perl to Python conversion

2009-12-28 Thread Simon Brunning
2009/12/25 Aahz a...@pythoncraft.com: I'd write an imperial to metric converter in Python  ;-) Should be possible to use unum (http://bit.ly/4X0PwR) to do the conversions. The SI units are already defined - adding in any necessary imperial units should be easy enough. -- Cheers, Simon B. --

Re:

2009-12-28 Thread Simon Brunning
2009/12/24 Yulin yu...@linklater.co.za: Hi when I start my Pc I get error “ The specified module could not be found. LoadLibrary(pythondll)failed Please Help once I have enterd I get the following….C:\Documents and settings\all users\.clamwin\quarentine\python25.DLL PLEASE help I cant load

Re: Difference Between Two datetimes

2009-12-28 Thread Ben Finney
W. eWatson wolftra...@invalid.com writes: Lie Ryan wrote: what's strange about it? the difference between 2009/01/02 13:01:15 and 2009/01/04 13:01:15 is indeed 2 days... Can you elaborate what do you mean by 'strange'? Easily. In one case, it produces a one argument funcion, and the

Re: Simple distributed example for learning purposes?

2009-12-28 Thread Shawn Milochik
On Dec 27, 2009, at 1:23 PM, Lie Ryan wrote: IMHO, that's a poor example. Rather than writing a fuzzy search algorithm, it's easier to write a normalizer before entering data to the index (or before comparing the search string with the corpus' string). -- It does seem like that at

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread Steve Holden
Andrew Jonathan Fine wrote: To whom it may concern, I am the author of Honeywell Avoids Documentation Costs with Python and other Open Standards! I was laid off by Honeywell several months after I had made my presentation in the 2005 Python Conference. Since then I have been unable to

Re: the need for 64 bits

2009-12-28 Thread casevh
On Dec 28, 2:13 am, Mark Dickinson dicki...@gmail.com wrote: On Dec 28, 6:50 am, Mensanator mensana...@aol.com wrote: But with a 64-bit processor, that limitation no longer stops me. i: 11   bits: 10,460,353,205   decimals:  3,148,880,080 i: 12   bits: 94,143,178,829   decimals:

Threading problem / Paramiko problem ?

2009-12-28 Thread mk
Hello everyone, I wrote concurrent ssh client using Paramiko, available here: http://python.domeny.com/cssh.py This program has a function for concurrent remote file/dir copying (class SSHThread, method 'sendfile'). One thread per host specified is started for copying (with a working queue

Re: Difference Between Two datetimes

2009-12-28 Thread Lie Ryan
On 12/29/2009 1:12 AM, Roy Smith wrote: Hint #3: If you don't pay attention to this, you will be bitten twice a year. Not really. Some areas don't have DST and the answer to that is always exactly 5 months. -- http://mail.python.org/mailman/listinfo/python-list

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread Mohammad Tayseer
Hello Andrew, I'm sorry to hear about this. It's really hard to get a job now. I believe that you should try to be more of a Jack of All Trades by learning either Java or .net. Try to increase your experience working on these platforms for part-time or freelance projects to convince employers

Re: Python OOP Problem

2009-12-28 Thread Anthony Tolle
On Dec 28, 7:29 am, Martin v. Loewis mar...@v.loewis.de wrote: In this case (you just started to learn Python), I recommend to take an explicit approach. Create a dictionary that maps class names to classes: name2class = { MyObject : MyObject,                MyOtherObject : MyOtherObject,  

subprocess returncode is masked

2009-12-28 Thread Emmanuel
I'm using Python 2.6 and the new subprocess module to get the exit value of an external executable. It appears the return value given by wait() or poll() operations is masked under Unix: I only get the lower 8 bits. So an exit value of 0x0402 in the C program will be seen as 0x02 in Python.

Re: subprocess returncode is masked

2009-12-28 Thread webtourist
On Dec 28, 11:12 am, Emmanuel emmanuel.gau...@pragmadev.com wrote: I'm using Python 2.6 and the new subprocess module to get the exit value of an external executable. It appears the return value given by wait() or poll() operations is masked under Unix: I only get the lower 8 bits. So an exit

Another Sets Problem

2009-12-28 Thread Victor Subervi
Hi; I'm using python 2.4.3 which apparently requires that I import Set: from sets import Set I've done this. In another script I successfully manipulated MySQL sets by so doing. Here's the code snippet from the script where I was able to call the elements in a for loop: if

Re: Difference Between Two datetimes

2009-12-28 Thread W. eWatson
Roy Smith wrote: In article hh9k6g$pk...@news.eternal-september.org, W. eWatson wolftra...@invalid.com wrote: BTW, all times are local to my city. Same time zone. Yes, but how much time has elapsed between 2009/0/04 13:01:15 and 2009/06/04 13:01:15? Even if I tell you that both timestamps

Re: subprocess returncode is masked

2009-12-28 Thread MRAB
Emmanuel wrote: I'm using Python 2.6 and the new subprocess module to get the exit value of an external executable. It appears the return value given by wait() or poll() operations is masked under Unix: I only get the lower 8 bits. So an exit value of 0x0402 in the C program will be seen as

Re: Simple distributed example for learning purposes?

2009-12-28 Thread Lie Ryan
On 12/28/2009 11:59 PM, Shawn Milochik wrote: With address data: one address may have suite data and the other might not the same city may have multiple zip codes why is that even a problem? You do put suite data and zipcode into different database fields right?

Re: Simple distributed example for learning purposes?

2009-12-28 Thread Shawn Milochik
On Dec 28, 2009, at 11:28 AM, Lie Ryan wrote: I agree fuzzy searches is indispensable in certain cases, but from the way you're describing the issue, it appears that half of your unsolved problems comes due to the poor design of the database. I agree, that the other halves (e.g. typos,

Re: How to iterate the input over a particular size?

2009-12-28 Thread Lie Ryan
On 12/28/2009 8:54 PM, Peter Otten wrote: Francesco Bochicchio wrote: One with lazy chunks: from itertools import chain, islice def chunks(items, n): items = iter(items) for first in items: yield chain((first,), islice(items, n-1)) [list(chunk) for

Re: How to iterate the input over a particular size?

2009-12-28 Thread joy99
On Dec 28, 5:28 pm, Vlastimil Brom vlastimil.b...@gmail.com wrote: 2009/12/27 joy99 subhakolkata1...@gmail.com: Dear Group, Answers were good. But I am looking for a smarter solution like: for i[:2] in list: etc. or by doing some looping over loop. Do not worry I'll work out

Re: Difference Between Two datetimes

2009-12-28 Thread D'Arcy J.M. Cain
On Mon, 28 Dec 2009 08:20:28 -0800 W. eWatson wolftra...@invalid.com wrote: Sort of the opposite of a stopped clock. It's right twice a day. How does one solve the DST problem? Depends on which DST problem you have. There is more than one solution depending on what the problem is. Store and

Re: Python OOP Problem

2009-12-28 Thread Martin v. Loewis
name2class = { MyObject : MyObject, MyOtherObject : MyOtherObject, Etc : Etc } Then, when you receive the string class_name, you do o = name2class[class_name] o.myfunction() The class needs to be instantiated, so the one line should be as follows: o =

Re: Another Sets Problem

2009-12-28 Thread MRAB
Victor Subervi wrote: Hi; I'm using python 2.4.3 which apparently requires that I import Set: from sets import Set I've done this. In another script I successfully manipulated MySQL sets by so doing. Here's the code snippet from the script where I was able to call the elements in a for loop:

Re: Windows, IDLE, __doc_, other

2009-12-28 Thread W. eWatson
It the IDLE shell, it's not possible to retrieve lines entered earlier without copying them. Is there an edit facility? I suggest you download a programmers' editor (like Notepad++ or PsPad) for programming work and use the basic Python interpreter for interactive work. The basic

Re: Another Sets Problem

2009-12-28 Thread Victor Subervi
On Mon, Dec 28, 2009 at 1:41 PM, MRAB pyt...@mrabarnett.plus.com wrote: Victor Subervi wrote: Hi; I'm using python 2.4.3 which apparently requires that I import Set: from sets import Set I've done this. In another script I successfully manipulated MySQL sets by so doing. Here's the code

Re: Windows, IDLE, __doc_, other

2009-12-28 Thread W. eWatson
Lie Ryan wrote: On 12/22/2009 12:06 PM, W. eWatson wrote: ... You must be starting IDLE without subprocess. Did you see this message IDLE 2.6.1 No Subprocess when starting IDLE. Yes, I usually start in a folder where I have my py program files, and do a right-click for IDLE

Re: Simple distributed example for learning purposes?

2009-12-28 Thread Tim Golden
Shawn Milochik wrote: [... suggesting Video rendering and name/address matching ...] Thanks for those, Shawn. The latter's more within my power, but the former certainly has an extra buzz factor. I'll look around to see if I can rustle up some straightforward example of the kind of thing... TJG

Re: Difference Between Two datetimes

2009-12-28 Thread W. eWatson
D'Arcy J.M. Cain wrote: On Mon, 28 Dec 2009 08:20:28 -0800 W. eWatson wolftra...@invalid.com wrote: Sort of the opposite of a stopped clock. It's right twice a day. How does one solve the DST problem? Depends on which DST problem you have. There is more than one solution depending on what

Re: How to iterate the input over a particular size?

2009-12-28 Thread Peter Otten
Lie Ryan wrote: On 12/28/2009 8:54 PM, Peter Otten wrote: Francesco Bochicchio wrote: One with lazy chunks: from itertools import chain, islice def chunks(items, n): items = iter(items) for first in items: yield chain((first,), islice(items, n-1))

Re: how to register with pypi - no such setup.py

2009-12-28 Thread Phlip
On Dec 26, 4:24 pm, Stefan Krah stefan-use...@bytereef.org wrote: It is quite reasonable that changed archives with the same version number are not accepted. Very helpful, not condescending. The message helps you remember to bump your version number. Try: Please either increment your version

Re: the need for 64 bits

2009-12-28 Thread Mensanator
On Dec 28, 9:08 am, casevh cas...@gmail.com wrote: On Dec 28, 2:13 am, Mark Dickinson dicki...@gmail.com wrote: On Dec 28, 6:50 am, Mensanator mensana...@aol.com wrote: But with a 64-bit processor, that limitation no longer stops me. i: 11   bits: 10,460,353,205   decimals:  

Re: Another Sets Problem

2009-12-28 Thread Matt Nordhoff
Victor Subervi wrote: On Mon, Dec 28, 2009 at 1:41 PM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: DON'T USE BARE EXCEPTS! (There are 2 in your code.) There are times when they are *necessary*. No, there aren't. Even if there were, this is not one of those

Re: Windows, IDLE, __doc_, other

2009-12-28 Thread Lie Ryan
On 12/29/2009 5:10 AM, W. eWatson wrote: Lie Ryan wrote: If you're on Windows, don't use the Edit with IDLE right-click hotkey since that starts IDLE without subprocess. Use the shortcut installed in your Start menu. When I go to Start and select IDLE, Saves or Opens want to go into

Re: Difference Between Two datetimes

2009-12-28 Thread W. eWatson
Ben Finney wrote: W. eWatson wolftra...@invalid.com writes: Lie Ryan wrote: what's strange about it? the difference between 2009/01/02 13:01:15 and 2009/01/04 13:01:15 is indeed 2 days... Can you elaborate what do you mean by 'strange'? Easily. In one case, it produces a one argument

Re: Another Sets Problem

2009-12-28 Thread Steve Holden
Victor Subervi wrote: On Mon, Dec 28, 2009 at 1:41 PM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: Victor Subervi wrote: Hi; I'm using python 2.4.3 which apparently requires that I import Set: from sets import Set I've

Re: Another Sets Problem

2009-12-28 Thread Victor Subervi
On Mon, Dec 28, 2009 at 3:07 PM, Steve Holden st...@holdenweb.com wrote: Victor Subervi wrote: On Mon, Dec 28, 2009 at 1:41 PM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: Victor Subervi wrote: Hi; I'm using python 2.4.3 which

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread Propad
Hello Mr. Fine, I just read your mail on the Python Google Group. I've been in situations of searching a job many times now - in the meantime, it's not employments but projects I'm looking for, as I'm working as a contractor. While I'm currently doing reasonably well, I've never been quite

Re: Difference Between Two datetimes

2009-12-28 Thread Roy Smith
In article hh9k6g$pk...@news.eternal-september.org, W. eWatson wolftra...@invalid.com wrote: BTW, all times are local to my city. Same time zone. Yes, but how much time has elapsed between 2009/0/04 13:01:15 and 2009/06/04 13:01:15? Even if I tell you that both timestamps were done in the

Re: Difference Between Two datetimes

2009-12-28 Thread Roy Smith
In article roy-2455bd.09122528122...@news.panix.com, Roy Smith r...@panix.com wrote: Yes, but how much time has elapsed between 2009/0/04 13:01:15 Typo. Should be 2009/01/04 13:01:15. -- http://mail.python.org/mailman/listinfo/python-list

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread eric_dex...@msn.com
On Dec 28, 1:32 am, Andrew Jonathan Fine eternalsqu...@hotmail.com wrote: To whom it may concern, I am the author of Honeywell Avoids Documentation Costs with Python and other Open Standards! I was laid off by Honeywell several months after I had made my presentation in the 2005 Python

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread Andrew Jonathan Fine
On Dec 28, 6:21 am, Steve Holden st...@holdenweb.com wrote: Andrew Jonathan Fine wrote: To whom it may concern, I am the author of Honeywell Avoids Documentation Costs with Python and other Open Standards! I was laid off by Honeywell several months after I had made my presentation in

Re: zope server on ubuntu 9.10

2009-12-28 Thread Chris Withers
S.Selvam wrote: I am using Ubuntu 9.10 and when i tried to install Zope application server with the following , sudo easy_install -i http://download.zope.org/Zope2/index/2.12.1 Zope2 i got an error as shown below, --- . . Reading http://download.zope.org/Zope2/index/2.12.1/ No

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread Rodrick Brown
Move to NYC, Chicago, or Boston and try to land a job working in the financial industry they're always hiring and Python is getting very popular amongst the quantitative and computation finance sectors. You may need to use head hunters two I recommended are Connections NY, Open Systems, and Tek

Re: Author of a Python Success Story Needs a Job!

2009-12-28 Thread John Bokma
Andrew Jonathan Fine eternalsqu...@hotmail.com writes: On Dec 28, 9:20 am, webtourist webtour...@gmail.com wrote: Andrew I'm very sorry to hear your situation. This is, I don't know how else to put it, so hard to believe - that someone like you has been jobless since 2005, well over 2 years

Re: eiger replacement?

2009-12-28 Thread Aahz
In article mailman.1865.1260785205.2873.python-l...@python.org, Robin Becker ro...@reportlab.com wrote: On 12/12/2009 05:38, Tim Roberts wrote: Steven D'Apranost...@remove-this-cybersource.com.au wrote: On Fri, 11 Dec 2009 17:45:24 +, Robin Becker wrote: The current hardware CPU:

Re: DB Table Processor?

2009-12-28 Thread Ed Leafe
On Dec 27, 2009, at 11:31 AM, A. Shore wrote: Folks, I'm considering developing a particular app in Python - I've been working in PHP for some years now - and it will be db-intensive. Whether it's based on sqllite or mySQL is TBD as of right now. One tool that's done me well in the past is

Re: Another Sets Problem

2009-12-28 Thread Steve Holden
Victor Subervi wrote: On Mon, Dec 28, 2009 at 3:07 PM, Steve Holden st...@holdenweb.com [...] However, when I try that in my current script, the script fails. It throws no error, but rather just quits printing to the screen. Here's the code snippet:

Re: Difference Between Two datetimes

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 23:50:30 +1100, Ben Finney wrote: How does one unload this structure to get the seconds and days? It's customary to consult the documentation for questions like that URL:http://docs.python.org/library/datetime.html#datetime.timedelta. No no no, it's customary to annoy

Re: Difference Between Two datetimes

2009-12-28 Thread Peter Otten
W. eWatson wrote: Peter Otten wrote: W. eWatson wrote: This is quirky. t1=datetime.datetime.strptime(20091205_221100,%Y%m%d_%H%M%S) t1 datetime.datetime(2009, 12, 5, 22, 11) type(t1) type 'datetime.datetime' t1: 2009-12-05 22:11:00 type 'datetime.datetime' but in the

Re: Difference Between Two datetimes

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 10:54:46 -0800, W. eWatson wrote: Ben Finney wrote: W. eWatson wolftra...@invalid.com writes: Lie Ryan wrote: what's strange about it? the difference between 2009/01/02 13:01:15 and 2009/01/04 13:01:15 is indeed 2 days... Can you elaborate what do you mean by

Re: Difference Between Two datetimes

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 14:42:21 -0800, W. eWatson wrote: So as long as I don't print it, it's datetime.datetime and I can make calculations or perform operations on it as though it is not a string, but a datetime object? No, it remains a datetime object regardless of whether you print it or

Re: Difference Between Two datetimes

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 23:22:09 +0100, Peter Otten wrote: print some_object first converts some_object to a string invoking str(some_object) which in turn calls the some_object.__str__() method. The resulting string is then written to stdout. In fairness to the OP, that's a misleading way of

clean data [was: Simple distributed example for learning purposes?]

2009-12-28 Thread Ethan Furman
Lie Ryan wrote: On 12/28/2009 11:59 PM, Shawn Milochik wrote: With address data: one address may have suite data and the other might not the same city may have multiple zip codes why is that even a problem? You do put suite data and zipcode into different database fields right?

getting name of passed reference

2009-12-28 Thread Joel Davis
I'm just curious if anyone knows of a way to get the variable name of a reference passed to the function. Put another way, in the example: def MyFunc ( varPassed ): print varPassed; MyFunc(nwVar) how would I get the string nwVar from inside of MyFunc? is it possible? --

Re: getting name of passed reference

2009-12-28 Thread Stephen Hansen
On Mon, Dec 28, 2009 at 3:54 PM, Joel Davis callmeclaud...@gmail.comwrote: I'm just curious if anyone knows of a way to get the variable name of a reference passed to the function. Put another way, in the example: def MyFunc ( varPassed ): print varPassed; MyFunc(nwVar) how would

Re: getting name of passed reference

2009-12-28 Thread Emile van Sebille
On 12/28/2009 3:54 PM Joel Davis said... I'm just curious if anyone knows of a way to get the variable name of a reference passed to the function. For curiosity, sure -- but it's real weak... Put another way, in the example: def MyFunc ( varPassed ): print varPassed;

Re: Difference Between Two datetimes

2009-12-28 Thread W. eWatson
Steven D'Aprano wrote: On Mon, 28 Dec 2009 23:50:30 +1100, Ben Finney wrote: How does one unload this structure to get the seconds and days? It's customary to consult the documentation for questions like that URL:http://docs.python.org/library/datetime.html#datetime.timedelta. No no no,

Re: getting name of passed reference

2009-12-28 Thread Joel Davis
For posterity, I figured out a solution: #!/usr/bin/python import sys from traceback import extract_stack varPassed=varName get def MyFunc(varPassed): try: raise None except: frame = sys._getframe(1) print

Re: Difference Between Two datetimes

2009-12-28 Thread Ben Finney
W. eWatson wolftra...@invalid.com writes: It doesn't seem to be standard practice to more or less teach the environment that Python is in. If they do, it's jumbled around. Most books start with Python itself and skirt the issues of the environment and interaction. There are no Python

Re: getting name of passed reference

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 15:54:04 -0800, Joel Davis wrote: I'm just curious if anyone knows of a way to get the variable name of a reference passed to the function. Put another way, in the example: def MyFunc ( varPassed ): print varPassed; MyFunc(nwVar) how would I get the

Re: a list/re problem

2009-12-28 Thread Aahz
In article mailman.1744.1260564589.2873.python-l...@python.org, Ed Keith e_...@yahoo.com wrote: I have a list call it 'l': l = ['asc', '*nbh*', 'jlsdjfdk', 'ikjh', '*jkjsdfjasd*', 'rewr'] Notice that some of the items in the list start and end with an '*'. I wish to construct a new list, call

Re: getting name of passed reference

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 17:27:21 -0800, Joel Davis wrote: For posterity, I figured out a solution: #!/usr/bin/python import sys from traceback import extract_stack varPassed=varName get def MyFunc(varPassed): try: raise None except:

Re: a list/re problem

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 17:35:22 -0800, Aahz wrote: In article mailman.1744.1260564589.2873.python-l...@python.org, Ed Keith e_...@yahoo.com wrote: I have a list call it 'l': l = ['asc', '*nbh*', 'jlsdjfdk', 'ikjh', '*jkjsdfjasd*', 'rewr'] Notice that some of the items in the list start and end

Re: getting name of passed reference

2009-12-28 Thread Joel Davis
On Dec 28, 8:40 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 28 Dec 2009 17:27:21 -0800, Joel Davis wrote: For posterity, I figured out a solution:   #!/usr/bin/python   import sys   from traceback import extract_stack   varPassed=varName get   def

Re: getting name of passed reference

2009-12-28 Thread Joel Davis
As far as more positive things are concerned, is anyone aware of what the support for _getframe(1) the way I used it is? Does steven have a newer (or older) version than me, maybe? (2.6.2) it seems like the sort of thing that ought to have pretty uniform behavior, but are their certain calls it

Re: Threading problem / Paramiko problem ?

2009-12-28 Thread MRAB
mk wrote: Hello everyone, I wrote concurrent ssh client using Paramiko, available here: http://python.domeny.com/cssh.py This program has a function for concurrent remote file/dir copying (class SSHThread, method 'sendfile'). One thread per host specified is started for copying (with a

Re: getting name of passed reference

2009-12-28 Thread Joel Davis
On Dec 28, 9:37 pm, Joel Davis callmeclaud...@gmail.com wrote: As far as more positive things are concerned, is anyone aware of what the support for _getframe(1) the way I used it is? Does steven have a newer (or older) version than me, maybe? (2.6.2) it seems like the sort of thing that ought

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:02, Daniel Fetchinson fetchin...@googlemail.com wrote: Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:29, Martin v. Loewis mar...@v.loewis.de wrote: Миклухо wrote: Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:29, Martin v. Loewis mar...@v.loewis.de wrote: Миклухо wrote: Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:29, Martin v. Loewis mar...@v.loewis.de wrote: Миклухо wrote: Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by

Re: How to iterate the input over a particular size?

2009-12-28 Thread John Posner
On Sun, 27 Dec 2009 09:44:17 -0500, joy99 subhakolkata1...@gmail.com wrote: Dear Group, I am encountering a small question. Suppose, I write the following code, input_string=raw_input(PRINT A STRING:) string_to_word=input_string.split() len_word_list=len(string_to_word) if len_word_list9:

Re: How to iterate the input over a particular size?

2009-12-28 Thread Ben Finney
John Posner jjpos...@optimum.net writes: I haven't found a generator version of the string function split(). Am I missing something? To my knowledge there isn't one. Both Python 2 and Python 3 document ‘str.split’ as returning a list. -- \ “An idea isn't responsible for the people who

Re: How to iterate the input over a particular size?

2009-12-28 Thread Steven D'Aprano
On Tue, 29 Dec 2009 00:49:50 -0500, John Posner wrote: On Sun, 27 Dec 2009 09:44:17 -0500, joy99 subhakolkata1...@gmail.com wrote: Dear Group, I am encountering a small question. Suppose, I write the following code, input_string=raw_input(PRINT A STRING:)

Re: getting name of passed reference

2009-12-28 Thread Steven D'Aprano
On Mon, 28 Dec 2009 19:28:32 -0800, Joel Davis wrote: my thanks go out to Emile and Mr Hanson for their responses, I think I've found the solution, much shorter as well: #!/usr/bin/python import traceback def testing ( varPassed ): print

Re: getting name of passed reference

2009-12-28 Thread Gabriel Genellina
En Tue, 29 Dec 2009 00:28:32 -0300, Joel Davis callmeclaud...@gmail.com escribió: On Dec 28, 9:37 pm, Joel Davis callmeclaud...@gmail.com wrote: my thanks go out to Emile and Mr Hanson for their responses, I think I've found the solution, much shorter as well: #!/usr/bin/python

[issue7586] Typo in collections documentation

2009-12-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r77084. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7586 ___

[issue7381] subprocess.check_output: docstring has inconsistent leading whitespace

2009-12-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: OK, applied in r77086, r77087. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7381 ___

[issue7569] ctypes doc improvement: c_char_p

2009-12-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Wouldn't a general pointer better be of type c_void_p? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7569 ___

[issue7578] Behavior of operations on a closed file object is not documented correctly

2009-12-28 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I agree; though I would wish for a bit finer-grained I/O related exceptions... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7578 ___

[issue7578] Behavior of operations on a closed file object is not documented correctly

2009-12-28 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7578 ___ ___

[issue7530] doc of multiprocessing.managers is wrong (server_forever)

2009-12-28 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7530 ___ ___

  1   2   >