ANN: Urwid 0.9.8 - Console UI Library

2007-03-26 Thread Ian Ward
Announcing Urwid 0.9.8 -- Urwid home page: http://excess.org/urwid/ Tarball: http://excess.org/urwid/urwid-0.9.8.tar.gz About this release: === This release improves Urwid's performance by 70% to 450% (reducing running time by 41% to 82%)[1] for some

Unicode zipping from Python code?

2007-03-26 Thread durumdara
Hi! As I experienced in the year 2006, the Python's zip module is not unicode-safe. With the hungarian filenames I got wrong result. I need to convert iso-8859-2 to cp852 chset to get good result. As I see, this module is a command line tool imported as extension. Now I search for something

cgi python

2007-03-26 Thread Piyali Biswas
Hi Christian, I have seen your well-solved cgi-python answers. That's why I think you would be able to answer my query related to the same. I am writing a cgi program and placing it in cgi-bin folder of Apache Server. Now I have written a python script in the same folder to generate a graph

Re: any ways to judge whether an object is initilized or not in a class

2007-03-26 Thread Antoon Pardon
On 2007-03-20, Alex Martelli [EMAIL PROTECTED] wrote: Steven D'Aprano [EMAIL PROTECTED] wrote: ... There are plenty of reasons for preferring new style classes. If those reasons hold for you, then of course you should use new style classes. But that's not the same thing as saying that

Re: Create new processes over telnet in XP

2007-03-26 Thread Laurent Pointal
Shane Geiger a écrit : This reminds me of something I once wanted to do: How can I install Python in a totally non-gui way on Windows (without the use of VNC)? I think I was telnetted into a computer (or something like that) and I was unable to run the usual Python installer because it uses

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-26 Thread Michael Bentley
On Mar 26, 2007, at 1:30 AM, Thomas Dybdahl Ahle wrote: Hi, I've writing a python application in which I'd like to have a small ping label, to always tell the current ping time to the server. It seems however that I have to be root to send those imcp packages, but I guess there must be

Re: Create new processes over telnet in XP

2007-03-26 Thread Tim Golden
Laurent Pointal wrote: Shane Geiger a écrit : This reminds me of something I once wanted to do: How can I install Python in a totally non-gui way on Windows (without the use of VNC)? I think I was telnetted into a computer (or something like that) and I was unable to run the usual Python

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-26 Thread Michael Bentley
On Mar 26, 2007, at 1:30 AM, Thomas Dybdahl Ahle wrote: It seems however that I have to be root to send those imcp packages, but I guess there must be a workaround since I can easily use the ping command as ordinary user. The workaround your ping command is using btw, is probably

Calling Queue experts

2007-03-26 Thread jrpfinch
I have a script which is based on the following code. Unfortunately, it only works on Python 2.3 and not 2.5 because there is no esema or fsema attribute in the 2.5 Queue. I am hunting through the Queue.py code now to try to figure out how to make it work in 2.5, but as I am a beginner, I am

Re: Pattern for foo tool - API - shell|GUI

2007-03-26 Thread Anastasios Hatzis
On Sunday 25 March 2007 16:44, Steven Bethard wrote: Anastasios Hatzis wrote: I'm working on a tool which is totally command-line based and consisting of multiple scripts. The user can execute a Python script in the shell, this script does some basic verification before delegating a call

Re: Create new processes over telnet in XP

2007-03-26 Thread Tim Golden
Tim Golden wrote: Laurent Pointal wrote: Shane Geiger a écrit : This reminds me of something I once wanted to do: How can I install Python in a totally non-gui way on Windows (without the use of VNC)? I think I was telnetted into a computer (or something like that) and I was unable to run

Re: problem at installing phyton on windows

2007-03-26 Thread bryan rasmussen
Obviously, Phyton will never be defined. Indeed I remember in the climactic showdown between Phyton and the rest of the gamma ranger FooDroids and he kept doing the mega kick move. and I was thinking wow Phyton will never be defined, he will just keep kicking ass. I hear they're gonna make a

Re: A better webpage filter

