Decorating instance methods

2007-07-09 Thread Alexander Draeger
Hello everybody, I'm very interesting in using the decorator concept, but I can't convert it in useful things. I have read many about decorators and have seen a lot of examples, but I search a possibility, to decorate methods of classes with reference to the instances. For example: I have a class

Re: socket: connection reset by server before client gets response

2007-07-09 Thread ahlongxp
> It's a pleasure. > > Sometimes I think that all would be programmers should be > forced to write a "Hello World" to transmit out of a serial port > in assembler on hardware that carries no OS - just to teach > them about interrupts and time. > > I would require them to hand assemble the code too,

Re: Decorating instance methods

2007-07-09 Thread Diez B. Roggisch
Alexander Draeger schrieb: > Hello everybody, > > I'm very interesting in using the decorator concept, but I can't > convert it in useful things. I have read many about decorators and > have seen a lot of examples, but I search a possibility, to decorate > methods of classes with reference to the

Re: Decorating instance methods

2007-07-09 Thread Duncan Booth
Alexander Draeger <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I'm very interesting in using the decorator concept, but I can't > convert it in useful things. I have read many about decorators and > have seen a lot of examples, but I search a possibility, to decorate > methods of classes wit

Re: having problems in changing directories doing ftp in python

2007-07-09 Thread Gabriel Genellina
En Sat, 07 Jul 2007 09:41:59 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > I'm trying to write a ftp in python to send files to my webserverr. > Curtly I will change the directory to the folder name, down load the > file, then do a chnag dir ..\ to go back to the root diretory, chnag

Re: Htmllib help

2007-07-09 Thread Gabriel Genellina
En Fri, 06 Jul 2007 03:44:20 -0300, <[EMAIL PROTECTED]> escribió: > Thats right I don't need the output any where so I don't need to use the > writer. I can remove it wowever will the formater work since it needs > writer? Maybe I can use the Null writer? Exactly. Look at the HTMLParser modul

Florent CAYRE/SN09/SNECMA est absent.

2007-07-09 Thread florent.cayre
Je serai absent(e) du 19/02/2007 au 17/12/2007. Bonjour, je suis en cong=E9 sabbatique pour une dur=E9e de 10 mois. En mon absence, adressez-vous =E0 Christophe Baudoin pour tout ce qui concerne l'unit=E9 M=E9thodes et Outils du d=E9veloppement / A=E9rothermique= et Combustion. Florent Cayr=E9

Re: How to Machine A python script execute Machine B python script?

2007-07-09 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Jul 8, 6:45 pm, johnny <[EMAIL PROTECTED]> wrote: > > Anyone know how I can make Machine A python script execute a python > > script on Machine B ? > > xmlrpc will work. Or pyro http://pyro.sourceforge.net/ Pyro is short for PYthon Remote Obje

Re: "Empty" text

2007-07-09 Thread Nick Craig-Wood
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sun, 08 Jul 2007 22:23:20 +0200, Jan Danielsson wrote: > > >The problem is that this generates the following code: > > > > > > Description > > > > > > > > > >

Re: socket: connection reset by server before client gets response

2007-07-09 Thread Adriano Varoli Piazza
Hendrik van Rooyen wrote: > Sometimes I think that all would be programmers should be > forced to write a "Hello World" to transmit out of a serial port > in assembler on hardware that carries no OS - just to teach > them about interrupts and time. > > I would require them to hand assemble the code

trouble controlling vim with subprocess on windows machine

2007-07-09 Thread [EMAIL PROTECTED]
I am having trouble contolling vim with subprocess on a windows machine. It appears that vim comes up on the machine all right and it sometimes looks like it is doing the searchs what I am asking it to do but when I am asking it to load a file it doesn't do anything. Is there something I nee

Re: socket.makefile() buggy?

2007-07-09 Thread ahlongxp
On Jul 8, 9:54 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > That's a pretty pejorative subject line for someone who's been > programming Python [guessing by the date of your first post] for about a > month. > I have to admit it that I'm quite a newbie programmer. > Perhaps "Incomprehensible behav

Re: Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

