ANN: pyftpdlib 0.5.2 released

2009-09-14 Thread Giampaolo Rodola'
Hi, I'm pleased to announce release 0.5.2 of Python FTP Server library (pyftpdlib). http://code.google.com/p/pyftpdlib === About === Python FTP server library provides a high-level portable interface to easily write asynchronous FTP servers with Python. pyftpdlib is currently the most complete

Re: Accessing objects at runtime.

2009-09-14 Thread jacopo
   You might consider running a BaseHTTPServer in a separate thread which has references to your objects of interest and exporting the data through a web interface. Using a RESTful approach for mapping URLs to objects within your system, a basic export of the data can be as simple as

Re: Accessing objects at runtime.

2009-09-14 Thread Chris Colbert
why not just pawn your processing loop off onto a child thread and give yourself a hook (function) that you can call that return whatver info you what. Run the script in ipython, problem solved. On Mon, Sep 14, 2009 at 7:57 AM, jacopo jacopo.pe...@gmail.com wrote:    You might consider running

Re: yet another modifying locals() question

2009-09-14 Thread Ed Anuff
On Sep 13, 8:15 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: Metaclasses are left as an exercise for the reader. The parent class has a metaclass, which is why I was trying this approach instead, since it let me get at the class attributes before the metaclass did.

Re: Why use locals()

2009-09-14 Thread Chris Colbert
Given that python is devoid of types: Is the variable 'a' an int or a float at runtime?, explicit can only be taken so far. Personally, I use locals() when I work with Django. On Mon, Sep 14, 2009 at 7:42 AM, Sean DiZazzo half.ital...@gmail.com wrote: If you are willing to open your mind to

Re: list as an instance attribute

2009-09-14 Thread Daniel Santos
Here goes, I have a base class that is the following : class primitive: def __init__(self): self.name = self.transforms = [] def copyInternalState(self, sourceObj, copyName): return null def copy(self, copyName):

VT100 in Python

2009-09-14 Thread Nadav Chernin
Hi, everybody I'm writing program that read data from some instrument trough RS232. This instrument send data in VT100 format. I need only to extract the text without all other characters that describe how to represent data on the screen. Is there some library in python for converting VT100

Re: list as an instance attribute

2009-09-14 Thread r
On Sep 13, 7:34 pm, Daniel Santos daniel.d...@gmail.com wrote: Here goes, I have a base class that is the following : class primitive:         def __init__(self):                 self.name =                 self.transforms = []         def copyInternalState(self, sourceObj, copyName):

Re: VT100 in Python

2009-09-14 Thread Wolfgang Rohdewald
On Sunday 13 September 2009, Nadav Chernin wrote: I'm writing program that read data from some instrument trough RS232. This instrument send data in VT100 format. I need only to extract the text without all other characters that describe how to represent data on the screen. Is there some

Re: Why indentation is use to denote block of code?

2009-09-14 Thread Miles Kaufmann
On Sep 13, 2009, at 5:38 PM, AggieDan04 wrote: On Sep 13, 6:27 pm, Steven D'Aprano wrote: On Sun, 13 Sep 2009 15:15:40 -0700, Chris Rebert wrote: In fact it's pretty much impossible to automatically indent Python code that has had its indentation removed; it's impossible to know for sure

Re: NameError: name '__main__' is not defined

2009-09-14 Thread Hendrik van Rooyen
On Monday 14 September 2009 03:43:19 Peng Yu wrote: Hi, I try the following code. I don't quite understand why __main__ is not defined. Could somebody let me know what I am wrong about it? Regards, Peng $ cat test.py #!/usr/bin/env python if __main__ == '__main__' : print Hello

Re: NameError: name '__main__' is not defined

2009-09-14 Thread Andre Engels
On Mon, Sep 14, 2009 at 4:29 AM, Sean DiZazzo half.ital...@gmail.com wrote: Is this a production program that you are using?? Please show us the point you are trying to make in something more valuable. I find this a very bad comment. Not only is it rude, it is condemning a behaviour I would

Calling all C++ programmers for collaboration

2009-09-14 Thread r
Hello all, Are you a C++ programmer who is currently learning Python? If so, maybe you can help me, and i can help you. It does not matter how much or how little experience you have! All help is greatly welcomed! I am currently working on a project from an opensource app that is written in C++

