Removing hidden files and folders with python ...

2008-01-30 Thread Konrad Mühler
Hi, I try to delete a whole directory-tree using shutil.rmtree(...) But there are always the hidden files and folders (e.g. from the svn .svn) left. How can I delete -all- files and folders (also the hidden) with python? Many Thanks Konrad --

Re: starting programs from python script on windows

2008-01-30 Thread Piet van Oostrum
Benedict Verheyen [EMAIL PROTECTED] (BV) wrote: BV Hi, BV i want to automate starting programs on my windows machine and i want BV to do it with windows. BV This is a sample script: BV from subprocess import Popen, PIPE BV import time BV print Starting app 1 BV time.sleep(1) BV try: BV p1

Re: Appropriate use of Property()

2008-01-30 Thread Asun Friere
On Jan 30, 5:03 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: On 29 ene, 23:17, [EMAIL PROTECTED] wrote: Property() can be used to rid ourselves of the extra effort of using two different methods (getAttrib() setAttrib()) for access of an attribute without giving direct access to the

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Santiago Romero
On 30 ene, 08:09, Paul Rubin http://[EMAIL PROTECTED] wrote: Santiago Romero [EMAIL PROTECTED] writes: li = [1,2,3,4,5] filter(lambda x: x != 3, li) [1, 2, 4, 5] I haven't measured it, but this should be the fast solution in all the thread ... li.remove(3) is probably faster.

Form to mail script

2008-01-30 Thread Joe Demeny
I am looking for a python web form to mail script for a public web site - could you recommend one? -- Joe Demeny -- http://mail.python.org/mailman/listinfo/python-list

help using python on Vista

2008-01-30 Thread Safe Alattar
I have no issues using python on XP. However on Vista I cant get the python gui (IDLE) to open! I did some research and found out that I need to unhide .idlerc but I cannot find any hidden files by that name whatsoever. Please help me. Im fairly new to python but I want to get this going. User

Unicode literals to latin-1

2008-01-30 Thread David.Reksten
How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around Fr\u00f8ya.decode('latin-1') but to no avail. .david -- http://mail.python.org/mailman/listinfo/python-list

Re: Web Interface Recommendations

2008-01-30 Thread Bruno Desthuilliers
PurpleServerMonkey a écrit : (snip) Out of the major frameworks is there one that stands out as being particularly well suited for what I'm trying to do? Django and CherryPy are on the short list so I'll give them a detailed look although Pylons does sound rather interesting as well. I

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread cokofreedom
On Jan 30, 9:50 am, Santiago Romero [EMAIL PROTECTED] wrote: On 30 ene, 08:09, Paul Rubin http://[EMAIL PROTECTED] wrote: Santiago Romero [EMAIL PROTECTED] writes: li = [1,2,3,4,5] filter(lambda x: x != 3, li) [1, 2, 4, 5] I haven't measured it, but this should be the

Re: Appropriate use of Property()

2008-01-30 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Property() can be used to rid ourselves of the extra effort of using two different methods (getAttrib() setAttrib()) for access of an attribute without giving direct access to the attribute, NB : properties are for computed attributes, not to avoid giving direct

Re: Unicode literals to latin-1

2008-01-30 Thread Berteun Damman
On Wed, 30 Jan 2008 09:57:55 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around Fr\u00f8ya.decode('latin-1') but to no avail.

Re: Unicode literals to latin-1

2008-01-30 Thread Piet van Oostrum
[EMAIL PROTECTED] (DR) wrote: DR How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? DR I have tried variations around DR Fr\u00f8ya.decode('latin-1') DR but to no avail. You have to use encode instead of decode,

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Peter Schuller
The problem is that we are now back to the identity problem. The class won't actually *BE* org.lib.animal.Monkey. The usage is the same; it works in all cases once you redefine __module__. Who cares what it really is? The cases I listed were just examples. My point was that I wanted it to

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Paul Rubin
Santiago Romero [EMAIL PROTECTED] writes: In a = [1, 2, 3, 3, 3, 4, 3, 3, 2, 3], the filter solution will efectively remove all items with value == 3 while li.remove(3) will only remove the first ocurrence. Hmm, interesting, I didn't realize that (shoulda checked the docs). Thanks! --