2007-07-09 Thread Gabriel Genellina
En Sun, 08 Jul 2007 21:06:48 -0300, <[EMAIL PROTECTED]> escribió: > in this project, we need something that would basically function as a > blender. we know we'll need to buy a motor that spins, but what we're > having trouble with is figuring out how to program it. we want to be > able to control

MP3 AVI DIVX MPEG SOFT = www.GEGEREKA.com

2007-07-09 Thread GEGEREKA!
Millions files for everyone. Music, movies, soft and other media. Check it now!! http://www.gegereka.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

2007-07-09 Thread Wesley Brooks
For a robotics project I would highly recommend the use of Phidgets, they can supply sensors and interface kits with APIs. Not sure if Python is fully supported yet but there certinally seems to be a considerable effort ongoing creating an API for python. I've only used them to date for servo contr

Re: socket: connection reset by server before client gets response

2007-07-09 Thread ahlongxp
On Jul 9, 4:30 pm, Adriano Varoli Piazza <[EMAIL PROTECTED]> wrote: > > Gives a whole new meaning to chomp(), byte, nybble, and more :) > I wholeheartedly endorse this effort. I'm sick of reading about > students from WTF University (check thedailywtf.com if you don't know, > but beware. There be

Re: Is there a way to program a robot with python (ex, an electric motor, control it's speed, etc)

2007-07-09 Thread Christian Tismer
Hi there, i hope someone here can help me. basically, me and my friend have a summer project. in this project, we need something that would basically function as a blender. we know we'll need to buy a motor that spins, but what we're having trouble with is figuring out how to program it. we wa

Re: Learning Basics

2007-07-09 Thread BartlebyScrivener
On Jul 8, 12:10 pm, Brad <[EMAIL PROTECTED]> wrote: > So I'd appreciate some good feedback or ideas. I addition to Dan's suggestions, you could add a Tk text entry box to make it easier to enter text. I can send you some code if you'd like, as Steve Holden just generously helped me make a text e

Re: trouble controlling vim with subprocess on windows machine

2007-07-09 Thread Nick Craig-Wood
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am having trouble contolling vim with subprocess on a windows > machine. It appears that vim comes up on the machine all right and it > sometimes looks like it is doing the searchs what I am asking it to do > but when I am asking it to load

?Hi Hi Hi.....ARE YOU Searching for Happiness

2007-07-09 Thread abdo911
Allow me to share with you here some information about happiness. Happiness is a common goal that everyone strives to attain. Philosophers, intellectuals, doctors and artists alike have all strived in search of the causes of happiness and ways to escape anxiety. The reality is, however, that th

Re: Portable general timestamp format, not 2038-limited

2007-07-09 Thread Gabriel Genellina
En Thu, 05 Jul 2007 17:57:32 -0300, Wojtek <[EMAIL PROTECTED]> escribió: > Note: Since I am using the year as a "magic number", some of you > may think that I am repeating the Y2K problem. Hey, if my application > is still being used in the year 9998 I am not being paid nearly > enough... I

Re: Tests for Python Database API

2007-07-09 Thread Gerhard Häring
MD wrote: > Are there any tests that will help me ensure that my Python database > driver conforms to the Database API v2.0 specification? There's this: http://www.initd.org/tracker/psycopg/browser/psycopg2/trunk/tests/dbapi20.py -- Gerhard -- http://mail.python.org/mailman/listinfo/python-list

Re: A clean way to program an interface

2007-07-09 Thread Diez B. Roggisch
rh0dium wrote: > Hi all, > > I got this new radio scanner (toy!!) this weekend and I can access it > via a serial cable. I want to write a interface around it but I am > looking for some suggestions. I thought at first I would simply class > the Scanner and write the various methods as attibutes

Re: socket: connection reset by server before client gets response

2007-07-09 Thread Adriano Varoli Piazza
ahlongxp wrote: > I feel officially offended. I didn't intend to offend you, I was joking. I apologise in any case. There's a few things to be said, though: As per your message in another thread, it isn't that you don't express yourself clearly in English, but that you were too quick to claim a s

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Bjoern Schliessmann
Paul Rubin wrote: > lex <[EMAIL PROTECTED]> writes: >> list = [1, True, True, False, False, True] >> status = True >> for each in list: >> status = status and each >> >> but what is your best way to test for for False in a list? > > status = all(list) Am I mistaken, or is this no identity t

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Diez B. Roggisch
Bjoern Schliessmann wrote: > Paul Rubin wrote: >> lex <[EMAIL PROTECTED]> writes: > >>> list = [1, True, True, False, False, True] >>> status = True >>> for each in list: >>> status = status and each >>> >>> but what is your best way to test for for False in a list? >> >> status = all(list)

Re: trouble controlling vim with subprocess on windows machine

2007-07-09 Thread [EMAIL PROTECTED]
On Jul 9, 5:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I am having trouble contolling vim with subprocess on a windows > > machine. It appears that vim comes up on the machine all right and it > > sometimes looks like it is doing th

wx DatePicker (set blank values)

2007-07-09 Thread Marcpp
I need to set a DatePicker to blank value and GetValue() needs to be 0. Thanks by advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: The file executing

2007-07-09 Thread Gabriel Genellina
En Fri, 06 Jul 2007 17:15:22 -0300, Benjamin <[EMAIL PROTECTED]> escribió: >> > > > How does one get the path to the file currently executing (not the >> > > > cwd). Thank you > So: > if __name__ == "main": > currentDir = os.path.dirname(sys.argv[0]) > else: > currentDir = os.path.dirnam

Re: socket: connection reset by server before client gets response

2007-07-09 Thread ahlongxp
On Jul 9, 7:03 pm, Adriano Varoli Piazza <[EMAIL PROTECTED]> wrote: > ahlongxp wrote: > > I feel officially offended. > > I didn't intend to offend you, I was joking. I apologise in any case. > There's a few things to be said, though: > > As per your message in another thread, it isn't that you don

Re: The file executing

2007-07-09 Thread Benjamin
On Jul 9, 6:42 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 06 Jul 2007 17:15:22 -0300, Benjamin <[EMAIL PROTECTED]> > escribió: > > >> > > > How does one get the path to the file currently executing (not the > >> > > > cwd). Thank you > > So: > > if __name__ == "main": > > cu

Looking for a Scholarship for your studies?)