Re: Distributing Python environment

2009-09-14 Thread Gabriel Genellina
En Sun, 13 Sep 2009 08:32:33 -0300, Ecir Hana ecir.h...@gmail.com escribió: I have an app which I would like to extend with Python. I I saw how to embed the interpreter into C. If I bundle my app with the Python lib (say, python26.dll) I can PyRun_SimpleString() some code. My question is, how

Re: including constants

2009-09-14 Thread Nick Craig-Wood
Nikola Skoric nick-n...@net4u.hr wrote: I have a simple problem and I know how to solve it :-D, but I suspect that there is a standard solution which is more elegant. So, here is my problem: I have django app versioned with svn and I test my trunk on two different machines (one with

Re: list as an instance attribute

2009-09-14 Thread Bruno Desthuilliers
Daniel Santos a écrit : Here goes, I have a base class that is the following : class primitive: pep08 : class names should be Capitalized. Also, if you're using Python 2.x, make it: class Primitive(object): #... def __init__(self): self.name =

Re: numpy NaN, not surviving pickle/unpickle?

2009-09-14 Thread Gabriel Genellina
En Sun, 13 Sep 2009 20:53:26 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au escribió: There may be something to be said for caching common floats, like pi, small integers (0.0, 1.0, 2.0, ...), 0.5, 0.25 and similar, but I doubt the memory savings would be worth the extra

Re: Accessing objects at runtime.

2009-09-14 Thread jacopo
On Sep 14, 9:54 am, Chris Colbert sccolb...@gmail.com wrote: why not just pawn your processing loop off onto a child thread and give yourself a hook (function) that you can call that return whatver info you what. Run the script in ipython, problem solved. thank you Chris, I have just

Re: list as an instance attribute

2009-09-14 Thread Robin Becker
Bruno Desthuilliers wrote: Daniel Santos a écrit : Here goes, I have a base class that is the following : class primitive: pep08 : class names should be Capitalized. Also, if you're using Python 2.x, make it: class Primitive(object): #... ... I find it remarkable that the most

Re: An assessment of the Unicode standard

2009-09-14 Thread Christopher Culver
Hyuga hyugaricd...@gmail.com writes: I just wanted to add, in defense of the Chinese written language ... that I think it would make a fairly good candidate for use at least as a universal *written* language. Particularly simplified Chinese since, well, it's simpler. The advantages are that

Re: VT100 in Python

2009-09-14 Thread Nick Craig-Wood
Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Sunday 13 September 2009, Nadav Chernin wrote: I'm writing program that read data from some instrument trough RS232. This instrument send data in VT100 format. I need only to extract the text without all other characters that describe

Re: list as an instance attribute

2009-09-14 Thread Miles Kaufmann
On Sep 14, 2009, at 1:55 AM, Robin Becker wrote: Bruno Desthuilliers wrote: pep08 : class names should be Capitalized. Also, if you're using Python 2.x, make it: class Primitive(object): #... ... I find it remarkable that the most primitive classes appear to break the pep08 convention

equation of a graph

2009-09-14 Thread ankita dutta
hii.. i am working with graphs, my problem is to find the equation for any given graph. i tried with *polyfit function*. but that only give me the slope and y-axis intercept. hence *best-fit line * , but i want to find *best-fit curve * how can i find that ? ankita --

Re: An assessment of the Unicode standard

2009-09-14 Thread Robin Becker
r wrote: ... What makes you think that diversity is lost with a single language? I say more pollination will occur and the seed will be more potent since all parties will contribute to the same pool. Sure there will be idioms of different regions but that is to be expected. But at least

Re: Programming ideas?

2009-09-14 Thread Vimal
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/12/2009 07:43 PM, Someone Something wrote: I know you've probably had this question a million and one times but here it is again. I'm intermediate at C, pretty good at Java (though I really don't want to program in this), okay at perl and

Re: equation of a graph

2009-09-14 Thread Tim Chase
but i want to find *best-fit curve * What type of curve? Polynomial (of which your rejected linear is a low-order variant)? Exponential or logarithmic? Bell curve? S-curve? Circle? Axis-aligned ellipse? non-axis-aligned ellipse? There are lots of curvy possibilities here... -tkc

Re: Problem with the inclusion of new files like lxml, django, numpy, etc.

2009-09-14 Thread Paul Boddie
On 14 Sep, 04:46, alex23 wuwe...@gmail.com wrote: joy99 subhakolkata1...@gmail.com wrote: What is the problem I am doing? Following the wrong installation instructions? The wrong instructions appear to come from this page: http://docs.djangoproject.com/en/dev/topics/install/ Those

Re: Python server locks up

2009-09-14 Thread M.-A. Lemburg
Zac Burns wrote: I have a server running Python 2.6x64 which after running for about a month decides to lock up and become unresponsive to all threads for several minutes at a time. While it is locked up Python proceeds to consume large amounts of continually increasing memory. The basic

Re: trouble quitting PyQt4 App

2009-09-14 Thread MRAB
Soumen banerjee wrote: Hi, Im new to PyQt4 and im having fun using it. but ive run into a bit of a problem. I cant quit the application. The application has 2 modules. The gui module(gui.py) and then the main program(main.py) [snip] so heres the problem:- when i hit the quit button, quit is

myparentclass.__subclasses__() not working for me

2009-09-14 Thread samwyse
### I've tried this under both Python 2.5.1 and 3.1.1, and it isn't working with either one. Here is my program: class Plugin(object): This is the base object for a plug-in. pass def load_plugins(plugin_subdir='plugins'): import sys, pkgutil, imp, os.path try: # Use

Re: An assessment of the Unicode standard

2009-09-14 Thread rurpy
On Sep 14, 6:06 am, Christopher Culver crcul...@christopherculver.com wrote: Robin Becker ro...@reportlab.com writes: well allegedly, the medium is the message so we also need to take account of language in addition to the meaning of communications. I don't believe all languages are

Re: An assessment of the Unicode standard

2009-09-14 Thread Processor-Dev1l
On Aug 30, 2:19 pm, r rt8...@gmail.com wrote: On Aug 29, 11:05 pm, Anny Mous b1540...@tyldd.com wrote: (snip) How do we distinguish resume from résumé without accents? This is another quirk of some languages that befuddles me. What is with the ongoing language pronunciation tutorial some

Re: An assessment of the Unicode standard

2009-09-14 Thread Robin Becker
ru...@yahoo.com wrote: On Sep 14, 6:06 am, Christopher Culver crcul...@christopherculver.com wrote: Robin Becker ro...@reportlab.com writes: well allegedly, the medium is the message so we also need to take account of language in addition to the meaning of communications. I don't believe all

Re: An assessment of the Unicode standard

2009-09-14 Thread Christopher Culver
ru...@yahoo.com writes: Fashion changes in science as well as clothes. :-) A favourite line of crackpots who think that their ridiculous position is not held by others merely because of fashion. I wouldn't count Sapir-Whorf out yet...

Re: Problem with the inclusion of new files like lxml, django, numpy, etc.

2009-09-14 Thread Terry Reedy
Paul Boddie wrote: Agreed. I don't understand why the download file would be a winrar file, but I guess this is just Windows getting confused about the file type. Windows does not know much about files types other that .exe, .bat, except what programs you load tell it. I presume the file is

[ANN] Intro+Intermediate Python course, San Francisco, Nov 2009

2009-09-14 Thread wesley chun
(COMPREHENSIVE) INTRO+INTERMEDIATE PYTHON Mon-Wed, 2009 Nov 9-11, 9AM - 5PM If you have been in the Python community for some time, you may be familiar with my introductory (and advanced) courses. Many new Python intro courses have been added over the past few years, so aren't all classes the

Re: AttributeError: 'NoneType' object has no attribute 'get_text'

2009-09-14 Thread Raji Seetharaman
-- Forwarded message -- From: MRAB pyt...@mrabarnett.plus.com To: python-list@python.org Date: Sun, 13 Sep 2009 19:44:30 +0100 Subject: Re: AttributeError: 'NoneType' object has no attribute 'get_text' Raji Seetharaman wrote: Hi all, i did a small gui addressbook

ANN: Wing IDE 3.2.1 released

2009-09-14 Thread Stephan Deibel
Hi, Wingware has released version 3.2.1 of Wing IDE, our integrated development environment for the Python programming language. This is a bug fix release that includes the following changes: * Improved support for Snow Leopard (OS X 10.6) * Support for x86_64 Python 2.4+ on OS X * Support for

Re: An assessment of the Unicode standard

2009-09-14 Thread r
On Sep 14, 6:00 am, Robin Becker ro...@reportlab.com wrote: (snip) well allegedly, the medium is the message so we also need to take account of language in addition to the meaning of communications. I don't believe all languages are equivalent in the meanings that they can encode or convey. Our

Re: An assessment of the Unicode standard

2009-09-14 Thread r
On Sep 14, 9:05 am, Mel mwil...@the-wire.com wrote: (snip) Worf was raised as a Klingon, so you can expect this.  If he'd been brought up speaking Minbari, points 1 and 2 would have been obvious to him.         Mel. Yes Klingon's are a product of their moronic society, not their moronic

Re: numpy NaN, not surviving pickle/unpickle?

2009-09-14 Thread Scott David Daniels
Steven D'Aprano wrote: On Sun, 13 Sep 2009 17:58:14 -0500, Robert Kern wrote: Exactly -- there are 2**53 distinct floats on most IEEE systems, the vast majority of which might as well be random. What's the point of caching numbers like 2.5209481723210079? Chances are it will never come up

Re: Python and 3d

2009-09-14 Thread Kevin MacPhail
On Sun, Sep 13, 2009 at 2:29 PM, Ryniek90 rynie...@gmail.com wrote: azrael wrote: Has anyone any exipience with python and 3d. I mean, is there a module to deal with popular 3d formats like 3ds, or vrml. is it possible to import into python opengl models and then use it in

Re: Why indentation is use to denote block of code?

2009-09-14 Thread Andreas Waldenburger
On Sun, 13 Sep 2009 21:43:49 -0700 (PDT) TerryP bigboss1...@gmail.com wrote: Not to be omega-rude and disrespectful, but if you have to ask such a question -- you are either to stupid a programmer to warrant any intellectual response, or are just interested in wasting peoples bandwidth.

Re: Google Code Jam language usage

2009-09-14 Thread Andreas Waldenburger
On Mon, 14 Sep 2009 11:17:02 -0400 Terry Reedy tjre...@udel.edu wrote: At the recent Google Code Jam, Python was the 3rd most popular language after C/C++ and Java. Good for C/C++ and Java that they are not ranked by fun per line. /W -- INVALID? DE! --

Re: Python and 3d

2009-09-14 Thread Olivier Renouard
Kevin MacPhail wrote: On Sun, Sep 13, 2009 at 2:29 PM, Ryniek90 rynie...@gmail.com mailto:rynie...@gmail.com wrote: azrael wrote: Has anyone any exipience with python and 3d. I mean, is there a module to deal with popular 3d formats like 3ds, or

Re: An assessment of the Unicode standard

2009-09-14 Thread r
On Sep 14, 9:11 am, Processor-Dev1l processor.de...@gmail.com wrote: (snip) Well, I am from one of the non-English speaking countries (Czech Republic). We were always messed up with windows-1250 or iso-8859-2. Unicode is really great thing for us and for our developers. Yes you need the

Re: An assessment of the Unicode standard

2009-09-14 Thread r
On Sep 14, 9:23 am, Christopher Culver crcul...@christopherculver.com wrote: (snip) That researcher does not say that language *constrains* thought, which was the assertion of the OP and of the strict form of the Sapir-Whorf hypothesis. She merely says that it may influence thought. *I* am the

Re: myparentclass.__subclasses__() not working for me

2009-09-14 Thread Gabriel Genellina
En Mon, 14 Sep 2009 10:30:07 -0300, samwyse samw...@gmail.com escribió: ### I've tried this under both Python 2.5.1 and 3.1.1, and it isn't working with either one. Here is my program: class Plugin(object): This is the base object for a plug-in. pass def

Re: Message box always appears on 2nd monitor

2009-09-14 Thread ed
Sean DiZazzo wrote: On Sep 11, 8:27 am, ed e...@nospam.net wrote: No matter what I do, the MessageBox always appears on the 2nd monitor. I've forced all the other widgets to monitor 1. I thought that creating a class and forcing the position would help, but it hasn't. I'm using Ubuntu Jaunty,

Google Code Jam language usage

2009-09-14 Thread Terry Reedy
At the recent Google Code Jam, Python was the 3rd most popular language after C/C++ and Java. From qualification round http://www.go-hero.net/jam/09/languages/0 Language #contests (rounded) C/C++ 4200 Java 1900 Python 900 C# 600 Perl 300 Ruby 200 PHP 200 --

Check if button is pressed in QDialogButtonBox

2009-09-14 Thread Kashif Umer
Hello, I am new to Python and I'm working with a UI that has a dialog button box with 'OK' and 'Cancel' standard buttons. I want to check if the 'OK' button has been pressed, but I can't use isDown or isChecked for example because it throws an attribute error: AttributeError: 'StandardButton'

Re: Why indentation is use to denote block of code?

2009-09-14 Thread rurpy
On 09/13/2009 10:43 PM, TerryP wrote: On Sep 13, 10:12 pm, Peng Yu pengyu...@gmail.com wrote: Hi, I want to understand why python use indentation to denote block of code. What are the advantages of it? Is there a style in python to denote a block of code the same as that of C++ (with '{}')?

Re: Why indentation is use to denote block of code?

2009-09-14 Thread TerryP
Not to be omega-rude and disrespectful either but if you think tradeoffs made in designing a language, such as the choice of indents or braces to denote blocks, are simple and obvious ones, then you are either a very stupid person, or are trying to vent your anger from the safety of a remote

Re: numpy NaN, not surviving pickle/unpickle?

2009-09-14 Thread Terry Reedy
Gabriel Genellina wrote: En Sun, 13 Sep 2009 20:53:26 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au escribió: There may be something to be said for caching common floats, like pi, small integers (0.0, 1.0, 2.0, ...), 0.5, 0.25 and similar, but I doubt the memory savings would be

Re: Iterating Through Dictionary of Lists

2009-09-14 Thread JB
On Sep 11, 9:42 am, Stefan Behnel stefan...@behnel.de wrote: JBwrote: I have created a small program that generates a project tree from a dictionary. The dictionary is of key/value pairs where each key is a directory, and each value is a list. The list have unique values corresponding to

Re: Why indentation is use to denote block of code?

2009-09-14 Thread Terry Reedy
Miles Kaufmann wrote: whitespace-preserving [code] tag, though; and pindent is relatively old, and apparently not well maintained (no support for with blocks)). http://bugs.python.org/issue6912 Add 'with' block support to Tools/Scripts/pindent.py --

