Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
Hallöchen! Ben Finney writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> [...] the width of a tab is nowhere defined. It really is a >> matter of the editor's settings. > > RFC 678 "Standard File Formats" > http://www.ietf.org/rfc/rfc678.txt>: > > Horizontal Tab > > [...] As f

Using pexpect with cgi

2008-01-01 Thread vinoj davis
 I am using pexpect with Cgi to ssh into remote machine,Whenever i run a script which does ssh using pexpect from the linux terminal it gives me the correct result, but when i call the script using commands module from the cgi program i am getting the following error.(0, '(256, \'Traceback (most re

Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
Hallöchen! Ben Finney writes: > Torsten Bronger <[EMAIL PROTECTED]> writes: > >> [...] the width of a tab is nowhere defined. It really is a >> matter of the editor's settings. > > RFC 678 "Standard File Formats" > http://www.ietf.org/rfc/rfc678.txt>: > > Horizontal Tab > > [...] As f

Re: os.tmpfile()

2008-01-01 Thread redawgts
Try this: >>> import os >>> c = os.tmpfile() >>> c.write('dude') >>> c.seek(0) >>> c.read() 'dude' -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie: Why doesn't this work

2008-01-01 Thread Gabriel Genellina
En Wed, 02 Jan 2008 01:11:12 -0300, <[EMAIL PROTECTED]> escribió: > I am trying to experiment a little bit with new-style class and I am > confused why following example always returns 0 (zero). I was > expecting will return values from 0 to 9 and finaly > an Exception. > > class GenExample(objec

using Tix.FileSelectBox in python

2008-01-01 Thread [EMAIL PROTECTED]
hi i was using Tix.FileSelectBox to select imagefiles from a directory..when i click on image and click my app's okbutton i can get the selected image name by self.selimgname=self.myfileselectbox.selection.cget("value") after this if i just select a folder and not an image and click ok then aga

Re: os.tmpfile()

2008-01-01 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Can anyone elaborate on how 'os.tmpfile()' works? I was thinking it would > create some sort of temporary file I could quickly add text too and then when > I was finished would automatically get rid of it. Here's my questions: ... > Can you actually 'write' t

Re: Tab indentions on different platforms?

2008-01-01 Thread Ben Finney
Torsten Bronger <[EMAIL PROTECTED]> writes: > [...] the width of a tab is nowhere defined. It really is a matter > of the editor's settings. RFC 678 "Standard File Formats" http://www.ietf.org/rfc/rfc678.txt>: Horizontal Tab Moves the printer to the next horizontal tab st

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
Steven, thanks for a nice explanation. I am trying to experiment a little bit with new-style class and I am confused why following example always returns 0 (zero). I was expecting will return values from 0 to 9 and finaly an Exception. class GenExample(object): def getInfo(self): fo

os.tmpfile()

2008-01-01 Thread jyoung79
Can anyone elaborate on how 'os.tmpfile()' works? I was thinking it would create some sort of temporary file I could quickly add text too and then when I was finished would automatically get rid of it. Here's my questions: 1. Does it actually create a file somewhere? If so, where does it sto

Simple server using asyncore/asynchat

2008-01-01 Thread Rick
Hey folks. I'm trying to create a (fairly) simple server that listens for connections and when it receives one sends a message to the client and then waits for a response (and would continue to do that). My problem is, every time my client connects, the server doesn't send the text and then immedia

Re: parse text files in a directory?

2008-01-01 Thread Tim Chase
jo3c wrote: > hi everybody > im a newbie in python, i have a question > > how do u parse a bunch of text files in a directory? > > directory: /dir > files: H20080101.txt , > H20080102.txt,H20080103.txt,H20080104.txt,H20080105.txt etc.. > > i already got a python script to read and insert a s

parse text files in a directory?

2008-01-01 Thread jo3c
hi everybody im a newbie in python, i have a question how do u parse a bunch of text files in a directory? directory: /dir files: H20080101.txt , H20080102.txt,H20080103.txt,H20080104.txt,H20080105.txt etc.. i already got a python script to read and insert a single text files into a postgres

Re: ElementTree should parse string and file in the same way

2008-01-01 Thread Peter Pei
To answer something posted deep down... It is fine with me if there are two functions - one to parse a file or file handler and one to parse a string, yet the returned objects should be consistent. -- http://mail.python.org/mailman/listinfo/python-list

Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
Hallöchen! Ben Finney writes: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> [...] >> >> There's a very good reason to buck the trend whenever practical: >> tabs have the considerable benefit that they decouple the >> presentation of the code from the structure of the code. > > Huh? I can onl

Re: cloud computing (and python)?

2008-01-01 Thread PatrickMinnesota
On Jan 1, 7:12 pm, Neil Hodgson <[EMAIL PROTECTED]> wrote: > Cloud computing is mostly about scalability. You do not need to be > concerned so much about low level infrastructure details such as > purchasing servers, configuring and maintaining them, hiring space in > data centres, linking up d

Re: cloud computing (and python)?

2008-01-01 Thread Neil Hodgson
Cloud computing is mostly about scalability. You do not need to be concerned so much about low level infrastructure details such as purchasing servers, configuring and maintaining them, hiring space in data centres, linking up data centres, etc. It converts a lot of fixed costs into lower r

PyCairo, PIL and StringIO

2008-01-01 Thread Jair Trejo
I'm doing some image processing in PIL, and I want to display the results in a GTK window using PyCairo, so I create a Cairo image surface from the PIL Image like this: mfile = StringIO.StringIO() final.save(mfile, format="PNG") ima = cairo.ImageSurface.create_from_png(mfil

Re: cloud computing (and python)?

2008-01-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Aaron Watters <[EMAIL PROTECTED]> wrote: >So, in between skiing runs I noticed >a Business Week cover story on >"cloud computing". The article had >lots of interesting information in it like >about how somebody's mom used to >be an airline stewardess and the >inter

Re: Catching external program exceptions

2008-01-01 Thread Ben Finney
Marty <[EMAIL PROTECTED]> writes: > I need to catch exceptions thrown by programs started by the os.system > function, as indicated by a non-zero return code (e.g. the mount > utility). That's not an exception. It's referred to as an "exit status" or (often) some short form or variation of that t

Re: cloud computing (and python)?

2008-01-01 Thread Aaron Watters
On Jan 1, 5:05 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Tue, 01 Jan 2008 13:55:10 -0800, PatrickMinnesota wrote: > > The idea is that your data and applications are on the net, rather than > > your local hard drive. > > Or, to put it another way, your data and applicat

Re: pyparsing question

2008-01-01 Thread John Machin
On Jan 2, 10:32 am, hubritic <[EMAIL PROTECTED]> wrote: > The data I have has a fixed number of characters per field, so I could > split it up that way, but wouldn't that defeat the purpose of using a > parser? The purpose of a parser is to parse. Data in fixed columns does not need parsing. >

Re: Catching external program exceptions

2008-01-01 Thread Gabriel Genellina
En Tue, 01 Jan 2008 20:57:44 -0200, Marty <[EMAIL PROTECTED]> escribi�: > I need to catch exceptions thrown by programs started by the os.system > function, > as indicated by a non-zero return code (e.g. the mount utility). For Notice that these are two different things. You can wait until the

Re: Python Trajectory Module?

2008-01-01 Thread Stef Mientki
[EMAIL PROTECTED] wrote: > Greetings, > > I was wondering if there was a python Module/Library out there that > handles some trajectory/physics stuff like moving an object along a > straight path in an X,Y 2D (or 3D) plane or calculating parabolic > arcs. I'd really settle for just the moving of an

Python events, panel with text

2008-01-01 Thread SMALLp
Hy! I have many small panels with text and I want do bind wx.EVT_LEFT_DOWN when clicked on panel, but i need to bind that in parent class. So I have instance of that small panel and when i bind it efects only part of small panel where is no text. import wx class RequestedFilesItems(wx.Panel

Re: pyparsing question

2008-01-01 Thread Neil Cerutti
On Jan 1, 2008 6:54 PM, Neil Cerutti <[EMAIL PROTECTED]> wrote: > There's no standard Python tool for reading and writing fixed-length field > "flatfile" data files, but it's pretty simple to use named slices to get at > the data. > > identifier = slice(0, 8) > timestamp = slice(8, 18) > t = slice

Re: pyparsing question

2008-01-01 Thread Neil Cerutti
On Jan 1, 2008 6:32 PM, hubritic <[EMAIL PROTECTED]> wrote: > I am trying to parse data that looks like this: > > IDENTIFIERTIMESTAMP T C RESOURCE_NAME DESCRIPTION > 2BFA76F6 1208230607 T S SYSPROCSYSTEM > SHUTDOWN BY USER > A6D1BD62 1215230807 I > H

pyparsing question

2008-01-01 Thread hubritic
I am trying to parse data that looks like this: IDENTIFIERTIMESTAMP T C RESOURCE_NAME DESCRIPTION 2BFA76F6 1208230607 T S SYSPROCSYSTEM SHUTDOWN BY USER A6D1BD62 1215230807 I HFirmware Event My problem is t

Re: confusion about package/module imports

2008-01-01 Thread Scott David Daniels
Jugdish wrote: > Thanks very much for your helpful response! > >> You'll see that b is executed (making module __main__), >> (1) it imports pkg.subpkg.a, >> (2) which is accomplished by importing pkg (successfully), >> (3)then by importing pkg.subpkg >> (4)

Catching external program exceptions

2008-01-01 Thread Marty
I need to catch exceptions thrown by programs started by the os.system function, as indicated by a non-zero return code (e.g. the mount utility). For example, if I get the following results in a bash shell: $mount test mount: can't find /home/marty/test in /etc/fstab or /etc/mtab then I want

Re: confusion about package/module imports

2008-01-01 Thread Jugdish
Thanks very much for your helpful response! > You'll see that b is executed (making module __main__), > (1) it imports pkg.subpkg.a, > (2) which is accomplished by importing pkg (successfully), > (3)then by importing pkg.subpkg > (4) which imports pkg

Re: Tab indentions on different platforms?

2008-01-01 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Mon, 31 Dec 2007 12:36:11 +1100, Ben Finney wrote: > > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > > >> On Sun, 30 Dec 2007 20:41:09 +, Thorsten Kampe wrote: > >> > >> > Anyway: the consequence of your well done argumentation is that >

Re: Network Module

2008-01-01 Thread Matthew Franz
Why not just wrap netstat for what you need? or you might be able to get from /proc entries? Or look at http://www.psychofx.com/psi/trac/wiki/ (PSI Tools) If you want interface statistics you can process the CSV output of bwm-ng (http://www.gropp.org/?id=projects&sub=bwm-ng) - mdf On Jan 1, 20

Re: cloud computing (and python)?

2008-01-01 Thread Steven D'Aprano
On Tue, 01 Jan 2008 13:55:10 -0800, PatrickMinnesota wrote: > The idea is that your data and applications are on the net, rather than > your local hard drive. Or, to put it another way, your data and applications are controlled by another company rather than you. Not that I wish to be cynical o

Re: cloud computing (and python)?

2008-01-01 Thread PatrickMinnesota
On Jan 1, 3:26 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > So, in between skiing runs I noticed > a Business Week cover story on > "cloud computing". The article had > lots of interesting information in it like > about how somebody's mom used to > be an airline stewardess and the > interior dec

Re: ElementTree should parse string and file in the same way

2008-01-01 Thread Steven D'Aprano
On Tue, 01 Jan 2008 12:59:44 -0700, Steven Bethard wrote: > Steven D'Aprano wrote: >> On Tue, 01 Jan 2008 13:36:57 +0100, Diez B. Roggisch wrote: >> >>> And codemonkeys know that in python >>> >>> doc = et.parse(StringIO(string)) >>> >>> is just one import away >> >> Yes, but to play devil's adv

Re: cloud computing (and python)?

2008-01-01 Thread PatrickMinnesota
On Jan 1, 3:26 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > So, in between skiing runs I noticed > a Business Week cover story on > "cloud computing". The article had > lots of interesting information in it like > about how somebody's mom used to > be an airline stewardess and the > interior dec

Re: Newbie: Why doesn't this work

2008-01-01 Thread Steven D'Aprano
On Tue, 01 Jan 2008 13:01:24 -0800, petr.jakes.tpc wrote: >> > My question is: is it possible to set the "property" for any >> > attribute when I do not know what will be the name of the attribute >> > in the future? >> >> Uhm... I don't understand the question. Perhaps if you think of a >> concre

Re: confusion about package/module imports

2008-01-01 Thread Scott David Daniels
Jugdish wrote: > Why doesn't the following work? > ... [well boiled-down code skipped] setenv PYTHONPATH $HOME:$PYTHONPATH python $HOME/pkg/subpkg/b.py > Traceback (most recent call last): > File "pkg/subpkg/b.py", line 1, in ? > import pkg.subpkg.a > File "$HOME/pkg/subpkg/__

Re: TK 8.5

2008-01-01 Thread Martin v. Löwis
>> Hence, there is no need to talk about this very much. That >> Python "supports" Tk 8.5 is too minor to mention - I think >> even Python 2.4 supports Tk 8.5. > > In terms of building and linking Python to Tk 8.5, this is certainly true. > > However, I think most people who ask about Python "sup

cloud computing (and python)?

2008-01-01 Thread Aaron Watters
So, in between skiing runs I noticed a Business Week cover story on "cloud computing". The article had lots of interesting information in it like about how somebody's mom used to be an airline stewardess and the interior decor of various office spaces. It was a truly excellent piece of journalism.

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
> > My question is: is it possible to set the "property" for any attribute > > when I do not know what will be the name of the attribute in the > > future? > > Uhm... I don't understand the question. Perhaps if you think of a concrete > case...? Thanks for reply, few minutes after i posted my que

confusion about package/module imports

2008-01-01 Thread Jugdish
Why doesn't the following work? >>> ls $HOME $HOME/pkg/__init__.py $HOME/pkg/subpkg/__init__.py $HOME/pkg/subpkg/a.py $HOME/pkg/subpkg/b.py >>> cat $HOME/pkg/__init__.py # empty >>> cat $HOME/pkg/subpkg/__init__.py import a import b >>> cat $HOME/pkg/subpkg/a.py class A: pass >>> cat $HOME

Re: Bizarre behavior with mutable default arguments

2008-01-01 Thread Arnaud Delobelle
On Jan 1, 6:48 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 01 Jan 2008 15:45:00 -0200, bukzor <[EMAIL PROTECTED]>   > escribi�: [...] > >> I'm confused by what you mean by 'early binding'. Can you give a quick- > >> n-dirty example? > > Is an 'early bound' variable synonymous with

Re: Some specific exec behavior ?

2008-01-01 Thread Stef Mientki
Gabriel Genellina wrote: > En Tue, 01 Jan 2008 16:39:21 -0200, Stef Mientki <[EMAIL PROTECTED]> > escribi�: > > >> I find 2 strange behaviors in exec-function, >> and I can't find anything in the documentation. >> (Python 2.4.3 Enthought edition) >> >> 1. A function definition may not span mor

Re: parallel processing in standard library

2008-01-01 Thread Konrad Hinsen
Emin.shopper Martinian.shopper wrote: > Is there any hope of a parallel processing toolkit being > incorporated into the python standard library? I've seen a wide > variety of toolkits each with various features and limitations. > Unfortunately, each has its own API. For coarse-grained > p

Re: ElementTree should parse string and file in the same way

2008-01-01 Thread Steven Bethard
Steven D'Aprano wrote: > On Tue, 01 Jan 2008 13:36:57 +0100, Diez B. Roggisch wrote: > >> And codemonkeys know that in python >> >> doc = et.parse(StringIO(string)) >> >> is just one import away > > Yes, but to play devil's advocate for a moment, > > doc = et.parse(string_or_file) > > would be

Re: Newbie: Why doesn't this work

2008-01-01 Thread Gabriel Genellina
En Tue, 01 Jan 2008 16:57:41 -0200, <[EMAIL PROTECTED]> escribi�: > Gabriel, if I understand it properly, it is necessary to define get/ > set/del/doc methods for each attribute for which I want to set the > "property" data descriptor (which triggers get/set/del/doc function > calls upon access to

Re: pexpect ssh login and ls | grep

2008-01-01 Thread crybaby
I did try to excute the ssh and shell ls grep command in all in one like so: ssh [EMAIL PROTECTED] "ls mytest.log > /dev/null 2>&1; echo $?" This seem to work, but also throwing exceptions. Also, including ssh and shell command together would be a problem when I later add a pass phrase to ssh k

Re: Newbie: Why doesn't this work

2008-01-01 Thread petr . jakes . tpc
Hi all, I am trying to understand new-style classes in Python and I have found your postings here. Gabriel, if I understand it properly, it is necessary to define get/ set/del/doc methods for each attribute for which I want to set the "property" data descriptor (which triggers get/set/del/doc fun

Re: Some specific exec behavior ?

2008-01-01 Thread Gabriel Genellina
En Tue, 01 Jan 2008 16:39:21 -0200, Stef Mientki <[EMAIL PROTECTED]> escribi�: > I find 2 strange behaviors in exec-function, > and I can't find anything in the documentation. > (Python 2.4.3 Enthought edition) > > 1. A function definition may not span more than 1 line, e.g. > This generates an

Re: at what complexity, a comparison fails ?

2008-01-01 Thread Stef Mientki
Robert Kern wrote: > Stef Mientki wrote: > >> hello, >> >> I had a program that worked perfectly well. >> In this program modules were dynamically added, >> just by putting the file in a predefined directory. >> >> Now one of the interface mechanisms was to see if some parameter was >> changed

Re: Push to Make (Single Pole) Button running a loop

2008-01-01 Thread Sambo
Hendrik van Rooyen wrote: > "Jon Todd" wrote: > > >>I'd like to have a button that when pressed executes a loop (this could be a >>thread) and then stops execution when it's released (Push to Make - Single >>Pole in electronics terms). >> >>I've tried the regular way of associating the procedur

Re: Bizarre behavior with mutable default arguments

2008-01-01 Thread Gabriel Genellina
En Tue, 01 Jan 2008 15:45:00 -0200, bukzor <[EMAIL PROTECTED]> escribi�: > On Jan 1, 9:00 am, bukzor <[EMAIL PROTECTED]> wrote: >> On Dec 31 2007, 1:30 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: >> >> > And also removing the only way you can currently do early binding in >> > Python. I agree t

Some specific exec behavior ?

2008-01-01 Thread Stef Mientki
hello, I find 2 strange behaviors in exec-function, and I can't find anything in the documentation. (Python 2.4.3 Enthought edition) 1. A function definition may not span more than 1 line, e.g. This generates an exception: def _func (x,y): return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) while

Re: TK 8.5

2008-01-01 Thread Kevin Walzer
Martin v. Löwis wrote: >> But I found nothing about Tk 8.5 ? > > Python is not tied to any specific Tk version; you can use > any Python release with any Tk version, most of the time. > > Hence, there is no need to talk about this very much. That > Python "supports" Tk 8.5 is too minor to mention

Re: Using mouse

2008-01-01 Thread Scott David Daniels
Lucas Prado Melo wrote: > I would like to control mouse events (i.e. I would like to "click" and > move mouse around by code). > How do I do this in python? A python doesn't have a mouse for long; it eats them up. It is your display and user I/O system that deals with mice, and so, inevitably, th

Re: using super

2008-01-01 Thread Scott David Daniels
iu2 wrote: > On Jan 1, 12:32 pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: >> import read_my_mind_and_do_what_I_want >> first. (Module expected in Python 9.7, due out in 2058.) > > That's because it seems to you like some esoteric feature. > To me it seems natural with OO. An

Re: pexpect ssh login and ls | grep

2008-01-01 Thread crybaby
I don't get 0 or 2(excuting ls command exit code) from result.split('\r\n')[0] or result.split('\r\n')[1]. I have to try another method. Regular shell ssh login: [EMAIL PROTECTED] ~]$ ssh [EMAIL PROTECTED] Last login: Mon Dec 31 20:51:09 2007 from com1 [EMAIL PROTECTED] ~]$ Pexpect Login: >>> i

Re: Bizarre behavior with mutable default arguments

2008-01-01 Thread bukzor
On Jan 1, 9:00 am, bukzor <[EMAIL PROTECTED]> wrote: > On Dec 31 2007, 1:30 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > > > On Dec 31, 2007 2:08 PM, Odalrick <[EMAIL PROTECTED]> wrote: > > > > On 31 Dec, 18:22, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > > On Dec 31, 10:58 am, Odalric

Re: Using mouse

2008-01-01 Thread Gabriel Genellina
En Tue, 01 Jan 2008 12:54:54 -0200, Grant Edwards <[EMAIL PROTECTED]> escribi�: > On 2007-12-31, Lucas Prado Melo <[EMAIL PROTECTED]> wrote: > >> I would like to control mouse events (i.e. I would like to >> "click" and move mouse around by code). How do I do this in >> python? > > http://python

Re: WXPython - Using inline images

2008-01-01 Thread Vlastimil Brom
2007/12/31, Sick Monkey <[EMAIL PROTECTED]>: ... Is there anyway WXPython can just use the inline image without having to create a physical copy? I know this can be done in TKinter using inline gifs, but was wondering if anyone knew of a clever way to do this in WXPython? ... I think, you can use

Re: Bizarre behavior with mutable default arguments

2008-01-01 Thread Neil Cerutti
On Jan 1, 2008 12:26 AM, NickC <[EMAIL PROTECTED]> wrote: > On Jan 1, 3:22 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > On Dec 31, 10:58 am, Odalrick <[EMAIL PROTECTED]> wrote: > > > > > I'm surprised noone has said anything about the why of default > > > mutables. I think it is becasue it

Re: Bizarre behavior with mutable default arguments

2008-01-01 Thread bukzor
On Dec 31 2007, 1:30 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Dec 31, 2007 2:08 PM, Odalrick <[EMAIL PROTECTED]> wrote: > > > > > On 31 Dec, 18:22, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > On Dec 31, 10:58 am, Odalrick <[EMAIL PROTECTED]> wrote: > > > > > On 30 Dec, 17:26, George

Re: TK 8.5

2008-01-01 Thread Martin v. Löwis
> But I found nothing about Tk 8.5 ? Python is not tied to any specific Tk version; you can use any Python release with any Tk version, most of the time. Hence, there is no need to talk about this very much. That Python "supports" Tk 8.5 is too minor to mention - I think even Python 2.4 supports

Re: pexpect ssh login and ls | grep

2008-01-01 Thread Dikkie Dik
> shell_cmd = 'ls -l | grep mytest.log' > child = pexpect.spawn ('ssh [EMAIL PROTECTED]') I think you can give the ssh command an option to execute a file remotely. That way, one command would be enough. -- http://mail.python.org/mailman/listinfo/python-list

Re: Bizarre behavior with mutable default arguments

2008-01-01 Thread bukzor
On Dec 30 2007, 11:01 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 30 Dec 2007 20:00:14 -0800, bukzor wrote: > > I think you struck at the heart of the matter earlier when you noted > > that this is the simplest way to declare a static variable in python. > > Using th

Re: Choosing a new language

2008-01-01 Thread Joachim Durchholz
> Xah Lee <[EMAIL PROTECTED]> wrote: >> [...] PHP and Perl are practically identical in their >> high-levelness or expressiveness or field of application (and >> syntax), That must have been a very, very distant point of view with narrowly squinted eyes. Regards, Jo -- http://mail.python.org/ma

Re: Cheat sheet

2008-01-01 Thread Riccardo T.
Riccardo T. ha scritto: > I wrote a little cheat sheet for this wonderful language, but because of > my still little experience with it, I would like to have a feedback > Could you have a look at it and tell me what do you think about, please? > > http://greyfox.imente.org/index.php?id=73 > > --

Re: Tab indentions on different platforms?

2008-01-01 Thread Torsten Bronger
Hallöchen! Steven D'Aprano writes: > [...] > > Ah, and now we're getting somewhere! It's not so much that tabs > are intrinsically harmful (as people like Thorsten keep > insisting), but that in a world supposedly dominated by people who > indent with spaces, using tabs might lead to inconsiderat

Re: TK 8.5

2008-01-01 Thread Leon
> We are planing to use Tcl/Tk 8.5 for Python 2.6 and 3.0. The topic is > currently being discussed but nothing has been decided yet. Great news! I hope you'll decide to use Tcl/Tk 8.5 ! I'm sure I'm not the only one !!! On this page : http://www.python.org/dev/peps/pep-0361/ We can read : "the

Re: Tab indentions on different platforms?

2008-01-01 Thread Steven D'Aprano
On Mon, 31 Dec 2007 12:36:11 +1100, Ben Finney wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> On Sun, 30 Dec 2007 20:41:09 +, Thorsten Kampe wrote: >> >> > Anyway: the consequence of your well done argumentation is that >> > someone editing Python code has to use a specialised edi

Re: Using mouse

2008-01-01 Thread Grant Edwards
On 2007-12-31, Lucas Prado Melo <[EMAIL PROTECTED]> wrote: > I would like to control mouse events (i.e. I would like to > "click" and move mouse around by code). How do I do this in > python? http://python-xlib.sourceforge.net/doc/html/python-xlib_14.html -- Grant Edwards gran

File Info

2008-01-01 Thread Navid Parvini
Dear All, Would you please tell me if there is another function instead of stat that gives the same information ( such as the size of the file) but faster? Thank you in advance. Navid - Looking for last minute shopping deals? Find them fast with Yahoo! S

WXPython - Using inline images

2008-01-01 Thread Sick Monkey
I have a question about WXPython and using inline images. The code that I have included into this email comes from the following URL: http://www.daniweb.com/code/snippet654.html As you can see from the code below, that this application will take an inline JPG image, and will create a loca

Using mouse

2008-01-01 Thread Lucas Prado Melo
I would like to control mouse events (i.e. I would like to "click" and move mouse around by code). How do I do this in python? regards -- http://mail.python.org/mailman/listinfo/python-list

Re: how to connect to a remote machine using python........ pexpect help

2008-01-01 Thread vinoj davis
  Hi,My aim is to connect to a remote machine and execute commands at the remote machine.. such as ifconfig... i found out a module named pexpect if anyone can help me out in thatThanking youRegards,    ---ViNOJ DAViS---Regards, 

SVGDraw is where?

2008-01-01 Thread Shane Geiger
Does someone know where SVGDraw has gone? It used to be here: http://www2.sfk.nl/svg/ Googling hasn't helped me locate it. :-\ -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and F

Code - working in one system and not working in the other.

2008-01-01 Thread Amal
The following code works in a system with python 2.4.3 and does not work in the system with python 2.4.2. And both the systems directly connect to the internet. import urllib2 url = "http://www.abcd.com"; username = "abcd" passowrd = "efgh" password_manager = urllib2.HTTPPasswordMgrWithDefault

Re: ElementTree should parse string and file in the same way

2008-01-01 Thread Steven D'Aprano
On Tue, 01 Jan 2008 13:36:57 +0100, Diez B. Roggisch wrote: > And codemonkeys know that in python > > doc = et.parse(StringIO(string)) > > is just one import away Yes, but to play devil's advocate for a moment, doc = et.parse(string_or_file) would be even simpler. Is there any reason why it

Re: using super

2008-01-01 Thread iu2
On Jan 1, 12:32 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > > import read_my_mind_and_do_what_I_want > > first. (Module expected in Python 9.7, due out in 2058.) That's because it seems to you like some esoteric feature. To me it seems natural with OO. > "Special cases ar

Network Module

2008-01-01 Thread Sunil Ghai
Hello people, I am searching for a python module to interact with the network connections/interfaces. For example the number of active TCP/IP connections via eth0 interface and all that stuff. I have done googling and search at pythonorg but couldn't find any. Thanks Sunil Kumar Ghai -- http://ma

M I-5'Per secution Be rnard Levi n ex presses hi s views

2008-01-01 Thread mfefe
The article of which part is reproduced below. was penned by Bernard Levin for the Features section of the Times on 21 September 1991. To my. mind, it described the situation at the time. and in particular a recent meeting with a friend,. during which I for the first time admitted to someone other

Re: pdf library.

2008-01-01 Thread Marc 'BlackJack' Rintsch
On Tue, 01 Jan 2008 04:21:29 -0800, Shriphani wrote: > On Jan 1, 4:28 pm, Piet van Oostrum <[EMAIL PROTECTED]> wrote: >> >Shriphani<[EMAIL PROTECTED]> (S) wrote: >> >S> I tried pyPdf for this and decided to get the pagelinks. The trouble >> >S> is that I don't know how to determine whether a p

Re: ElementTree should parse string and file in the same way

2008-01-01 Thread Diez B. Roggisch
Steven D'Aprano schrieb: > On Tue, 01 Jan 2008 01:53:47 +, Peter Pei wrote: > >> You are talking shit. It is never about whether it is hard to write a >> wrapper. It is about bad design. I should be able to parse a string and >> a file in exactly same way, and that should be provided as part o

Re: pdf library.

2008-01-01 Thread Shriphani
On Jan 1, 4:28 pm, Piet van Oostrum <[EMAIL PROTECTED]> wrote: > >Shriphani<[EMAIL PROTECTED]> (S) wrote: > >S> I tried pyPdf for this and decided to get the pagelinks. The trouble > >S> is that I don't know how to determine whether a particular page is the > >S> first page of a chapter. Can so

M-I,5`Persecution ` B ernard Levin expre sses hi s vie ws

2008-01-01 Thread eieimemiv
The article of which part. is reproduced below was penned by Bernard Levin for the. Features section of the Times on 21 September 1991. To my mind, it described the situation at the time and in particular a recent. meeting with a friend, during which I for the first time admitted to someone. other

M,I-5,Persecu tion w ho kn ows abou t it?

2008-01-01 Thread vivfvfifi
-=-=-=-=-=-=-=-=-=-=-=-=- -= who knows about it?. =- -=-=-=-=-=-=-=-=-=-=-=-=- Many people know, both in the establishment and media, and. among the general. public. Despite an absence of its target from the UK for more than two years, the echoes of paranoia can still. be heard loud and clear from

Re: pdf library.

2008-01-01 Thread Piet van Oostrum
> Shriphani <[EMAIL PROTECTED]> (S) wrote: >S> I tried pyPdf for this and decided to get the pagelinks. The trouble >S> is that I don't know how to determine whether a particular page is the >S> first page of a chapter. Can someone tell me how to do this ? AFAIK PDF doesn't have the concept o

Re: using super

2008-01-01 Thread Steven D'Aprano
On Mon, 31 Dec 2007 22:56:41 -0800, iu2 wrote: > Indeed I might want to chain methods in all sort of ways: > @chain_call_before - call the parent's method before the derived method > @chain_call_after - call the parent's method after the derived method > @chain_call_sum - sum the result of the par

Re: ElementTree should parse string and file in the same way

2008-01-01 Thread Stefan Behnel
Peter Pei wrote: > To be preise [...] Preise the lord, not me. :) Happy New Year! Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: using super

2008-01-01 Thread iu2
On Jan 1, 9:59 am, Michele Simionato <[EMAIL PROTECTED]> wrote: > No PEP, this would never pass. There would be no way > to stop a method from calling its parent: you would > lose control of your classes, so I think this is a > bad idea. Not all classes, only classes the programmer chooses to hav

M-I,5.Perse cution - cost of the operati on

2008-01-01 Thread vfmevm
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -= MI5: cost of the. operation -= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Here's what a couple of other people on Usenet (uk.misc) had to. say regarding the cost. of running such an operation... PO: >Have some sense, grow up. and smell reality. What you are talking about

Re: Bizarre behavior with mutable default arguments

2008-01-01 Thread Arnaud Delobelle
On Jan 1, 5:26 am, NickC <[EMAIL PROTECTED]> wrote: > On Jan 1, 3:22 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > On Dec 31, 10:58 am, Odalrick <[EMAIL PROTECTED]> wrote: > > > > I'm surprised noone has said anything about the why of default > > > mutables. I think it is becasue it isn't e

M'I-5 Persecutio n , Capita l R adio - Chri s Tarran t

2008-01-01 Thread vimfefv
-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= -=. Capital Radio - Chris Tarrant -= -=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= Capital Radio DJs have been "in on it". from the start. One of the first things I heard in the summer of 1990 was from a Capital DJ who said,. "If he listens to Capital then he. can't be al

M-I,5`Persecu tion ` buggi ng an d counter-surveillan ce

2008-01-01 Thread mimvev
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -= MI5: bugging. and counter-surveillance -= -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- PO: >Did. you ever look for the bugs in your house ? If not, why not ? I mean if PO: >I thought that was happening. to me, I'd search the place from top to bottom,

M I-5'Per secution ' the BB C, televis ion an d rad io

2008-01-01 Thread imvmifvm
-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= -= the BBC, television and radio. -= -=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-= The first incident in June 1990 was when a BBC newsreader made what. seemed to be a reaction. to something which had happened in my home, and out of context of what they were reading. My fi

Re: pexpect ssh login and ls | grep

2008-01-01 Thread Karthik Gurusamy
On Dec 31 2007, 6:46 pm, crybaby <[EMAIL PROTECTED]> wrote: > 1) what are these characters: > \x1b]0; > ~\x07\x1b[?1034h > > in line '\x1b]0;[EMAIL PROTECTED]:[EMAIL PROTECTED] ~]'? These are probably escape sequences in your shell prompt string. Typically they are interpreted by the terminal, lik

Re: using super

2008-01-01 Thread Michele Simionato
On Jan 1, 7:56 am, iu2 <[EMAIL PROTECTED]> wrote: > no one has to remember to call the parent's get_name method. It's done > automatically. > > (A PEP maybe? I sense you don't really like it.. ;-) > What do you think? Good? Too implicit? > > iu2 No PEP, this would never pass. There would be no way