2007-07-09 Thread Allin Sex...
Future Center for Students! its for all students looking for scholarships, Student visas for UK, USA, Australia, Get the List of the worlds best universties & so much more. Commited to give u golden opportunities.. Just visit us at: http://www.mixmasti.com/futurecentre/scholarships.asp -- http:/

Per thread data

2007-07-09 Thread Will McGugan
Hi, Is there a canonical way of storing per-thread data in Python? Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

TypeError: can't multiply sequence to non-int

2007-07-09 Thread Snezhana
-- http://mail.python.org/mailman/listinfo/python-list

Re: Per thread data

2007-07-09 Thread Jean-Paul Calderone
On Mon, 09 Jul 2007 13:57:02 +0100, Will McGugan <[EMAIL PROTECTED]> wrote: >Hi, > >Is there a canonical way of storing per-thread data in Python? > See threading.local: http://python.org/doc/lib/module-threading.html Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Hrvoje Niksic
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: but what is your best way to test for for False in a list? [...] >>> status = all(list) >> Am I mistaken, or is this no identity test for False at all? > > You are mistaken. > all take an iterable and returns if each value of it is true. Testing

Re: Per thread data

2007-07-09 Thread Gerhard Häring
Will McGugan wrote: > Hi, > > Is there a canonical way of storing per-thread data in Python? Good question. There's threading.local() which creates a thread-local object for you. Maybe this Cookbook entry is helpful: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302088 -- Gerhard --

Re: Python's "only one way to do it" philosophy isn't good?

2007-07-09 Thread Chris Mellon
On 7/6/07, Douglas Alan <[EMAIL PROTECTED]> wrote: > "Chris Mellon" <[EMAIL PROTECTED]> writes: > > > Sure, but thats part of the general refcounting vs GC argument - > > refcounting gives (a certain level of) timeliness in resource > > collection, GC often only runs under memory pressure. If you'r

Re: Broken MUA interactions (was: Restarting a Python Application)