Re: Why indentation is use to denote block of code?

2009-09-14 Thread Robert Kern
On 2009-09-14 12:42 PM, TerryP wrote: I'm not a person who believes in mincing words off the first date, so I apologize (OP included) if my choice of words were too harsh. There's no intention of attacking or defending anything, just of being concise! I would never have thought to describe

Re: An assessment of the Unicode standard

2009-09-14 Thread Terry Reedy
r wrote: So how many letters do we need? 50, 100, 1000? From Wikipedia IPA article: Occasionally symbols are added, removed, or modified by the International Phonetic Association. As of 2008, there are 107 distinct letters, 52 diacritics, and four prosody marks in the IPA proper. --

Re: Writing a thread-safe class

2009-09-14 Thread News123
So what's recommended way for multicore machines? Threads will probably only accelerate if the used C libraries are releasing the GIL, right? What's for example about PIL (Python Imaging library)? Assuming, that the C library calls don't releas the GIL Shoud I directly use use fork() and

Re: Writing a thread-safe class

2009-09-14 Thread MRAB
News123 wrote: So what's recommended way for multicore machines? Threads will probably only accelerate if the used C libraries are releasing the GIL, right? What's for example about PIL (Python Imaging library)? Assuming, that the C library calls don't releas the GIL Shoud I directly use

