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 us

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

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 P

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 havi

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 c

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 >>>

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 mak

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 -*- i

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

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 obj

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 gues

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 t

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 abo

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

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 interpret

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 objec

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, 1

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 workaro

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 i

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 logica

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 > c

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. > self

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[

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 cru

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 Fo

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 > langua

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 > langua

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 > langua

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 s

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

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, scalabi

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 C

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 com

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 ? > > A

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 sup

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 insid

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 easi

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 happ

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

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 crea

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", d

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 a

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 #-- cla

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 dictionar

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

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 overh

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 natu

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

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 button

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).

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 be

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 th

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 experie

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. >> > >> > c

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 >>> >>>

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.s

Re: How to find to 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

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 someti

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 > Interesting. After playi

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 eve

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 eve

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 eve

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

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? > > > > Than

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' > >

Re: functions, classes, bound, unbound?

2007-03-26 Thread 7stud
On Mar 26, 5:08 am, Bruno Desthuilliers 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 very good. -- http:/

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 s

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 nat

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 Pyt

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 t

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 > > > >

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 overhe

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 e

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, wheneve

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, > whenev

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, almos

Re: how to abort on syntax errors

2007-03-26 Thread Gabriel Genellina
En Mon, 26 Mar 2007 14:21:22 -0300, Josh <[EMAIL PROTECTED]> escribió: > I have a lot of except Exception, e statements in my code, which poses > some > problems. *many* problems, I'd say. Don't do that :) > One of the biggest is whenever I refactor even the triviallest > thing in my code. > >

Re: how to abort on syntax errors

2007-03-26 Thread kyosohma
On Mar 26, 1:07 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [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 trivia

Re: PMW widget - skip tabbing to it

2007-03-26 Thread jp
On Mar 26, 12:34 pm, [EMAIL PROTECTED] wrote: > 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

Re: PMW widget - skip tabbing to it

2007-03-26 Thread kyosohma
On Mar 26, 1:17 pm, "jp" <[EMAIL PROTECTED]> wrote: > On Mar 26, 12:34 pm, [EMAIL PROTECTED] wrote: > > > > > 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

  1   2   >