2007-03-26 Thread Anton Vredegoor
John J. Lee wrote: http://webcleaner.sourceforge.net/ Thanks, I will look into it sometime. Essentially my problem has been solved by switching to opera, but old habits die hard and I find myself using Mozilla and my little script more often than would be logical. Maybe the idea of having a

Grid and scrollbars

2007-03-26 Thread BH
Hi, I am trying to build my own IHM with two treeCtrl and 1 grid, based on the wx.aui demos. My problem is with the Grid. It dosen't have scrollbars. I tried many methods (fit) but it always fail. Can somebody point me where is the mistake ? Thx #!/usr/bin/env python # -*- coding: utf-8 -*-

Re: detect suprocess interaction

2007-03-26 Thread Nick Craig-Wood
Robin Becker [EMAIL PROTECTED] wrote: I'm using subprocess to carry out svn commands (probably should use the svn api package, but that's a dependency too far). Anyhow my code looks like from subprocess import Popen, PIPE p = Popen((svn,'ls',u),stdout=PIPE,stderr=PIPE) i = p.wait()

Re: Python object overhead?

2007-03-26 Thread Bruno Desthuilliers
Matt Garman a écrit : I'm trying to use Python to work with large pipe ('|') delimited data files. Looks like a job for the csv module (in the standard lib). The files range in size from 25 MB to 200 MB. Since each line corresponds to a record, what I'm trying to do is create an object

Re: Python object overhead?

2007-03-26 Thread Bruno Desthuilliers
Felipe Almeida Lessa a écrit : On 3/23/07, Bjoern Schliessmann [EMAIL PROTECTED] wrote: (Note that almost everything in Python is an object!) Could you tell me what in Python isn't an object? statements and expressions ?-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-26 Thread Michal 'vorner' Vaner
On Mon, Mar 26, 2007 at 08:30:16AM +0200, Thomas Dybdahl Ahle wrote: Hi, I've writing a python application in which I'd like to have a small ping label, to always tell the current ping time to the server. It seems however that I have to be root to send those imcp packages, but I guess

Re: creating jsp-like tool with python

2007-03-26 Thread Bruno Desthuilliers
jd a écrit : I'd like to create a program that takes files with jsp-like markup and processes the embedded code (which would be python) to produce the output file. There would be two kinds of sections in the markup file: python code to be evaluated, and python code that returns a value that

Re: Python object overhead?

2007-03-26 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : Matt Garman a écrit : (snip) class FileRecord(object): def __init__(self, line): self.line = line If this is your real code, I don't see any reason why this should eat up 3 times more space than the original version. Hem... Forget about this

Re: Calling Queue experts

2007-03-26 Thread jrpfinch
Got it. New PickleQueue class should be as follows: import Queue import cPickle class PickleQueue(Queue.Queue): A multi-producer, multi-consumer, persistent queue. def __init__(self, filename, maxsize=0): Initialize a persistent queue with a filename and maximum size.

with timeout(...):

2007-03-26 Thread Nick Craig-Wood
Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded: print Oops - took too long! And have it work reliably and in a cross platform way!

Re: with timeout(...):

2007-03-26 Thread James Stroud
Nick Craig-Wood wrote: Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded: print Oops - took too long! And have it work

Re: Need help to learn Python

2007-03-26 Thread Eddie Corns
wesley chun [EMAIL PROTECTED] writes: with that said, i would still like to state that the book's target audience is for people who know how to program but need to pick up Python as quickly as possible. the theory that's in the book is really more explanation of how the Python interpreter works,

Re: functions, classes, bound, unbound?

2007-03-26 Thread Bruno Desthuilliers
7stud a écrit : ...classes don't invoke the function directly, they convert it to an 'unbound method' object:: (snip) If you really want to get to the original function, there are a couple of options. No. Just trying to figure out how some things work. Most of Python's object model is

Re: Other classes in a module