Re: Google Code Jam language usage

2009-09-14 Thread Stefan Behnel
Andreas Waldenburger wrote: On Mon, 14 Sep 2009 11:17:02 -0400 Terry Reedy wrote: At the recent Google Code Jam, Python was the 3rd most popular language after C/C++ and Java. Good for C/C++ and Java that they are not ranked by fun per line. Oh, I actually tend to have a lot of fun per

Re: Odd/Weird errors with FTPLib

2009-09-14 Thread Bakes
On Sep 13, 11:47 pm, MRAB pyt...@mrabarnett.plus.com wrote: Bakes wrote: On 13 Sep, 22:41, Chris Rebert c...@rebertia.com wrote: On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote: I am using a simple python script to download my logfiles. This is on a while loop, the logfile

Re: An assessment of the Unicode standard

2009-09-14 Thread Rhodri James
On Mon, 14 Sep 2009 19:24:44 +0100, Terry Reedy tjre...@udel.edu wrote: r wrote: So how many letters do we need? 50, 100, 1000? From Wikipedia IPA article: Occasionally symbols are added, removed, or modified by the International Phonetic Association. As of 2008, there are 107 distinct

Re: Why indentation is use to denote block of code?

2009-09-14 Thread Ben Finney
TerryP bigboss1...@gmail.com writes: Not to be omega-rude and disrespectful, but if you have to ask such a question -- you are either to stupid a programmer to warrant any intellectual response, or are just interested in wasting peoples bandwidth. If you think this is “not to be rude and