SV: Unicode literals to latin-1

2008-01-30 Thread David.Reksten
On 30. januar 2008 10:21, Berteun Damman wrote: On Wed, 30 Jan 2008 09:57:55 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around

Re: Unicode literals to latin-1

2008-01-30 Thread Marc 'BlackJack' Rintsch
On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around Fr\u00f8ya.decode('latin-1') but to no avail. In [388]:

SV: Unicode literals to latin-1

2008-01-30 Thread David.Reksten
On 30. januar 2008 10:48, Marc 'BlackJack' Rintsch wrote: On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around

Re: help using python on Vista

2008-01-30 Thread James Matthews
You need to go into folder options which is in the control panel and there under the view tab click Show hidden files and folders On Jan 30, 2008 9:36 AM, Safe Alattar [EMAIL PROTECTED] wrote: I have no issues using python on XP. However on Vista I cant get the python gui (IDLE) to open! I

Re: Implementation of IBuyable or Interface?

2008-01-30 Thread Marcelo de Moraes Serpa
Hi Gabriel, thanks for the reply. It's hard to tell just with that description. If you have to distinguish between a Product and a Service, specially if you have to do things with one that aren't done with the other (so they have a different set of methods), I'd say they should be different

find nearest time in datetime list

2008-01-30 Thread washakie
Hello, I have a list of datetime objects: DTlist, I have another single datetime object: dt, ... I need to find the nearest DTlist[i] to the dt is there a simple way to do this? There isn't necessarily an exact match... Thanks! .john -- View this message in context:

HI all

2008-01-30 Thread tiwarishravan
I am shravan tiwari, i want to know that how i'll run any python file(*.py) on command prompt r python GUI. i tried this python test.py but i have got error, syntax error. so can i get the solution. -- http://mail.python.org/mailman/listinfo/python-list

Re: find nearest time in datetime list

2008-01-30 Thread Tim Golden
washakie wrote: Hello, I have a list of datetime objects: DTlist, I have another single datetime object: dt, ... I need to find the nearest DTlist[i] to the dt is there a simple way to do this? There isn't necessarily an exact match... code import datetime dates = [datetime.date

Re: find nearest time in datetime list

2008-01-30 Thread Tim Chase
I have a list of datetime objects: DTlist, I have another single datetime object: dt, ... I need to find the nearest DTlist[i] to the dt is there a simple way to do this? There isn't necessarily an exact match... import datetime dates = [datetime.datetime(2007,m, 1) for m in

Re: Trying to understand Python web-development

