Re: [Tutor] range/for list change behavior

2008-09-29 Thread Steve Willoughby
Don Parris wrote: Hi all, After a rather long (and unfortunate) break from tinkering with Python, I am back at it. I am working through the book Learning Python (based on 2.2/2.3 - I use 2.5), and in the chapter on while/for loops, ran across the following example: >>> L = [1, 2, 3, 4, 5]

[Tutor] range/for list change behavior

2008-09-29 Thread Don Parris
Hi all, After a rather long (and unfortunate) break from tinkering with Python, I am back at it. I am working through the book Learning Python (based on 2.2/2.3 - I use 2.5), and in the chapter on while/for loops, ran across the following example: >>> L = [1, 2, 3, 4, 5] >>> for i in range(len(L

Re: [Tutor] re.compile concatenating two searh words

2008-09-29 Thread Jerry Hill
On Mon, Sep 29, 2008 at 6:19 PM, Srinivas Iyyer <[EMAIL PROTECTED]> wrote: > Hi Tutors, > I have a list with elements as strings. I want to search if any of these > element strings has two words of my interest. How can I ask re.compile to > look for both words. > > my words are 'good' and 'bad'.

Re: [Tutor] re.compile concatenating two searh words

2008-09-29 Thread Steve Willoughby
On Mon, Sep 29, 2008 at 03:19:02PM -0700, Srinivas Iyyer wrote: > Hi Tutors, > I have a list with elements as strings. I want to search if any of these > element strings has two words of my interest. How can I ask re.compile to > look for both words. > > my words are 'good' and 'bad'. > > imp

Re: [Tutor] Reading Files and Such

2008-09-29 Thread bob gailer
Wayne Watson wrote: I have a Python application that requires the program be run in a specific folder, Win XP. It analyzes and modifies txt files there, and only txt files. The mods require creating a tmp file. The tmp files could just as well be an xyz suffix file. That is, it seems as though

[Tutor] re.compile concatenating two searh words

2008-09-29 Thread Srinivas Iyyer
Hi Tutors, I have a list with elements as strings. I want to search if any of these element strings has two words of my interest. How can I ask re.compile to look for both words. my words are 'good' and 'bad'. import re pat = re.compile('good'+'bad') a = ['Rama is a good boy','Raghu is a g

Re: [Tutor] pysqlite and SQLite

2008-09-29 Thread Richard Lovely
If you're compiling from source you do: http://oss.itsystementwicklung.de/trac/pysqlite/browser/doc/install-source.txt If you've got an installer, it shouldn't let you install if you don't have the right things installed. Even if you can install pysqlite, you wouldn't be able to run any pysqlite

Re: [Tutor] pysqlite and SQLite

2008-09-29 Thread Adrian Greyling
Thanks for the response Chad! I'm using Python 2.5.2, so I guess I'm in the clear then, although I'm still getting an unexplained error message. I've taken my program and used GUI2exe to create a standalone executable. When I run said executable on my own WinXP machine, it works just fine. When

[Tutor] pysqlite and SQLite

2008-09-29 Thread Adrian Greyling
Probably a really dumb question, but... Do I have to download and install SQLite before pysqlite will work properly? Thanks, Adrian ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Text Scatter Plots?

2008-09-29 Thread Kent Johnson
On Mon, Sep 29, 2008 at 11:33 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: > I don't really want to dabble with graphics at this point, although I have > some months ago, but maybe I can grab something very elementary and use it. > At the moment, I don't want to get into all the finery of using GUI

Re: [Tutor] Text Scatter Plots?

2008-09-29 Thread W W
On Mon, Sep 29, 2008 at 10:33 AM, Wayne Watson <[EMAIL PROTECTED] > wrote: > I didn't see any posts with curses in the Subject, but my participation > here 2/2008 to now with a hole in the middle where I turned to other matters > than Python. Is there an archive? > > Before GUIs, crude scatter pl

Re: [Tutor] mod_python, mod_wsgi, web.py, django! What to use?

2008-09-29 Thread Marc Tompkins
On Mon, Sep 29, 2008 at 2:55 AM, Alan Gauld <[EMAIL PROTECTED]>wrote: > The biggest limitation by far on Python web development is lack > of Python support on the web servers. You need to find a provider that > either gives you an account on a server with which you can install any > frameworks you

Re: [Tutor] Text Scatter Plots?

2008-09-29 Thread Wayne Watson
Title: Signature.html I didn't see any posts with curses in the Subject, but my participation here 2/2008 to now with a hole in the middle where I turned to other matters than Python. Is there an archive? Before GUIs, crude scatter plots and histograms on TTYs and IBM electronic typewriters w

Re: [Tutor] Text Scatter Plots?

2008-09-29 Thread Alan Gauld
"Wayne Watson" <[EMAIL PROTECTED]> wrote Is there a text graphics module that does say scatter plots or histograms? I'm thinking of stuff prior to the graphics era of computing. Not that I'm aware of. The best I can think of is to use curses - see a recent thread. Other than that you can cre

[Tutor] Text Scatter Plots?

2008-09-29 Thread Wayne Watson
Title: Signature.html Is there a text graphics module that does say scatter plots or histograms? I'm thinking of stuff prior to the graphics era of computing. I'm looking for something really simple. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.01

[Tutor] Reading Files and Such

2008-09-29 Thread Wayne Watson
Title: Signature.html I have a Python application that requires the program be run in a specific folder, Win XP. It analyzes and modifies txt files there, and only txt files. The mods require creating a tmp file. The tmp files could just as well be an xyz suffix file.  That is, it seems as thou

Re: [Tutor] Downloading Files from the net

2008-09-29 Thread Kent Johnson
On Mon, Sep 29, 2008 at 4:32 AM, Timo <[EMAIL PROTECTED]> wrote: > Kent Johnson schreef: >> urllib.urlretrieve() will do it if you don't need anything fancy like >> authentication. >> >> Kent >> > > Ok thanks, this works! And this would be the best way to do it? Also some > larger, around 100-200m

Re: [Tutor] How to replace instances

2008-09-29 Thread Kent Johnson
Replying to the list.. On Mon, Sep 29, 2008 at 12:43 AM, Steve Collins <[EMAIL PROTECTED]> wrote: > Sorry it took me so long to respond; I haven't been able to afford any time > to such leisurely pursuits as programming. > I'm not cc'ing this to the Mailing list, becuase I fear it may get a little

Re: [Tutor] Tutor Digest, Vol 55, Issue 84

2008-09-29 Thread Lie Ryan
On Mon, 2008-09-29 at 03:00 +0200, [EMAIL PROTECTED] wrote: > > Message: 2 > Date: Sun, 28 Sep 2008 23:36:07 + > From: [EMAIL PROTECTED] > Subject: [Tutor] Hello and some questions. > To: tutor@python.org > Message-ID: > <[EMAIL PROTECTED]> > > > Hello all. > > I recently s

Re: [Tutor] vim python debugging

2008-09-29 Thread Alan Gauld
"Arun Tomar" <[EMAIL PROTECTED]> wrote > I"m trying to setup vim for python debugging mode. But it gives > me > error. Has anyone succeeded in doing so. > > link: > http://code.google.com/p/vimpdb/ > > ideally I'm trying to evaluate vim & emacs as command line > editors & > debugging for pyt

Re: [Tutor] mod_python, mod_wsgi, web.py, django! What to use?

2008-09-29 Thread Alan Gauld
"Alec Henriksen" <[EMAIL PROTECTED]> wrote So, lets say I want to develop a distributable web application (such as phpBB or Drupal) for Python. What platform (mod_wsgi, mod_python) would I use to reach as many users as possible, and on top of that, which (if any) framework should I use to de

Re: [Tutor] trying to put Tkinter widget handlers in a module

2008-09-29 Thread Alan Gauld
"John Fouhy" <[EMAIL PROTECTED]> wrote To get around it, you need to supply your handlers with a reference to the Frame object. I guess you could try something like this: ### handlers.py ### def handleCheckButton(obj): def handler(): obj.doNotSend = obj.var.get() if obj.doNo

Re: [Tutor] trying to put Tkinter widget handlers in a module

2008-09-29 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote I am writing a large Python/Tkinter/Pmw program. It has become so big that I would like to move some of the widget handlers to a module for import. The normal way to factor a GUI is by class. Move the entire class into a separate module. You cannot separate the me

Re: [Tutor] Downloading Files from the net

2008-09-29 Thread Timo
Kent Johnson schreef: On Sun, Sep 28, 2008 at 12:51 PM, Timo <[EMAIL PROTECTED]> wrote: What is the best/correct way to download files from a webpage? www.example.com/example.mp3 for instance. I know how to open the site (with urllib), but have no idea how to write the file to the harddisk.

Re: [Tutor] Downloading Files from the net

2008-09-29 Thread Timo
Mark Tolonen schreef: "Timo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] What is the best/correct way to download files from a webpage? www.example.com/example.mp3 for instance. I know how to open the site (with urllib), but have no idea how to write the file to the harddisk.