Retracing your steps in an interactive python env

2009-09-14 Thread Jack Norton
Hello all, I am playing around in a python shell (IPython on win32 right now actually). I am writing some code on the fly to interface to a rotary encoder (not important in this scope). Anyway, I have created a function using def, and well, I like the way it is working, however... I have

FW: Python / C++

2009-09-14 Thread Jeffrey Murphy
Hi Michael, Thought this might be of interest to you... client is in Newport Beach...the job description is below...either ping me back with your resume and I will screen you for this role or give me a call for details... We are seeking Python programmers with web-based development experience

Re: Why indentation is use to denote block of code?

2009-09-14 Thread r
On Sep 14, 5:20 pm, Ben Finney ben+pyt...@benfinney.id.au wrote: TerryP bigboss1...@gmail.com writes: Not to be omega-rude and disrespectful, but if you have to ask such a question -- you are either to stupid a programmer to warrant any intellectual response, or are just interested in

Re: Retracing your steps in an interactive python env

2009-09-14 Thread r
On Sep 14, 2:52 pm, Jack Norton j...@0x6a.com wrote: Hello all, I am playing around in a python shell (IPython on win32 right now actually).  I am writing some code on the fly to interface to a rotary encoder (not important in this scope). Anyway, I have created a function using def, and

Re: Retracing your steps in an interactive python env