2008-01-30 Thread Paul Boddie
On 29 Jan, 18:11, walterbyrd [EMAIL PROTECTED] wrote: I don't know much php either, but running a php app seems straight forward enough. I think that this (the ease of PHP application deployment) is one of the things that keeps Python framework developers up at night, regardless of whether the

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Arnaud Delobelle
On Jan 29, 10:59 pm, Paul Hankin [EMAIL PROTECTED] wrote: If I really had to modify it in place (and the condition wasn't really x == 99), how about: bad_indices = [i for i, x in enumerate(a) if x == 99] for bad_index in reversed(bad_indices):     del a[bad_index] Or one could use the trick

Re: Removing Pubic Hair Methods

2008-01-30 Thread Tobiah
class genital: def pubic_hair(self): pass def remove(self): del(self.pubic_hair) Removing pubic hair methods [EMAIL PROTECTED] wrote: Shaving is the most common removing pubic hair method. However, it is not the only one. After you have

Re: Removing Pubic Hair Methods

2008-01-30 Thread Marc 'BlackJack' Rintsch
On Tue, 29 Jan 2008 11:48:38 -0800, Tobiah wrote: class genital: def pubic_hair(self): pass def remove(self): del(self.pubic_hair) I think `pubic_hair` is an attribute instead of a method. Oh, and ``del`` is a statement and not a function. So

Re: Python noob SOS (any [former?] Perlheads out there?)

2008-01-30 Thread kj
In [EMAIL PROTECTED] Reedick, Andrew [EMAIL PROTECTED] writes: Be that as it may, the activation barrier to using Python for my scripting remains too high. =20 I'd written a Perl module to facilitate the writing of scripts. It contained all my boilerplate code for parsing and validating

Tkinter - incremental input ?

2008-01-30 Thread Helmut Jarausch
Hi, I don't want to reinvent the wheel but I cannot find it so far. Many editors have a so-called incremental search feature. As you type characters, elements of a set of strings which fit so far are displayed or at least, the first one of these is displayed. Now I want to do something similar

Re: Python noob SOS (any [former?] Perlheads out there?)

2008-01-30 Thread kj
In [EMAIL PROTECTED] Wildemar Wildenburger [EMAIL PROTECTED] writes: kj wrote: Is there any good reading (to ease the transition) for Perl programmers trying to learn Python? www.diveintopython.org Thanks. Not for Perl programmers specifically, but it looks useful all the same. kynn --

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Arnaud Delobelle
On Jan 30, 11:57 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: n = len(a) for i, x in enumerate(a):     if x == 99: del a[i-n] Oops. That can't work. Don't know what I was thinking here. I probably did had one mental refactoring too many... -- Arnaud --

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Paul Rubin
Neil Cerutti [EMAIL PROTECTED] writes: Or one can put on his bellbottoms, horn-rimmed glasses, and wear a mullet: i = 0 while i len(a): if a[i] == 99: del a[i] else: i += 1 Quadratic time!! Yowch!! Back to the future: def rocket_science(xs): for x in xs: if x !=

Re: refcount

2008-01-30 Thread Sion Arrowsmith
Benjamin [EMAIL PROTECTED] wrote: [ help(sys.getrefcount) says: ] [ ... ] The count returned is generally one higher than you might expect, because it includes the (temporary) reference as an argument to getrefcount(). Are there any cases when it wouldn't? When the temporary reference which

Re: Problem with Tkinter scrollbar callback

2008-01-30 Thread Ivan Van Laningham
HI All-- We've decided that this represents a bug in the tcl/tk library, and there's no workaround. I switched to + and - buttons, which are not as nice aesthetically but work correctly on both Windows Linux. Thanks to everyone for their help. Metta, Ivan On Jan 29, 2008 11:03 AM, Ivan Van

Re: HI all

2008-01-30 Thread Gabriel Genellina
On 30 ene, 09:26, [EMAIL PROTECTED] wrote: I am shravan tiwari, i want to know that how i'll run any python file(*.py) on command prompt r python GUI. i tried this python test.py but i have got error, syntax error. so can i get the solution. This is the right way to run it. If you get a

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Neil Cerutti
On Jan 30, 2008 6:57 AM, Arnaud Delobelle [EMAIL PROTECTED] wrote: Or one could use the trick of counting from the right (untested): n = len(a) for i, x in enumerate(a): if x == 99: del a[i-n] Or one can put on his bellbottoms, horn-rimmed glasses, and wear a mullet: i = 0 while i

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread bearophileHUGS
If you don't want to reinvent the wheel all the time you can use this one: def inplacefilter(pred, alist): inplacefilter(pred, alist): filters the given list like filter(), but works inplace, minimizing the used memory. It returns None. pr = lambda x: x 2 l = []

Re: find nearest time in datetime list

2008-01-30 Thread Boris Borcic
washakie wrote: Hello, I have a list of datetime objects: DTlist, I have another single datetime object: dt, ... I need to find the nearest DTlist[i] to the dt is there a simple way to do this? There isn't necessarily an exact match... Thanks! .john min(DTlist,key=lambda date :

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Neil Cerutti
On 30 Jan 2008 05:20:49 -0800, Paul Rubin http://phr.cx@nospam.invalid wrote: Neil Cerutti [EMAIL PROTECTED] writes: Or one can put on his bellbottoms, horn-rimmed glasses, and wear a mullet: i = 0 while i len(a): if a[i] == 99: del a[i] else: i += 1 Quadratic

Re: comparing two lists, ndiff performance

2008-01-30 Thread Zbigniew Braniecki
[EMAIL PROTECTED] wrote: Zbigniew Braniecki: Is there a way to speed it up? Any easier way? Faster method? This problem is a bit messy. Maybe it's better to sidestep the problem, and not use a list, and create an object that wraps the list, so it always keeps an updated record of what

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Steven D'Aprano
On Tue, 29 Jan 2008 13:44:33 -0600, Robert Kern wrote: Carl Banks wrote: On Jan 29, 7:48 am, Peter Schuller [EMAIL PROTECTED] wrote: You can also put, in animal/__init__.py: from monkey import Monkey and now you can refer to it as org.lib.animal.Monkey, but keep the implementation of

Re: comparing two lists, ndiff performance

2008-01-30 Thread Gabriel Genellina
On 29 ene, 22:47, Zbigniew Braniecki [EMAIL PROTECTED] wrote: The new one is of course much better and cleaner (the old one is bloated), but I'm wondering if there is a faster way to compare two lists and find out what was added, what was removed, what was changed. I can simply iterate

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Steven D'Aprano
On Tue, 29 Jan 2008 06:48:59 -0600, Peter Schuller wrote: You can also put, in animal/__init__.py: from monkey import Monkey and now you can refer to it as org.lib.animal.Monkey, but keep the implementation of Monkey class and all related stuff into .../animal/monkey.py The problem is

Re: Removing Pubic Hair Methods

2008-01-30 Thread Gerardo Herzig
Sion Arrowsmith wrote: Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Tue, 29 Jan 2008 11:48:38 -0800, Tobiah wrote: class genital: def pubic_hair(self): pass def remove(self): del(self.pubic_hair) I think `pubic_hair` is an attribute

Re: optional static typing for Python

2008-01-30 Thread Wildemar Wildenburger
Kay Schluehr wrote: On Jan 30, 12:38 am, Wildemar Wildenburger [EMAIL PROTECTED] wrote: Python has a JIT right no You mean in the Java-sense (outputting native machine code)? /W Sure. http://psyco.sourceforge.net/ Oh, switcheroo! :) /W --

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread cokofreedom
Anyone else noticed that the OP has not actually replied to any of the suggestions... -- http://mail.python.org/mailman/listinfo/python-list

Re: find nearest time in datetime list

2008-01-30 Thread Tim Chase
Boris Borcic wrote: min(DTlist,key=lambda date : abs(dt-date)) In Python2.4: Traceback (most recent call last): File stdin, line 1, in ? TypeError: min() takes no keyword arguments Looks like min() only started taking keywords (key) from Python2.5 forward. But the min() solution

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Gabriel Genellina
On 30 ene, 12:00, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: I call that a bug in the inspect module. In fact, looking at the source for the findsource() function, I can see no fewer than two bugs, just in the way it handles classes: (1) it assumes that the only way to

Re: Removing Pubic Hair Methods

2008-01-30 Thread Wildemar Wildenburger
Gerardo Herzig wrote: I will use genital().extend(), thats for shure ^^ Well, you never go wrong with apply(genital(), females), do you? /W -- http://mail.python.org/mailman/listinfo/python-list

Re: find nearest time in datetime list

2008-01-30 Thread washakie
Thanks all! This is terrific, and a quick response... I have to go with the 2.4 version, but thanks to everyone... Tim Golden-4 wrote: washakie wrote: Hello, I have a list of datetime objects: DTlist, I have another single datetime object: dt, ... I need to find the nearest DTlist[i]

Re: Removal of element from list while traversing causes the next element to be skipped

2008-01-30 Thread Hrvoje Niksic
Paul Rubin http://[EMAIL PROTECTED] writes: Quadratic time!! Yowch!! Back to the future: def rocket_science(xs): for x in xs: if x != 99: yield x a[:] = list(rocket_science(a)) I call useless use of list! a[:] = rocket_science(a) :-) --

Re: Removing hidden files and folders with python ...

2008-01-30 Thread Gabriel Genellina
On 30 ene, 06:21, Konrad Mühler [EMAIL PROTECTED] wrote: I try to delete a whole directory-tree using shutil.rmtree(...) But there are always the hidden files and folders (e.g. from the svn .svn) left. How can I delete -all- files and folders (also the hidden) with python? I assume you use

Re: comparing two lists, ndiff performance

2008-01-30 Thread bearophileHUGS
Zbigniew Braniecki: Is there a way to speed it up? Any easier way? Faster method? This problem is a bit messy. Maybe it's better to sidestep the problem, and not use a list, and create an object that wraps the list, so it always keeps an updated record of what changes are done... but you have to

Re: Unicode literals to latin-1

2008-01-30 Thread Gabriel Genellina
On 30 ene, 07:54, [EMAIL PROTECTED] wrote: On 30. januar 2008 10:48, Marc 'BlackJack' Rintsch wrote: On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya?

Re: Removing Pubic Hair Methods

2008-01-30 Thread Sion Arrowsmith
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Tue, 29 Jan 2008 11:48:38 -0800, Tobiah wrote: class genital: def pubic_hair(self): pass def remove(self): del(self.pubic_hair) I think `pubic_hair` is an attribute instead of a method. Oh, and ``del``

Anyone Know Unicode? Help!

2008-01-30 Thread Victor Subervi
Hi; Second post on this. Googling shows many others with same problem, but no answers! Help! New to unicode. Got this error: Traceback (most recent call last): File stdin, line 1, in module File stdin, line 29, in tagWords File /usr/local/lib/python2.5/codecs.py, line 303, in write

SV: Unicode literals to latin-1

2008-01-30 Thread David.Reksten
On 30. januar 2008 14:31, Gabriel Genellina wrote: On 30 ene, 07:54, [EMAIL PROTECTED] wrote: On 30. januar 2008 10:48, Marc 'BlackJack' Rintsch wrote: On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such

Sine Wave Curve Fit Question

2008-01-30 Thread Iain Mackay
Python Folks I'm a newbie to Python and am looking for a library / function that can help me fit a 1D data vector to a sine wave. I know the frequency of the wave, so its really only phase and amplitude information I need. I can't find anything in the most widely known libraries (they seem

Re: Tkinter - incremental input ?

2008-01-30 Thread Eric Brunel
On Wed, 30 Jan 2008 13:32:00 +0100, Helmut Jarausch [EMAIL PROTECTED] wrote: [snip] While I can bind 'Key' to a callback, I haven't figured out how to get (and later on set) the cursor within the Entry widget. In other words I need to know at which character position the last character was

Re: Removing Pubic Hair Methods

2008-01-30 Thread Steve Holden
Wildemar Wildenburger wrote: Gerardo Herzig wrote: I will use genital().extend(), thats for shure ^^ Well, you never go wrong with apply(genital(), females), do you? /W That's enough genitalia [ed] -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: Trouble loading dll via ctypes

2008-01-30 Thread Helmut Jarausch
subopt inTheVicinityOf geemail.com wrote: I'm trying to load a dll via ctypes by doing this: cdll.LoadLibrary('/path/to/mylib.so') But i'm getting this: /path/to/mylib.so: cannot open shared object file: No such file or directory What am i doing wrong? The dll in question

Re: Python noob SOS (any [former?] Perlheads out there?)

2008-01-30 Thread grflanagan
On Jan 29, 5:39 pm, kj [EMAIL PROTECTED] wrote: [...] It's not the Python syntax that I'm having problems with, but rather with larger scale issues such as the structuring of packages, techniques for code reuse, test suites, the structure of distributions,... Python and Perl seem to come from

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Carl Banks
On Jan 30, 4:31 am, Peter Schuller [EMAIL PROTECTED] wrote: I don't know Python internals enough to state of believe with any authority wither, let's say, stomping __module__ and hacking sys.modules would be enough to *truly* do it correctly in a proper way such that it is entirely

MySQLdb and column names

2008-01-30 Thread beef
Hello all, I am using MySQLdb 1.2.2 and have a question about the construction of the dictionary keys of a result set. Here is an example query, from which you may intuit some of the structure of the tables: SELECT shots.*, users.*, sequences.*, jobs.* FROM shots LEFT JOIN users ON

Re: MySQLdb and column names

2008-01-30 Thread beef
change: I would prefer to have the key names consistent, so that event the to: I would prefer to have the key names consistent, so that *even* the -- http://mail.python.org/mailman/listinfo/python-list

Re: Python plugins for netbeans 6 IDE?

2008-01-30 Thread dzizes
Did you managed to work out NetBeans and Python? Ken McDonald wrote: Do any such exist? And do you find them worthwhile? I couldn't see any browsing the netbeans pages, but that doesn't mean they're not out there... Thanks, Ken --

event handling

2008-01-30 Thread Peter Nemeth
Hi , I am working on a stellar spectral analysis pipeline in Python. My OS is Suse 10.0, and i use Python 2.5 . I have found difficulties with keyboard event handling. My code communicates with the user through an xterm window and shows graphs in a Gnuplot window. At a certain point i start

Re: Sine Wave Curve Fit Question

2008-01-30 Thread marek . rocki
Iain Mackay napisal(a): Python Folks I'm a newbie to Python and am looking for a library / function that can help me fit a 1D data vector to a sine wave. I know the frequency of the wave, so its really only phase and amplitude information I need. I can't find anything in the most widely

Updating documents in PyLucene

2008-01-30 Thread gefafwisp
Hi all, The way that Lucene (and by extension, PyLucene) seems to work is that updates to documents are implemented by the user as a document addition (of the new version) and subsequent deletion (of the old version). My problem is that I'd like to update a number of documents which have their

Re: Python UML Metamodel

2008-01-30 Thread Gabriel Genellina
En Tue, 29 Jan 2008 21:25:26 -0200, sccs cscs [EMAIL PROTECTED] escribió: I find an OPEN SOURCE tool (http://bouml.free.fr/) that Recently generates Python code from UML model. Does it keep the model synchronized when you modify the Python code? I like to model the Python language

Re: event handling

2008-01-30 Thread Mike Driscoll
On Jan 30, 11:16 am, Peter Nemeth [EMAIL PROTECTED] wrote: Hi , I am working on a stellar spectral analysis pipeline in Python. My OS is Suse 10.0, and i use Python 2.5 . I have found difficulties with keyboard event handling. My code communicates with the user through an xterm window and

Re: Q: paramiko/SSH/ how to get a remote host_key

2008-01-30 Thread Charles_hans
I tried to get what host_key has been aquired after AutoPolicy is set. I added the following code just before client.close() in rosty's final code: try: host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts')) except IOError: try: host_keys =

Re: Sine Wave Curve Fit Question

2008-01-30 Thread Helmut Jarausch
Iain Mackay wrote: Python Folks I'm a newbie to Python and am looking for a library / function that can help me fit a 1D data vector to a sine wave. I know the frequency of the wave, so its really only phase and amplitude information I need. I can't find anything in the most widely

Re: Q: paramiko/SSH/ how to get a remote host_key

2008-01-30 Thread Guilherme Polo
2008/1/30, Charles_hans [EMAIL PROTECTED]: I tried to get what host_key has been aquired after AutoPolicy is set. I added the following code just before client.close() in rosty's final code: try: host_keys = paramiko.util.load_host_keys(os.path.expanduser('~/.ssh/known_hosts')) except

Re: Code Friendly Blog?

2008-01-30 Thread Stefan Behnel
Hai Vu wrote: Why don't you try to use Code Colorizer: http://www.chamisplace.com/colorizer/cc.asp Looks like it lacks support for one important language, though... Stefan -- http://mail.python.org/mailman/listinfo/python-list

[no subject]

2008-01-30 Thread 7146031596
17146031598 -- http://mail.python.org/mailman/listinfo/python-list

Events in Python

2008-01-30 Thread Simon Pickles
Hi, I have a stackless python app, using twisted in parts (.internet and .adbapi). I need a little help getting pythonic after years of c++ hell. I'd like to use a system of events and observers, like c++ boost.signal. I'd like to be able to subscribe multiple callbacks to a single function

Re: Web Interface Recommendations

2008-01-30 Thread PurpleServerMonkey
On Jan 30, 8:08 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: PurpleServerMonkey a écrit : (snip) Out of the major frameworks is there one that stands out as being particularly well suited for what I'm trying to do? Django and CherryPy are on the short list so I'll give them a

Re: Trying to understand Python web-development

2008-01-30 Thread walterbyrd
Thanks for all that posts. This thread has been helpful. I have seen a lot of posts about the importance of decoupling the deployment technologies from the framework technologies. This is how I have done that in PHP. I develop on my home box. When I get something working the way I want, I ftp

Re: Q: paramiko/SSH/ how to get a remote host_key

2008-01-30 Thread Charles_hans
Thank you, Guilherme. I was running demo_sftp.py included in paramiko download. It seems that '.ssh/known_hosts' should be the path of a key file on my working directory on local PC. (Right?) I replaced this with 'test_rsa.key' in C:\paramiko-1.7.2\demos and this did not generate error. But the

Re: Removing Pubic Hair Methods

2008-01-30 Thread Marc 'BlackJack' Rintsch
On Wed, 30 Jan 2008 15:29:45 +0100, Wildemar Wildenburger wrote: Gerardo Herzig wrote: I will use genital().extend(), thats for shure ^^ Well, you never go wrong with apply(genital(), females), do you? `apply()` is deprecated. And ``genital(*females)`` looks a bit odd. :-) Ciao,

