Re: [Tutor] MemoryError

2004-12-08 Thread Michael Janssen
[forgot to cc to the list] -- Forwarded message -- From: Michael Janssen <[EMAIL PROTECTED]> Date: Wed, 8 Dec 2004 14:40:46 +0100 Subject: Re: [Tutor] MemoryError To: Liam Clarke <[EMAIL PROTECTED]> On Wed, 8 Dec 2004 23:29:38 +1300, Liam Clarke <[EMAIL PR

Re: [Tutor] hi

2005-01-11 Thread Michael Janssen
On Tue, 11 Jan 2005 11:39:36 +0530, Gopinath V, ASDC Chennai <[EMAIL PROTECTED]> wrote: > Can any1 please tell me how do i open an editor in python running in > linux os can be as easy as: os.system("editor-cmd") regards Michael ___ Tutor maillist

Re: [Tutor] reinitializing namespace

2005-01-13 Thread Michael Janssen
On Thu, 13 Jan 2005 13:20:11 +0100, Dimitri D'Or <[EMAIL PROTECTED]> wrote: > For some purpose, I would like to reinitialize the main namespace, i.e. I want > to delete all the variables I have created through the use of functions or > keyboard entries. Hello Dimiti, sound like you're talking ab

Re: [Tutor] reinitializing namespace

2005-01-14 Thread Michael Janssen
On Fri, 14 Jan 2005 09:30:46 +0100, Dimitri D'Or <[EMAIL PROTECTED]> wrote: > Thank you for your answer. Actually, my question is not specific to > interactive sessions. I've written a script that loads some modules, create > variables and show figures. What I would like to find, is a command for

Re: [Tutor] How does import work?

2005-02-01 Thread Michael Janssen
On Fri, 28 Jan 2005 18:40:53 +0100, Johan Nilsson <[EMAIL PROTECTED]> wrote: > >>> from scipy.signal.signaltools import * > > /Traceback (most recent call last): > File "", line 1, in -toplevel- > from scipy.signal.signaltools import * > ImportError: No module named signaltools/ > > So I

Re: [Tutor] carriage return on windows

2005-02-01 Thread Michael Janssen
On Mon, 31 Jan 2005 18:01:59 -0600, Victor Rex <[EMAIL PROTECTED]> wrote: > I played around with this output issue and I love the way it works. > Now, how do you do this in *nix? I tried the same approach and I get a > blank line for 5 seconds (or whatever number of cycles you have on your > examp

Re: [Tutor] i have a question???

2005-02-03 Thread Michael Janssen
On Thu, 3 Feb 2005 05:53:31 -0800 (PST), alieks laouhe <[EMAIL PROTECTED]> wrote: > This is from a tutorial > > "EXERCISE 3.9 > Use the math library to write a program to print out > the sin and cos of numbers from 0 to 2pi in intervals > of pi/6. You will need to use the range() function." > >

Re: [Tutor] i have a question???

2005-02-03 Thread Michael Janssen
[the problem provided by alieks] > >>"EXERCISE 3.9 > >>Use the math library to write a program to print out > >>the sin and cos of numbers from 0 to 2pi in intervals > >>of pi/6. You will need to use the range() function." [Michael] > > You _can_ do the exercise > > with the range function but it

Re: [Tutor] UselessPython 2.0

2005-04-11 Thread Michael Janssen
On Apr 10, 2005 7:18 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > I'm a newbie, but would this qualify as a contribution to UselessPython 2.0? Hello Dick, don't be shy, or do you suspect it might be too usefull? ;-) I found it funny, so it must be good enough. here my remarks: > def makeString

Re: [Tutor] UselessPython 2.0

2005-04-11 Thread Michael Janssen
On Apr 11, 2005 7:30 PM, Michael Janssen <[EMAIL PROTECTED]> wrote: > [what's bad about non-alphabetic characters?] I found it out for myself. To quote from Dick's post: "A man, a plan, a canal, Panama!" Seems like palindromes are allowed not to reflect whitespace

Re: [Tutor] redirecting output to logfile and logrotate

2005-07-24 Thread Michael Janssen
On 7/23/05, Winfried Tilanus <[EMAIL PROTECTED]> wrote: > Somebody else suggested (in private) to make logrotate send a -HUP this was me. Sorry for that, I'm still unfamilar with gmail. Danny's suggestion using RotatingFileHandler is better than mine, cause it uses a standard module. I suggest

Re: [Tutor] surprising len() results ???

2005-08-09 Thread Michael Janssen
On 8/9/05, Tom Cloyd <[EMAIL PROTECTED]> wrote: > print len('()ÄäÀÁàáÇçÈÉèéÌÍìíÑñÒÓòóÙÚúù') > print len('--AaAAaaCcEEeeIIiiNnOOooUUuu') > > the result: > > 54 > 28 > > I'm completely mystified by this. All of it. None of it makes sense. This > program was working fine. Now it doesn't. And those

Re: [Tutor] Customized endswith/startswith version

2005-08-10 Thread Michael Janssen
On 8/10/05, Negroup - <[EMAIL PROTECTED]> wrote: > >>> f = open('codes.txt') > >>> # valid codes starts with 'abc' or '123' or 'ff5' > >>> [valid for valid in f.readlines() if valid.startswith('abc') or > valid.startswith('123') or valid.startswith('ff5')] > > This is just an example, in my appli

Re: [Tutor] where to insert?

2005-09-23 Thread Michael Janssen
On 9/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I would like to insert string.join(msgList,"") into the following program > where do I insert it? do you want to build a temporary list and join its elements afterwards? This can look like: # Loop through each substring and build A

Re: [Tutor] help

2005-10-24 Thread Michael Janssen
On 10/24/05, Shi Mu <[EMAIL PROTECTED]> wrote: > I got confused by the following information from the help for "FIND": > find(s, *args) > find(s, sub [,start [,end]]) -> in Hello Shi Mu, this is the help for the function find in the string module, which is slightly out of date. Better you use

Re: [Tutor] Currency conversion

2005-12-12 Thread Michael Janssen
On 12/12/05, David Holland <[EMAIL PROTECTED]> wrote: > wouldn't it be better to change :- > "def rupees_from_dollars(d_doll): > return 43*(d_doll) > > etc to" :- > "def conversiond_doll, x): > return x*(d_doll) > " > You can then have one function for all currencies and > would be less c

Re: [Tutor] Dictionaries

2006-01-27 Thread Michael Janssen
On 1/26/06, John Fouhy <[EMAIL PROTECTED]> wrote: > >>> for name in pairs: > ... print '%*s --> %*s' % (maxKey, name, maxValue, pairs[name]) thanks for pointing out the '*' syntax. Ignorant as I am I have had to write things like print '%%%ss --> %%%ss' % (maxKey, maxValue) % (name, pairs[na

Re: [Tutor] Fill in a web form

2006-03-18 Thread Michael Janssen
On 3/18/06, David Holland <[EMAIL PROTECTED]> wrote: > Is there a way in python to automatically put values in a web page ? For > example I used to travel on a train (I live in the UK) that is always late. > Is there a way to automatically to do this ? > I can't think of how to do it. You don't

Re: [Tutor] Regex help

2006-08-28 Thread Michael Janssen
On 8/26/06, William O'Higgins Witteman <[EMAIL PROTECTED]> wrote: > I want a case-insensitive, verbose pattern. I have a long-ish list of > match criteria (about a dozen distinct cases), which should be all "or", > so I won't need to be clever with precedence. BTW I find it easier not to use re.

Re: [Tutor] Sorting a list in an add order

2006-09-06 Thread Michael Janssen
On 9/6/06, Matt Williams <[EMAIL PROTECTED]> wrote: > The input is done by specifying a directory, and using glob to find the > ".tex" filenames. > > However, I want to process them so that they are arranged in the correct > order, which means I need to sort the list of files. Of course, because >

Re: [Tutor] regex newbie question

2008-05-09 Thread Michael Janssen
On Fri, May 9, 2008 at 3:16 AM, Dick Moores <[EMAIL PROTECTED]> wrote: > > At 04:32 PM 5/8/2008, Steve Willoughby wrote: >> >> That would be r'^\d\d(\d\d)*$' > > I bought RegexBuddy () today, which is a big > help. However, it has a comment about your regex The comment