2009-09-14 Thread Mensanator
On Sep 14, 2:52 pm, Jack Norton j...@0x6a.com wrote: Hello all, I am playing around in a python shell (IPython on win32 right now actually).  I am writing some code on the fly to interface to a rotary encoder (not important in this scope). Anyway, I have created a function using def, and

Re: Distributing Python environment

2009-09-14 Thread Ecir Hana
I see, thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: Retracing your steps in an interactive python env

2009-09-14 Thread TerryP
I'm not sure what the best way to do this is, other then that it would mean asking the interp to explain it in a format we understand ;). In the (c)python library reference, I see an inspect module that sounds like it should be useful, but it doesn't work on my test case here: def foo(x, y):

Re: platform-specific overrides of functions and class methods (expanding on imputils demo code)

2009-09-14 Thread lkcl
On Sep 6, 5:49 pm, Terry Reedy tjre...@udel.edu wrote: lkclwrote: On Aug 21, 12:58 am, a...@pythoncraft.com (Aahz) wrote: In article 77715735-2668-43e7-95da-c91d175b3...@z31g2000yqd.googlegroups.com, lkcl luke.leigh...@googlemail.com wrote: if somebody would like to add this to the

Re: Retracing your steps in an interactive python env

2009-09-14 Thread Steven D'Aprano
On Mon, 14 Sep 2009 14:52:34 -0500, Jack Norton wrote: it would be really nice to be able to _ask_ python what makes up a def. Something like this (remember I am using IPython interactive interpreter session): In [0]: def func(input): .:print im in this function! + str(input)

Re: Programming ideas?

2009-09-14 Thread r
On Sep 12, 9:25 am, Mark Tolonen metolone+gm...@gmail.com wrote: Someone Something fordhai...@gmail.com wrote in message news:e196a4050909120713m76592252r9e89fb24fdaae...@mail.gmail.com... I know you've probably had this question a million and one times but here it is again. I'm

Re: Odd/Weird errors with FTPLib