2007-03-26 Thread Bruno Desthuilliers
Daniel Nogradi a écrit : Can an instance of a class in a module, in any simple way find out which other classes that exists in said module ? # module x ## class c1: pass class c2: pass ### Python 2.5 (r25:51908, Nov 1 2006, 11:42:37) [GCC

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-26 Thread Nick Craig-Wood
Michael Bentley [EMAIL PROTECTED] wrote: On Mar 26, 2007, at 1:30 AM, Thomas Dybdahl Ahle wrote: It seems however that I have to be root to send those imcp packages, but I guess there must be a workaround since I can easily use the ping command as ordinary user. The workaround your

Re: the second of nested buttons using textvariable remains void!

2007-03-26 Thread Samkos
Thanks a lot Jim and James now it works fine! Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: python on window

2007-03-26 Thread sandeep patil
i have written this program but i have gott following error, in anather proram indentation error sir how i will indent in my editor #test.py def invert(table): index=() for key in table: value=table[key] if not index.has_key(value):

Re: with timeout(...):

2007-03-26 Thread Diez B. Roggisch
Nick Craig-Wood wrote: Did anyone write a contextmanager implementing a timeout for python2.5? I'd love to be able to write something like with timeout(5.0) as exceeded: some_long_running_stuff() if exceeded: print Oops - took too long! And have it work

Re: python on window

2007-03-26 Thread Parthan SR
On 26 Mar 2007 05:00:54 -0700, sandeep patil [EMAIL PROTECTED] wrote: i have written this program but i have gott following error, in anather proram indentation error sir how i will indent in my editor #test.py def invert(table): index=() for key in table:

Re: Calling Queue experts

2007-03-26 Thread skip
jrpfinch # Some other I/O problem, reraise error jrpfinch raise err I'd just execute a bare raise (without err). That way the caller gets the stack trace of the actual IOError. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: A better webpage filter

2007-03-26 Thread Gabriel Genellina
En Mon, 26 Mar 2007 06:06:00 -0300, Anton Vredegoor [EMAIL PROTECTED] escribió: Thanks, I will look into it sometime. Essentially my problem has been solved by switching to opera, but old habits die hard and I find myself using Mozilla and my little script more often than would be logical.

Re: with timeout(...):

2007-03-26 Thread irstas
On Mar 26, 3:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: But to make that work reliably, it has to be ensured that no sideeffects occur while being in some_long_running_stuff. which doesn't only extend to python itself, but also external modules and systems (file writing, network

Re: Calling Queue experts

2007-03-26 Thread Gabriel Genellina
En Mon, 26 Mar 2007 07:29:32 -0300, jrpfinch [EMAIL PROTECTED] escribió: Got it. New PickleQueue class should be as follows: Only a comment: def _init(self, maxsize): # Implements Queue protocol _init for persistent queue. # Sets up the pickle files.

Re: python on window

2007-03-26 Thread Michael Bentley
On Mar 26, 2007, at 7:00 AM, sandeep patil wrote: i have written this program but i have gott following error, in anather proram indentation error sir how i will indent in my editor #test.py def invert(table): index=() for key in table: value=table[key]

osx tkinter listbox problem

2007-03-26 Thread Ben Collver
I am using Darwin 10.4.9, tcl 8.4.7, tk 8.4, and python 2.3.5. I have also tried Python 2.5 on Darwin, Debian, and Fedora Core 6. I am working on a GUI front-end to a Python program of mine. It is a simple grid with labels in the left column and input widgets in the right column. One of the

Fortran vs Python - Newbie Question

2007-03-26 Thread [EMAIL PROTECTED]
OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its a high level language nature, so what are the advantages of using Python for creating number

Zip file writing progress (callback proc)

2007-03-26 Thread durumdara
Hi! I want to check my zip file writings. I need some callback procedure to show a progress bar. Can I do that? I don't want to modify the PyLib module to extend it, because if I get another py, the changes are lost. This happening too if I copy the zip module to modify it. Any solution? Thanks

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Jean-Paul Calderone
On 26 Mar 2007 06:20:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are Python is hugely easier to read. quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread kyosohma
On Mar 26, 8:20 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its a high level language

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Michele Simionato
On Mar 26, 9:20 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its a high level language

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Bart Ogryczak
On Mar 26, 3:20 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its a high level language

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread [EMAIL PROTECTED]
On Mar 26, 2:42 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 26 Mar 2007 06:20:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are Python is hugely easier to read. quite useful in creating scientific apps