2007-07-09 Thread Chris Mellon
On 7/8/07, Ben Finney <[EMAIL PROTECTED]> wrote: > "Peter Decker" <[EMAIL PROTECTED]> writes: > > > Imagine if you wrote applications where the default behavior did not > > do what was needed 99% of the time: how long do you think you'd be > > in business? > > You seem to be complaining about the f

Re: accessing an object instance by only having one of its attribute values

2007-07-09 Thread Paul McGuire
On Jul 8, 8:29 pm, mshiltonj <[EMAIL PROTECTED]> wrote: > > Not sure why I slipped into the habit of testing for None, though. :-( > There is nothing wrong with testing for None. But the right ways to test for None are: if x is None: and if x is not None: Since None is a singleton, it is a w

Re: A clean way to program an interface

2007-07-09 Thread rh0dium
On Jul 9, 3:53 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > THROW IT AWAY > > Seriously. That's one of the most convoluted, incomprehensible pieces of > python I've seen. Ever. > > All the sys._getframe()-stuff has to go. Really. There are about a dozen > pieces of code worldwide that ar

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Paul McGuire
On Jul 9, 7:39 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > > > > but what is your best way to test for for False in a list? > [...] > >>> status = all(list) > >> Am I mistaken, or is this no identity test for False at all? > > > You are mista

Re: Per thread data

2007-07-09 Thread Hrvoje Niksic
Will McGugan <[EMAIL PROTECTED]> writes: > Is there a canonical way of storing per-thread data in Python? mydata = threading.local() mydata.x = 1 ... http://docs.python.org/lib/module-threading.html -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Carsten Haese
On Mon, 2007-07-09 at 07:02 -0700, Paul McGuire wrote: > >>> any(map(lambda _ : _ is False,[3,2,1,0,-1])) > False > >>> any(map(lambda _ : _ is False,[3,2,1,0,-1,False])) > True > >>> Why the map/lambda? Is it faster than the more readable generator expression? >>> any(x is False for x in [3,2,1,

patching pylint.el

2007-07-09 Thread lgfang
Hi, I think this is a bug of pylint.el. But I failed finding a way to submit the bug neither in its official site nor in google. So I post it here wishing it may be useful for some buddies. The bug is that it uses "compile-internal" from "compile" without require compile. So "M-x pylint" will

Re: Tool for finding external dependencies

2007-07-09 Thread kyosohma
On Jul 8, 8:39 pm, Rob Cakebread <[EMAIL PROTECTED]> wrote: > Hi, > > I need to find external dependencies for modules (not Python standard > library imports). > > Currently I use pylint and manually scan the output, which is very > nice, or use pylint's --ext-import-graph option to create a .dot f

Re: wxPython - ListCtrl ColumnSorterMixin sometimes works sometimes doesn't!

2007-07-09 Thread kyosohma
On Jul 7, 7:55 am, Steve Senior <[EMAIL PROTECTED]> wrote: > Hi, > > My application has a tree control in which a user can select a filter. > This filter is then applied to the results and the results are > constructed in the ListControl (report style) widget. > > This all works fine. > > Recently

ANN: new Python magazine looking for authors

2007-07-09 Thread Marco Tabini
Hello— I am happy to announce the launch of Python Magazine [1], a magazine dedicated entirely to programming with Python and related technologies. PyMag will be published starting in October and will be available in both print and PDF format. Currently, we are looking for authors [2] and

Re: Broken MUA interactions (was: Restarting a Python Application)

2007-07-09 Thread Gabriel Genellina
En Mon, 09 Jul 2007 10:48:39 -0300, Chris Mellon <[EMAIL PROTECTED]> escribió: > It's working as instructed, but that doesn't mean that it's doing the > best thing. It's common practice for mailing lists to set the reply-to > to the list itself, because that's the common case, and because it's >

Re: Tool for finding external dependencies

2007-07-09 Thread Rob Cakebread
On Jul 9, 7:17 am, [EMAIL PROTECTED] wrote: > > Recently I ran into some debugging issues and the freeware app > "Dependency Walker" was suggested to me. I still haven't used it much > since I only got it last Friday, but it looks > promising:http://www.dependencywalker.com > > Mike Thanks Mike,

catching empty strings (I guess that's what they are)

2007-07-09 Thread brad
I've began accepting user input :( in an old program. The input comes from a simple text file where users enter filenames (one per line). What is the appropriate way to handle blank lines that hold whitespace, but not characters? Currently, I'm doing this: for user_file in user_files:

Re: A clean way to program an interface

2007-07-09 Thread Diez B. Roggisch
rh0dium wrote: > On Jul 9, 3:53 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> THROW IT AWAY >> >> Seriously. That's one of the most convoluted, incomprehensible pieces of >> python I've seen. Ever. >> >> All the sys._getframe()-stuff has to go. Really. There are about a dozen >> pieces

Re: TypeError: can't multiply sequence to non-int

2007-07-09 Thread Gabriel Genellina
En Mon, 09 Jul 2007 10:12:42 -0300, Snezhana <[EMAIL PROTECTED]> escribió: ??? Did you intend to post any question? The error is rather explicit: you can't say: "abc" * 5.2241 [1,2,3] * "Hello" (4,"z") * None The right operand must be an integer: "abc" * 5 (gives "abcabcabcabcabc") [1,2,3] * 8

Re: catching empty strings (I guess that's what they are)

2007-07-09 Thread Diez B. Roggisch
brad wrote: > I've began accepting user input :( in an old program. The input comes > from a simple text file where users enter filenames (one per line). What > is the appropriate way to handle blank lines that hold whitespace, but > not characters? Currently, I'm doing this: > > for user_f

compressing consecutive spaces

2007-07-09 Thread Beliavsky
How can I replace multiple consecutive spaces in a file with a single character (usually a space, but maybe a comma if converting to a CSV file)? Ideally, the Python program would not compress consecutive spaces inside single or double quotes. An inelegant method is to repeatedly replace two consec

What is the preferred doc extraction tool?

2007-07-09 Thread Emin.shopper Martinian.shopper
Dear Experts, What is the preferred doc extraction tool for python? It seems that there are many very nice options (e.g., pydoc, epydoc, HappyDoc, and lots of others), but what is the "standard" tool or at least what is the tool used to generate the documentation for the python standard library?

Re: catching empty strings (I guess that's what they are)

2007-07-09 Thread brad
Diez B. Roggisch wrote: > They are still there because you perform the stripping and lowercasing in > the append-call. Not beforehand. Thank you. I made the changes. It works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tool for finding external dependencies

2007-07-09 Thread kyosohma
On Jul 9, 9:27 am, Rob Cakebread <[EMAIL PROTECTED]> wrote: > On Jul 9, 7:17 am, [EMAIL PROTECTED] wrote: > > > > > Recently I ran into some debugging issues and the freeware app > > "Dependency Walker" was suggested to me. I still haven't used it much > > since I only got it last Friday, but it lo

Re: What is the preferred doc extraction tool?

2007-07-09 Thread BJörn Lindqvist
On 7/9/07, Emin.shopper Martinian.shopper <[EMAIL PROTECTED]> wrote: > Dear Experts, > > What is the preferred doc extraction tool for python? It seems that there > are many very nice options (e.g., pydoc, epydoc, HappyDoc, and lots of > others), but what is the "standard" tool or at least what is

Re: Broken MUA interactions (was: Restarting a Python Application)

2007-07-09 Thread Chris Mellon
On 7/9/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Mon, 09 Jul 2007 10:48:39 -0300, Chris Mellon <[EMAIL PROTECTED]> > escribió: > > > It's working as instructed, but that doesn't mean that it's doing the > > best thing. It's common practice for mailing lists to set the reply-to > > to th

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Paul Rubin
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > >> status = all(list) > > > > Am I mistaken, or is this no identity test for False at all? > > You are mistaken. all take an iterable and returns if each value of it is > true. all(list) does what the OP's code did, tests for the presence of a fal

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Hrvoje Niksic
Paul McGuire <[EMAIL PROTECTED]> writes: >> >>> False in [3, 2, 1, 0, -1] >> >> True# no False here>>> all([3, 2, 1, 0, -1]) >> >> False # false value present, not necessarily False > > I think if you want identity testing, you'll need to code your own; I'm aware of that, I simply pointed o

Re: compressing consecutive spaces

2007-07-09 Thread Pomato
On Jul 9, 7:38 am, Beliavsky <[EMAIL PROTECTED]> wrote: > How can I replace multiple consecutive spaces in a file with a single > character (usually a space, but maybe a comma if converting to a CSV > file)? Ideally, the Python program would not compress consecutive > spaces inside single or double

no python install

2007-07-09 Thread Beethon
my computer has no puthon installed i downloaded some sofware that are shiped with .py files please explain how the programs become workable ? thanks -- http://mail.python.org/mailman/listinfo/python-list

execute script in certain directory

2007-07-09 Thread brad
When I use idle or a shell to execute a python script, the script executes in the directory it is currently in (in this case, my desktop). However, when using GNOME and right clicking the py script and selecting 'open with python', the execution occurs in my home directory, not my desktop. Is

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Bjoern Schliessmann
Diez B. Roggisch wrote: > Bjoern Schliessmann wrote: >> Paul Rubin wrote: >>> lex <[EMAIL PROTECTED]> writes: but what is your best way to test for for False in a list? >>> >>> status = all(list) >> >> Am I mistaken, or is this no identity test for False at all? > > You are mistaken. all t

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Paul Rubin
Bjoern Schliessmann <[EMAIL PROTECTED]> writes: > > You are mistaken. all take an iterable and returns if each value > > of it is true. > > That's an identity test for True, not for False (the latter was > requested). Thus, I'm not mistaken. No, "true" is not the same thing as "True". -- http:

Re: no python install

2007-07-09 Thread kyosohma
On Jul 9, 10:26 am, Beethon <[EMAIL PROTECTED]> wrote: > my computer has no puthon installed > i downloaded some sofware that are shiped with .py files > please explain how the programs become workable ? > > thanks Check the softwares' website(s) to see what the dependencies are and download them.

Re: Tool for finding external dependencies

2007-07-09 Thread Rob Cakebread
On Jul 9, 7:54 am, [EMAIL PROTECTED] wrote: > > > mod = modulefinder.ModuleFinder() > mod.run_script(path/to/python_script.py) > mod.report() > > > > Mike Nope. All of those tools and the code above show *all* imports/ dependencies, which is way too much information. I just need the 'external'

Re: trouble controlling vim with subprocess on windows machine

2007-07-09 Thread Josiah Carlson
[EMAIL PROTECTED] wrote: > I am having trouble contolling vim with subprocess on a windows > machine. It appears that vim comes up on the machine all right and it > sometimes looks like it is doing the searchs what I am asking it to do > but when I am asking it to load a file it doesn't do an

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-09 Thread Bruno Desthuilliers
Paul Rubin a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: >>> Some users in fact recommend writing an explicit type signature for >>> every Haskell function, which functions sort of like a unit test. >> Stop here. explicit type signature == declarative static typing != >> unit test. >

Re: list.append not working?

2007-07-09 Thread Bruno Desthuilliers
Hardy a écrit : > On 5 Jul., 18:07, infidel <[EMAIL PROTECTED]> wrote: >> On Jul 5, 8:58 am, Hardy <[EMAIL PROTECTED]> wrote: >> >> >> >>> I experience a problem with append(). This is a part of my code: >>> for entity in temp: >>> md['module']= entity.addr.get('module') >>>

Re: Tool for finding external dependencies

2007-07-09 Thread Alex Popescu
On Jul 9, 6:42 pm, Rob Cakebread <[EMAIL PROTECTED]> wrote: > On Jul 9, 7:54 am, [EMAIL PROTECTED] wrote: > > > > > > > mod = modulefinder.ModuleFinder() > > mod.run_script(path/to/python_script.py) > > mod.report() > > > > > > Mike > > Nope. All of those tools and the code above show *all* impo

Re: Tool for finding external dependencies

2007-07-09 Thread Rob Cakebread
On Jul 9, 9:23 am, Alex Popescu <[EMAIL PROTECTED]> wrote: > Isn't it possible to get from modulefinder what it has found and just > filter it out according to your rules? > This way you are in control and can deicde what is internal/external. > At first glance it looked easy enough, by just filte

Re: A clean way to program an interface

2007-07-09 Thread Paul McGuire
I believe the OP is talking about "interface" as in "hardware interface", using some form of serial communication. His example does not use pyserial, but it does refer to a "UnidenConnection" class, with parameters such as bitrate, port, etc. for what looks like serial communication. Some general

Python ghost compile

2007-07-09 Thread funtimes
I split a large python (2.5.1) program into three modules. Let's call them mainmod, submod1, and submod2. mainmod imports submod1 and submod2. When I make changes to any of these modules, it is not reflected in the compile. Only if exit idle and re-run idle. I've removed the two relevant .pyc

Re: compressing consecutive spaces

2007-07-09 Thread Paul McGuire
On Jul 9, 9:38 am, Beliavsky <[EMAIL PROTECTED]> wrote: > How can I replace multiple consecutive spaces in a file with a single > character (usually a space, but maybe a comma if converting to a CSV > file)? Ideally, the Python program would not compress consecutive > spaces inside single or double

Re: Python ghost compile

2007-07-09 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I split a large python (2.5.1) program into three modules. Let's call > them mainmod, submod1, and submod2. mainmod imports submod1 and submod2. > When I make changes to any of these modules, it is not reflected in the > compile. Only if exit idle and re-run idle. I

Re: execute script in certain directory

2007-07-09 Thread Alex Popescu
On Jul 9, 6:31 pm, brad <[EMAIL PROTECTED]> wrote: > When I use idle or a shell to execute a python script, the script > executes in the directory it is currently in (in this case, my desktop). > However, when using GNOME and right clicking the py script and selecting > 'open with python', the exec

Re: execute script in certain directory

2007-07-09 Thread vasudevram
On Jul 9, 8:31 pm, brad <[EMAIL PROTECTED]> wrote: > When I use idle or a shell to execute a python script, the script > executes in the directory it is currently in (in this case, my desktop). > However, when using GNOME and right clicking the py script and selecting > 'open with python', the exec

Python ghost compile

2007-07-09 Thread funtimes
I split a large python (2.5.1) program into three modules. Let's call them mainmod, submod1, and submod2. mainmod imports submod1 and submod2. When I make changes to any of these modules, it is not reflected in the compile. Only if exit idle and re-run idle. I've removed the two relevant .pyc

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-09 Thread Chris Mellon
On 07 Jul 2007 23:27:08 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > "Hamilton, William " <[EMAIL PROTECTED]> writes: > > > Why on earth would anyone prefer taking a failure in the field over > > > having a static type check make that particular failure impossible? > > > > Because st

Class file location

2007-07-09 Thread axjacob
Is there a way to define a different directory for the generated .class(*$py.class) files than the current directory where the python scripts are located and executed from? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Htmllib help

2007-07-09 Thread axjacob
Thank you. The NullWriter worked perfectly. I will certainly look at HTMLParser. -- Original message -- From: "Gabriel Genellina" <[EMAIL PROTECTED]> > En Fri, 06 Jul 2007 03:44:20 -0300, <[EMAIL PROTECTED]> escribió: > > > Thats right I don't need the output an

ImportError: MemoryLoadLibrary failed loading

2007-07-09 Thread kyosohma
Hi, Recently I began my journey into creating executables. I am using Andrea Gavana's cool GUI2EXE program which works very well and that is a GUI for py2ece. I am also using Inno Setup to create a script/executable. Anyway, today I am putting the program to the test with some volunteer testers an

Re: How to Machine A python script execute Machine B python script?

2007-07-09 Thread vasudevram
On Jul 9, 1:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > On Jul 8, 6:45 pm, johnny <[EMAIL PROTECTED]> wrote: > > > Anyone know how I can make Machine A python script execute a python > > > script on Machine B ? > > > xmlrpc will work. > > O

Re: Class file location

2007-07-09 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Is there a way to define a different directory for the generated > .class(*$py.class) files than the current directory where the > python scripts are located and executed from? Excuse me, since when does python generate .class files? Regards, Björn -- BOFH excuse #4

Re: What is the most efficient way to test for False in a list?

2007-07-09 Thread Bjoern Schliessmann
Paul Rubin wrote: > Bjoern Schliessmann <[EMAIL PROTECTED]> > writes: >> That's an identity test for True, not for False (the latter was >> requested). Thus, I'm not mistaken. > > No, "true" is not the same thing as "True". Oops, read over that case. Still: No identity test for False. Regards,

Re: compressing consecutive spaces

2007-07-09 Thread [EMAIL PROTECTED]
On Jul 9, 7:38 am, Beliavsky <[EMAIL PROTECTED]> wrote: > How can I replace multiple consecutive spaces in a file with a single > character (usually a space, but maybe a comma if converting to a CSV > file)? Ideally, the Python program would not compress consecutive > spaces inside single or double

Re: Class file location

2007-07-09 Thread axjacob
My mistake. It is Jython. -- Original message -- From: Bjoern Schliessmann <[EMAIL PROTECTED]> > [EMAIL PROTECTED] wrote: > > Is there a way to define a different directory for the generated > > .class(*$py.class) files than the current directory where the > > pyt

Re: Python's "only one way to do it" philosophy isn't good?

2007-07-09 Thread Douglas Alan
"Chris Mellon" <[EMAIL PROTECTED]> writes: >> And why would you do that? People rely very heavily in C++ on when >> destructors will be called, and they are in fact encouraged to do so. >> They are, in fact, encouraged to do so *so* much that constructs like >> "finally" and "with" have been reje

Re: Htmllib help

2007-07-09 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > The NullWriter worked perfectly. I will certainly look at HTMLParser. You should rather take a look at lxml. It's much easier to use and much more powerful. http://codespeak.net/lxml/ There is even an improved branch with a package called "lxml.html" that will be merg

Re: socket.makefile() buggy?

2007-07-09 Thread Steve Holden
ahlongxp wrote: > On Jul 8, 9:54 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> That's a pretty pejorative subject line for someone who's been >> programming Python [guessing by the date of your first post] for about a >> month. >> [...] > And last but not least, I' here to be helped and help as l

Re: Where is the syntax for the dict() constructor ?! (OT)

2007-07-09 Thread Steve Holden
Hendrik van Rooyen wrote: > "Steve Holden" <[EMAIL PROTECTED]> wrote: > >> Would we do that with esteeth? > > Ok Steve you've got me - my dictionary goes from > estate to esteem to ester... > > The US spelling of "esthete" may have a bearing... > > - Hendrik > Sorry - dreadful joke. Since te

Re: Portable general timestamp format, not 2038-limited

2007-07-09 Thread Steve Holden
Gabriel Genellina wrote: > En Thu, 05 Jul 2007 17:57:32 -0300, Wojtek <[EMAIL PROTECTED]> escribió: > >> Note: Since I am using the year as a "magic number", some of you >> may think that I am repeating the Y2K problem. Hey, if my application >> is still being used in the year 9998 I am not b

Re: Python's "only one way to do it" philosophy isn't good?

2007-07-09 Thread Steve Holden
Douglas Alan wrote: > "Chris Mellon" <[EMAIL PROTECTED]> writes: [...] >> The Python language reference explicitly does *not* guarantee the >> behavior of the refcounter. > > Are you suggesting that it is likely to change? If so, I think you > will find a huge uproar about it. > >> By relying on

sending fastcgi requests

2007-07-09 Thread [EMAIL PROTECTED]
I have a python fastcgi app. Is there any library in python that I can use to send a FASTCGI request to the fastcgi app? thanks -- http://mail.python.org/mailman/listinfo/python-list

Pydev 1.3.7 Released

2007-07-09 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.7 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights: -- * Support for Ecli

Re: Pydev 1.3.7 Released

2007-07-09 Thread James Matthews
I just downlaoded the old one! On 7/9/07, Fabio Zadrozny <[EMAIL PROTECTED]> wrote: Hi All, Pydev and Pydev Extensions 1.3.7 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com

Re: Decorating instance methods

2007-07-09 Thread Cousin Stanley
> > Try this: > Sesame __Street__ Version ''' NewsGroup comp.lang.python Subject .. Decorating instance methods Post_By .. Alexander Draeger Reply_By . Duncan Booth Edit_By .. Stanley C. Kitching ''' def logging( f ) : def deco( s

  1   2   >