2009-09-14 Thread MRAB
Bakes wrote: On Sep 13, 11:47 pm, MRAB pyt...@mrabarnett.plus.com wrote: Bakes wrote: On 13 Sep, 22:41, Chris Rebert c...@rebertia.com wrote: On Sun, Sep 13, 2009 at 2:34 PM, Bakes ba...@ymail.com wrote: I am using a simple python script to download my logfiles. This is on a while loop, the

Re: Retracing your steps in an interactive python env

2009-09-14 Thread Robert Kern
Steven D'Aprano wrote: I wonder whether there's a third party module which will take the output of dis.dis and try to reverse engineer Python code from it? There used to be decompyle, but it hasn't been kept up-to-date, at least not publicly. There used to be a service that would use an

How to improve this code?

2009-09-14 Thread Oltmans
Hello, Is there someway I can improve the following code(pythonically)? (Copying from IDLE) match=[1,2,3,4,5] def elementsPresent(aList): result=False if not aList: return False for e in aList: if e in match:

Re: How to improve this code?

2009-09-14 Thread Diez B. Roggisch
Oltmans schrieb: Hello, Is there someway I can improve the following code(pythonically)? (Copying from IDLE) match=[1,2,3,4,5] def elementsPresent(aList): result=False if not aList: return False for e in aList: if e in match:

python decimals

2009-09-14 Thread Andrew Svetlov
Is there some kind of python binding for decNumber library? Standard decimal.Decimal is good enough, but very slow. My current project toughly coupled with 'currency' operations and we have performance problems related to decimal calculations. From my perspective decNumber is fast and has well

Re: How to improve this code?

2009-09-14 Thread André
On Sep 14, 10:16 pm, Diez B. Roggisch de...@nospam.web.de wrote: Oltmans schrieb: Hello, Is there someway I can improve the following code(pythonically)? (Copying from IDLE) match=[1,2,3,4,5] def elementsPresent(aList):    result=False    if not aList:            return False

Re: VT100 in Python

2009-09-14 Thread exarkun
On 09:29 am, n...@craig-wood.com wrote: Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Sunday 13 September 2009, Nadav Chernin wrote: I'm writing program that read data from some instrument trough RS232. This instrument send data in VT100 format. I need only to extract the text

Remove empty strings from list

2009-09-14 Thread Helvin
Hi, Sorry I did not want to bother the group, but I really do not understand this seeming trivial problem. I am reading from a textfile, where each line has 2 values, with spaces before and between the values. I would like to read in these values, but of course, I don't want the whitespaces

Re: Remove empty strings from list

2009-09-14 Thread Chris Rebert
On Mon, Sep 14, 2009 at 6:49 PM, Helvin helvin...@gmail.com wrote: Hi, Sorry I did not want to bother the group, but I really do not understand this seeming trivial problem. I am reading from a textfile, where each line has 2 values, with spaces before and between the values. I would like

Re: How to improve this code?