web development with python - comparison

2007-03-26 Thread Istvan Albert
Here is a comprehensive review of python web apps: http://jesusphreak.infogami.com/blog/vrp1 Since this comes up every so often in this group. i. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Jean-Paul Calderone
On 26 Mar 2007 06:47:18 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mar 26, 2:42 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 26 Mar 2007 06:20:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread stef
You can get the speed of fortran in Python by using libraries like Numeric without losing the readability of Python. Can you back this up with some source?? Chris Is this really the most important issue in your choice ? As said by others, Portability, scalability RAD as an

Re: To count number of quadruplets with sum = 0

2007-03-26 Thread mark . dufour
FWIW, the original program can also be compiled with Shed Skin (http:// mark.dufour.googlepages.com), an experimental (static-)Python-to-C++ compiler, resulting in a speedup of about 8 times for a single test with 500 tuples. here's a slightly modified version that works with Shed Skin CVS

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Andy Dingley
On 26 Mar, 14:20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: what are the advantages of using Python for creating number crunching apps over Fortran?? If you have to ask, you've not experienced enough Fortran to know its sheer horror. You can write programs in Python that do usefully

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread [EMAIL PROTECTED]
On 26 Mar, 15:06, stef [EMAIL PROTECTED] wrote: You can get the speed of fortran in Python by using libraries like Numeric without losing the readability of Python. Can you back this up with some source?? Chris Is this really the most important issue in your choice ? As said by

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread irstas
On Mar 26, 4:47 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: You can get the speed of fortran in Python by using libraries like Numeric without losing the readability of Python. Can you back this up with some source?? Chris If you execute one command in Python which tells a

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Alex Martelli
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ... So I'ld suggest to start with downloading the Enthought edition of Python, and you can judge for yourself within 10 minutes, if it's fast enough. cheers, Stef Mientki Is there a mac version??

Re: A better webpage filter

2007-03-26 Thread Anton Vredegoor
Gabriel Genellina wrote: If you don't mind using JavaScript instead of Python, UserJS is for you: http://www.opera.com/support/tutorials/userjs/ My script loads a saved copy of a page and uses it to open an extra tab with a filtered view. It also works when javascript is disabled. A. --

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-26 Thread Thomas Dybdahl Ahle
Den Mon, 26 Mar 2007 11:24:34 +0200 skrev Michal 'vorner' Vaner: On Mon, Mar 26, 2007 at 08:30:16AM +0200, Thomas Dybdahl Ahle wrote: Do anybody know how to do this in python? You need root for that and the ping command is allowed to have them by suid bit. You can execute ping from inside

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-26 Thread Thomas Dybdahl Ahle
Den Mon, 26 Mar 2007 06:30:04 -0500 skrev Nick Craig-Wood: Michael Bentley [EMAIL PROTECTED] wrote: On Mar 26, 2007, at 1:30 AM, Thomas Dybdahl Ahle wrote: It seems however that I have to be root to send those imcp packages, but I guess there must be a workaround since I can easily use the

Re: Zip file writing progress (callback proc)

2007-03-26 Thread irstas
On Mar 26, 4:41 pm, durumdara [EMAIL PROTECTED] wrote: Hi! I want to check my zip file writings. I need some callback procedure to show a progress bar. Can I do that? I don't want to modify the PyLib module to extend it, because if I get another py, the changes are lost. This happening too

Re: Sending ECHO_REQUEST (pinging) with python

2007-03-26 Thread Jean-Paul Calderone
On Mon, 26 Mar 2007 16:50:33 +0200, Thomas Dybdahl Ahle [EMAIL PROTECTED] wrote: Den Mon, 26 Mar 2007 06:30:04 -0500 skrev Nick Craig-Wood: Michael Bentley [EMAIL PROTECTED] wrote: On Mar 26, 2007, at 1:30 AM, Thomas Dybdahl Ahle wrote: It seems however that I have to be root to send those

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 26 Mar 2007 06:20:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are Python is hugely easier to read. quite useful in creating scientific

Re: Python object overhead?

2007-03-26 Thread Matt Garman
On 3/23/07, Bjoern Schliessmann [EMAIL PROTECTED] wrote: one blank line == EOF? That's strange. Intended? In my case, I know my input data doesn't have any blank lines. However, I'm glad you (and others) clarified the issue, because I wasn't aware of the better methods for checking for EOF.

Re: Python object overhead?

2007-03-26 Thread Matt Garman
On 3/23/07, Jack Diederich [EMAIL PROTECTED] wrote: If you make the record a new style class (inherit from object) you can specify the __slots__ attribute on the class. This eliminates the per instance dictionary overhead in exchange for less flexibility. When you say new style class, do you

calling class instances and their methods

2007-03-26 Thread spohle
hi, i created an instance of a my own class which has methods and all. now i get an outside function called, which is unfortunatly not aware of the instace at all (i don't control how this outside function is called). but i would like to get access back to my instance and it's methods. is there

wx.grid problem

2007-03-26 Thread BH
Hi ! I have a small problem with wx.Grid and scrollbars. Scrollbars definitively dissapears after resizing the frame. Thx for help #-- import wx,wx.grid #--

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Ramon Diaz-Uriarte
On 26 Mar 2007 06:20:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its a high level

Re: Python object overhead?

2007-03-26 Thread Jean-Paul Calderone
On Mon, 26 Mar 2007 09:13:58 -0600, Matt Garman [EMAIL PROTECTED] wrote: On 3/23/07, Jack Diederich [EMAIL PROTECTED] wrote: If you make the record a new style class (inherit from object) you can specify the __slots__ attribute on the class. This eliminates the per instance dictionary overhead

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Carl Banks
On Mar 26, 10:11 am, Andy Dingley [EMAIL PROTECTED] wrote: On 26 Mar, 14:20, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: what are the advantages of using Python for creating number crunching apps over Fortran?? If you have to ask, you've not experienced enough Fortran to know its sheer

Re: Python object overhead?

2007-03-26 Thread Gabriel Genellina
On Mar 26, 12:13 pm, Matt Garman [EMAIL PROTECTED] wrote: On 3/23/07, Jack Diederich [EMAIL PROTECTED] wrote: If you make the record a new style class (inherit from object) you can specify the __slots__ attribute on the class. This eliminates the per instance dictionary overhead in

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread sturlamolden
On Mar 26, 3:20 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its a high level language nature, so

Re: calling class instances and their methods

2007-03-26 Thread Gabriel Genellina
On Mar 26, 12:00 pm, spohle [EMAIL PROTECTED] wrote: i created an instance of a my own class which has methods and all. now i get an outside function called, which is unfortunatly not aware of the instace at all (i don't control how this outside function is called). but i would like to get

PMW widget - skip tabbing to it

2007-03-26 Thread jp
I have multiple PMW widgets (EntryFields, ScrolledField etc), how can I skip over these widgets when using the tab key? Thank you, John -- http://mail.python.org/mailman/listinfo/python-list

Kill thread or at least socket.getaddrinfo

2007-03-26 Thread Thomas Dybdahl Ahle
Hi, I'm writing an application that connects to the internet. Something like this: for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: self.sock = socket.socket(af, socktype, proto) Now if the user press the cancel

Re: calling class instances and their methods

2007-03-26 Thread Erik Johnson
spohle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi, i created an instance of a my own class which has methods and all. now i get an outside function called, which is unfortunatly not aware of the instace at all (i don't control how this outside function is called). but i

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : On Mar 26, 8:20 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its

Re: wx.grid problem

2007-03-26 Thread kyosohma
On Mar 26, 10:20 am, BH [EMAIL PROTECTED] wrote: Hi ! I have a small problem with wx.Grid and scrollbars. Scrollbars definitively dissapears after resizing the frame. Thx for help #-- import wx,wx.grid

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: . . . You can get the speed of fortran in Python by using libraries like Numeric without losing the readability of Python. Can you back this up with

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: . . . Is there a mac version?? Thanks Chris Yes. Several, in fact--all available at no charge. The Python world is different from what experience

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ... So I'ld suggest to start with downloading the Enthought edition of Python, and you can judge for yourself within 10 minutes, if it's fast enough. cheers, Stef Mientki

Re: call to function by text variable

2007-03-26 Thread Cameron Laird
In article [EMAIL PROTECTED], Steve Holden [EMAIL PROTECTED] wrote: Cameron Laird wrote: In article [EMAIL PROTECTED], Jan Schilleman [EMAIL PROTECTED] wrote: Hi, try this: func = getattr(operations, [Replace, ChangeCase, Move][n]) HTH, Jan ianaré [EMAIL PROTECTED] schreef in bericht

Re: Kill thread or at least socket.getaddrinfo

2007-03-26 Thread kyosohma
On Mar 26, 10:53 am, Thomas Dybdahl Ahle [EMAIL PROTECTED] wrote: Hi, I'm writing an application that connects to the internet. Something like this: for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res try: self.sock =

Re: How to find tag to /tag HTML strings and 'save' them?

2007-03-26 Thread Max Erickson
John Nagle [EMAIL PROTECTED] wrote: htags = soup.findAll({'h2':True, 'H2' : True}) # get all H2 tags, both cases Have you been bitten by this? When I read this, I was operating under the assumption that BeautifulSoup wasn't case sensitive, and then I tried this: import BeautifulSoup as BS

Re: Python object overhead?

2007-03-26 Thread Bruno Desthuilliers
Matt Garman a écrit : (snip) Also, many folks have suggested operating on only one line at a time (i.e. not storing the whole data set). Unfortunately, I'm constantly looking forward and backward in the record set while I process the data (i.e., to process any particular record, I sometimes

Re: functions, classes, bound, unbound?

2007-03-26 Thread 7stud
On Mar 25, 3:09 pm, Steven Bethard [EMAIL PROTECTED] wrote: Here's another way of looking at it:: class Test(object): ... pass ... def greet(): ... print 'Hello' ... Test.greet = greet Test.greet unbound method Test.greet Interesting. After

Re: PMW widget - skip tabbing to it

2007-03-26 Thread kyosohma
On Mar 26, 10:51 am, jp [EMAIL PROTECTED] wrote: I have multiple PMW widgets (EntryFields, ScrolledField etc), how can I skip over these widgets when using the tab key? Thank you, John I would probably write some custom event handling. Something that could tell it was a key-press event and

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Robert Kern
Alex Martelli wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ... So I'ld suggest to start with downloading the Enthought edition of Python, and you can judge for yourself within 10 minutes, if it's fast enough. cheers, Stef Mientki Is there a mac version??

Re: PMW widget - skip tabbing to it

2007-03-26 Thread kyosohma
On Mar 26, 11:17 am, [EMAIL PROTECTED] wrote: On Mar 26, 10:51 am, jp [EMAIL PROTECTED] wrote: I have multiple PMW widgets (EntryFields, ScrolledField etc), how can I skip over these widgets when using the tab key? Thank you, John I would probably write some custom event handling.

Re: PMW widget - skip tabbing to it

2007-03-26 Thread jp
On Mar 26, 11:17 am, [EMAIL PROTECTED] wrote: On Mar 26, 10:51 am, jp [EMAIL PROTECTED] wrote: I have multiple PMW widgets (EntryFields, ScrolledField etc), how can I skip over these widgets when using the tab key? Thank you, John I would probably write some custom event handling.

Re: wx.grid problem

2007-03-26 Thread BH
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!! [EMAIL PROTECTED] a écrit : On Mar 26, 10:20 am, BH [EMAIL PROTECTED] wrote: Hi ! I have a small problem with wx.Grid and scrollbars. Scrollbars definitively dissapears after resizing the frame. Thx for help

Re: PMW widget - skip tabbing to it

2007-03-26 Thread jp
On Mar 26, 11:27 am, [EMAIL PROTECTED] wrote: On Mar 26, 11:17 am, [EMAIL PROTECTED] wrote: On Mar 26, 10:51 am, jp [EMAIL PROTECTED] wrote: I have multiple PMW widgets (EntryFields, ScrolledField etc), how can I skip over these widgets when using the tab key? Thank you, John

Re: functions, classes, bound, unbound?

2007-03-26 Thread irstas
On Mar 26, 7:15 pm, 7stud [EMAIL PROTECTED] wrote: On Mar 25, 3:09 pm, Steven Bethard [EMAIL PROTECTED] wrote: Here's another way of looking at it:: class Test(object): ... pass ... def greet(): ... print 'Hello' ... Test.greet = greet

Re: functions, classes, bound, unbound?

2007-03-26 Thread 7stud
On Mar 26, 5:08 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Most of Python's object model is documented here: http://www.python.org/download/releases/2.2.3/descrintro/http://users.rcn.com/python/download/Descriptor.htm Thanks. I've looked at both of those, and the second one is

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Carl Banks
On Mar 26, 9:42 am, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On 26 Mar 2007 06:20:32 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK... I've been told that Both Fortran and Python are easy to read, and are Python is hugely easier to read. quite useful in creating scientific apps

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Erik Johnson
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad slower than Fortran because of its a high level language nature,

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread [EMAIL PROTECTED]
On 26 Mar, 17:59, Erik Johnson [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OK... I've been told that Both Fortran and Python are easy to read, and are quite useful in creating scientific apps for the number crunching, but then Python is a tad

how to abort on syntax errors

2007-03-26 Thread Josh
I have a lot of except Exception, e statements in my code, which poses some problems. One of the biggest is whenever I refactor even the triviallest thing in my code. I would like python to abort, almost as if it were a compile-time error, whenever it cannot find a function, or if I introduced

fetch html page via isa proxy

2007-03-26 Thread Radek
Hi, I have been trying several days to get the html page of www.python.org when behind the corporate MS isa proxy. I have tried setting http_proxy environment, played with proxy openers, use ntlm proxy server all without success. I can get the page using Firefox and IE with proxy settings. As

Re: PMW widget - skip tabbing to it

2007-03-26 Thread kyosohma
On Mar 26, 11:35 am, jp [EMAIL PROTECTED] wrote: On Mar 26, 11:27 am, [EMAIL PROTECTED] wrote: On Mar 26, 11:17 am, [EMAIL PROTECTED] wrote: On Mar 26, 10:51 am, jp [EMAIL PROTECTED] wrote: I have multiple PMW widgets (EntryFields, ScrolledField etc), how can I skip over these

Re: Python object overhead?

2007-03-26 Thread 7stud
On Mar 26, 9:13 am, Matt Garman [EMAIL PROTECTED] wrote: On 3/23/07, Jack Diederich [EMAIL PROTECTED] wrote: If you make the record a new style class (inherit from object) you can specify the __slots__ attribute on the class. This eliminates the per instance dictionary overhead in

Re: how to abort on syntax errors

2007-03-26 Thread kyosohma
On Mar 26, 12:21 pm, Josh [EMAIL PROTECTED] wrote: I have a lot of except Exception, e statements in my code, which poses some problems. One of the biggest is whenever I refactor even the triviallest thing in my code. I would like python to abort, almost as if it were a compile-time error,

Re: how to abort on syntax errors

2007-03-26 Thread skip
Josh I have a lot of except Exception, e statements in my code, which Josh poses some problems. One of the biggest is whenever I refactor Josh even the triviallest thing in my code. Josh I would like python to abort, almost as if it were a compile-time Josh error, whenever it

Re: how to abort on syntax errors

2007-03-26 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Josh wrote: I have a lot of except Exception, e statements in my code, which poses some problems. One of the biggest is whenever I refactor even the triviallest thing in my code. I would like python to abort, almost as if it were a compile-time error, whenever it

Re: how to abort on syntax errors

2007-03-26 Thread Steve Holden
[EMAIL PROTECTED] wrote: On Mar 26, 12:21 pm, Josh [EMAIL PROTECTED] wrote: I have a lot of except Exception, e statements in my code, which poses some problems. One of the biggest is whenever I refactor even the triviallest thing in my code. I would like python to abort, almost as if it

  1   2   >