Re: Events in Python

2008-01-30 Thread Ivan Illarionov
You may need Louie (http://louie.berlios.de) Django (http://djangoproject.com) does the same in django.dispatch - and Django version works about 33% faster. Note that all those signals/events are very slow in Python. --Ivan -- http://mail.python.org/mailman/listinfo/python-list

Re: Events in Python

2008-01-30 Thread Ivan Illarionov
Compared to what, did you measure something? As example, instantiation of Model classes in Django (Model.__init__) sends two signals (pre_init and post_init) - they are rarely used in practice - but they make instantiation about two times slower. Yes, I measured that. The creator of Louie

Re: Fw: Undeliverable Message

2008-01-30 Thread Bart Kastermans
On Jan 25, 5:05 am, [EMAIL PROTECTED] wrote: Hallo pyPeople, I wrote a little snippet of code that takes a list representing some 'digits', and according to a list of symbols, increments the digits through the symbol list. so for example, digits=[a,a,a] symbols=[a,b,c]

Re: Events in Python

2008-01-30 Thread Bjoern Schliessmann
Ivan Illarionov wrote: Note that all those signals/events are very slow in Python. Compared to what, did you measure something? Regards, Björn -- BOFH excuse #38: secretary plugged hairdryer into UPS -- http://mail.python.org/mailman/listinfo/python-list

dynamically set up ssh -r paramiko?

2008-01-30 Thread washakie
Hello, I'm trying to write a script which will allow me to initiate (spawn?) an SSH reverse tunnel from an internal box (inside a firewall) to an external box, while logged into the external box. I posted to another list and was pointed in the direction of paramiko. I've read the tutorials, but

Dictionary Keys question

2008-01-30 Thread FireNWater
I'm curious why the different outputs of this code. If I make the dictionary with letters as the keys, they are not listed in the dictionary in alphabetical order, but if I use the integers then the keys are in numerical order. I know that the order of the keys is not important in a dictionary,

Re: Dictionary Keys question

2008-01-30 Thread Christian Heimes
FireNWater wrote: I'm curious why the different outputs of this code. If I make the dictionary with letters as the keys, they are not listed in the dictionary in alphabetical order, but if I use the integers then the keys are in numerical order. I know that the order of the keys is not

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Peter Schuller
Well, all I will say is that many people on this list, myself included, do know Python internals, and we use the method we've been suggesting here, without problems. Ok. That is useful to know (that it is being done in practice without problems). Thanks! -- / Peter Schuller PGP userID:

Re: Dictionary Keys question

2008-01-30 Thread Gabriel Genellina
En Wed, 30 Jan 2008 20:47:36 -0200, FireNWater [EMAIL PROTECTED] escribió: I'm curious why the different outputs of this code. If I make the dictionary with letters as the keys, they are not listed in the dictionary in alphabetical order, but if I use the integers then the keys are in

Re: Dictionary Keys question

2008-01-30 Thread Dustan
On Jan 30, 4:47 pm, FireNWater [EMAIL PROTECTED] wrote: I'm curious why the different outputs of this code. If I make the dictionary with letters as the keys, they are not listed in the dictionary in alphabetical order, but if I use the integers then the keys are in numerical order. I know

Re: Dictionary Keys question

2008-01-30 Thread Berteun Damman
On Wed, 30 Jan 2008 14:47:36 -0800 (PST), FireNWater [EMAIL PROTECTED] wrote: I'm curious why the different outputs of this code. If I make the dictionary with letters as the keys, they are not listed in the dictionary in alphabetical order, but if I use the integers then the keys are in

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Peter Schuller
It what sense will it not be? Why do you care so much about where the source code for Monkey is defined? If you actually want to read the source, you might need to follow the chain from animal, see that Monkey is imported from monkey, and go look at that. But the rest of the time, why

Re: Trying to understand Python web-development

2008-01-30 Thread Paul Boddie
On 30 Jan, 21:27, walterbyrd [EMAIL PROTECTED] wrote: Thanks for all that posts. This thread has been helpful. I have seen a lot of posts about the importance of decoupling the deployment technologies from the framework technologies. This is how I have done that in PHP. I develop on my home

Re: writing Python in Emacs

2008-01-30 Thread Ryszard Szopa
Thanks Rob. Your code should basically do the trick. -- Richard -- http://mail.python.org/mailman/listinfo/python-list

Why the HELL has nobody answered my question !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2008-01-30 Thread Blubaugh, David A.
I do not understand why no one has answered the following question: Has anybody worked with Gene Expression Programming David Blubaugh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, January 30, 2008

Re: Why the HELL has nobody answered my question !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2008-01-30 Thread Sergio Correia
is this some kind of joke? if you get no answers, then the answer is no On Jan 30, 2008 7:40 PM, Blubaugh, David A. [EMAIL PROTECTED] wrote: I do not understand why no one has answered the following question: Has anybody worked with Gene Expression Programming David Blubaugh

Re: Why the HELL has nobody answered my question !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2008-01-30 Thread Daniel Fetchinson
I do not understand why no one has answered the following question: Has anybody worked with Gene Expression Programming Hm, maybe because nobody did? Just a thought. It can also be that everyone worked with it but everyone is part of a big conspiracy not to answer any of your emails

Re: Events in Python

2008-01-30 Thread alex23
Hey Si, The PEAK lib Trellis (http://peak.telecommunity.com/DevCenter/Trellis) is worth checking out. I haven't had a chance to use it yet but am keen to. There are several other modules that may apply, I recommend searching on the Python Package Index (http://pypi.python.org/pypi), for observer

Re: Dictionary Keys question

2008-01-30 Thread FireNWater
On Jan 30, 3:09 pm, Berteun Damman [EMAIL PROTECTED] wrote: On Wed, 30 Jan 2008 14:47:36 -0800 (PST), FireNWater [EMAIL PROTECTED] wrote: I'm curious why the different outputs of this code. If I make the dictionary with letters as the keys, they are not listed in the dictionary in

  1   2   3   >