2009-09-14 Thread Tim Chase
def elementsPresent(aList, match): match = set(match) for item in aList: if item in match: return True return False This could be rewritten in Python2.5+ as def elementsPresent(aList, match): match = set(match) return any(elem in match for elem in

Re: Remove empty strings from list

2009-09-14 Thread tec
Chris Rebert 写道: On Mon, Sep 14, 2009 at 6:49 PM, Helvin helvin...@gmail.com wrote: Hi, Sorry I did not want to bother the group, but I really do not understand this seeming trivial problem. I am reading from a textfile, where each line has 2 values, with spaces before and between the values.

Re: Remove empty strings from list

2009-09-14 Thread tec
Helvin 写道: Hi, Sorry I did not want to bother the group, but I really do not understand this seeming trivial problem. I am reading from a textfile, where each line has 2 values, with spaces before and between the values. I would like to read in these values, but of course, I don't want the

Incremental project based programming guide

2009-09-14 Thread bouncy...@gmail.com
I was wondering if anyone had actually designed their programming text around incremental parts of a project and then taken the results of the project at each chapter and created something of value. specifically in referwnce to python however other examples. ALl of education was around

Re: Remove empty strings from list

2009-09-14 Thread Helvin Lui
Thanks Chris! Thanks for the quick reply. Indeed this is the case! I have now written out a new list, instead of modifying the list I am iterating over. Logged at my blog: http://learnwithhelvin.blogspot.com/2009/09/python-loop-and-modify-list.html Regards, Helvin =) On Tue, Sep 15, 2009 at

Re: VT100 in Python

2009-09-14 Thread bouncy...@gmail.com
I hate to ask but what kind of device.and what`s with all the `insult` strings? - gimmick? --Original Message-- From: exar...@twistedmatrix.com To: python-list@python.org Date: Mon, 14 Sep 2009 01:43:11 PM + Subject: Re: VT100 in Python On 09:29 am, n...@craig-wood.com wrote:

Re: Remove empty strings from list

2009-09-14 Thread Dave Angel
Helvin wrote: Hi, Sorry I did not want to bother the group, but I really do not understand this seeming trivial problem. I am reading from a textfile, where each line has 2 values, with spaces before and between the values. I would like to read in these values, but of course, I don't want the

Re: VT100 in Python

2009-09-14 Thread Jerry Hill
On Mon, Sep 14, 2009 at 10:58 PM, bouncy...@gmail.com bouncy...@gmail.com wrote: From: exar...@twistedmatrix.com http://twistedmatrix.com/documents/current/api/twisted.conch.insults.insults.ITerminalTransport.html

Re: New Tkinter windows don't get focus on OS X

2009-09-14 Thread Joshua Bronson
On Sep 11, 3:53 am, eb303 eric.bru...@pragmadev.com wrote: For the OP: the problem comes from the tcl/tk level. Running a tcl script just opening a window from the terminal shows the same behaviour. You might want to forward the question to the tcl guys. Done:

AttributeError: 'NoneType' object has no attribute 'get_text'

2009-09-14 Thread Raji Seetharaman
-- Forwarded message -- From: MRAB pyt...@mrabarnett.plus.com To: python-list@python.org Date: Sun, 13 Sep 2009 19:44:30 +0100 Subject: Re: AttributeError: 'NoneType' object has no attribute 'get_text' Raji Seetharaman wrote: Hi all, i did a small gui addressbook

Re: Remove empty strings from list

2009-09-14 Thread Gabriel Genellina
En Mon, 14 Sep 2009 23:33:05 -0300, tec technic@gmail.com escribió: or use filter list=filter(lambda x: len(x)0, list) For strings, len(x)0 = len(x) = x, so the above statement is equivalent to: list=filter(lambda x: x, list) which according to the documentation is the same as:

Re: Retracing your steps in an interactive python env

2009-09-14 Thread TerryP
Under unix and cygwin, it's also possible to use GNU Screen, along with a much larger then default defscrollback value. -- http://mail.python.org/mailman/listinfo/python-list

Re: Remove empty strings from list

2009-09-14 Thread Steven D'Aprano
On Mon, 14 Sep 2009 18:55:13 -0700, Chris Rebert wrote: On Mon, Sep 14, 2009 at 6:49 PM, Helvin helvin...@gmail.com wrote: ... I have looked at documentation, and how strings and lists work, but I cannot understand the behaviour of the following: ...                        for item in

MayaVi install

2009-09-14 Thread Gib
I am trying to follow the instructions for installing MayaVi given on the Enthought site: http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/installation.html I'm following the step-by-step instructions to install with eggs under Windows. When I get to this point:

VTK install

2009-09-14 Thread Gib
As part of the MayaVi install, I need to install VTK. Follwoing the Enthought instructions, I went here: http://cpbotha.net/2009/08/13/python-2-6-enabled-vtk-5-4-windows-binaries/ and installed vtk-5.4. I modified the PATH and also created an environment variable PYTHONPATH as directed, setting

Re: Remove empty strings from list

2009-09-14 Thread Join hack
good solution ,thanks~! 2009/9/15 Steven D'Aprano ste...@remove.this.cybersource.com.au On Mon, 14 Sep 2009 18:55:13 -0700, Chris Rebert wrote: On Mon, Sep 14, 2009 at 6:49 PM, Helvin helvin...@gmail.com wrote: ... I have looked at documentation, and how strings and lists work, but I

overrideredirect vs. text entry etc. widget

2009-09-14 Thread kernus
I just googled this post: http://mail.python.org/pipermail/python-list/2006-September/575832.html something like: from Tkinter import * root = Tk() Entry(root).pack() Button(root, text='Quit', command=sys.exit).pack() root.overrideredirect(1) root.mainloop() the button works boths under

  1   2   >