[Tutor] Functions and random buttons

2006-03-06 Thread Simon Stoltze
I'm trying just for fun to do a Game of life GUI, and want it to be a random size (later specified through some text field or something).So far it's working, but now I want to make each button clickable, so the button switches between true or false. But I can't find out how to do it. So any help wo

Re: [Tutor] saving .csv file as an xl worksheet

2006-03-06 Thread andrew clarke
On Mon, Mar 06, 2006 at 02:46:36PM +0530, arun wrote: > Can i save a file with a desired extension?? > for ex: I have a .csv file (test.csv) and i want to save this file as > test.xls from a python script. Just changing the file extension from .csv to .xls won't change the file format. OpenOf

[Tutor] search and replace

2006-03-06 Thread tak
Hello, I have a problem finding specific words. I would like to filter out a word or replace it in a file. I notices that the re module is good for finding patterns. I am trying to filter out a word from strings, but having a little trouble. I was wondering if I can search a string for a specific

Re: [Tutor] Print list vs telnetlib.telnet.write differences

2006-03-06 Thread Python
On Tue, 2006-03-07 at 13:39 +1000, STREET Gideon (SPARQ) wrote: > The second banner exec is red, the previous commands I send are in > green. So I take it to mean that it is an echo produced by the router. > MMmm strange as the echo is overwriting what I'm sending initially. Well the device is de

Re: [Tutor] Print list vs telnetlib.telnet.write differences

2006-03-06 Thread Python
On Tue, 2006-03-07 at 11:31 +1000, STREET Gideon (SPARQ) wrote: > Enter configuration commands, one per line. End with CNTL/Z. > switch01(config)#banner exec ^ > > ## > > switch01 > > Level XX, XX Some Street, Somewhe

Re: [Tutor] Print list vs telnetlib.telnet.write differences

2006-03-06 Thread STREET Gideon (SPARQ)
Lloyd/David and all, I'm still seeing something a bit weird with sending commands back to the router via tn.write(). This is with python 2.4.2 As per David's last email I replaced: tn.read_until('#') for item in lines: x = item tn.write(x) With: blob = string.join(lines) print blob

[Tutor] [OT] Shells

2006-03-06 Thread John Fouhy
On 07/03/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > I can't imagine life on Windoze without cygwin :-) Agreed --- but the new Microsoft shell looks very interesting. Ars has a good review of it here: http://arstechnica.com/guides/other/msh.ars It borrows from all over the place, including Perl,

Re: [Tutor] how to get the return value?

2006-03-06 Thread Alan Gauld
> To be honest, I had my share of troubles with AT, so I try to stay away > from it. No unix box here, so ... so... download cygwin! including a fully functioning cron. I can't imagine life on Windoze without cygwin :-) Alan G. ___ Tutor maillist -

Re: [Tutor] saving .csv file as an xl worksheet

2006-03-06 Thread Kent Johnson
arun wrote: > Hi , > Can i save a file with a desired extension?? > for ex: I have a .csv file (test.csv) and i want to save this file as > test.xls from a python script. It's easy to rename a file, or read it and save it with whatever name you like, but that won't convert it to an actual Exc

Re: [Tutor] Analysing genetic code (DNA) using python

2006-03-06 Thread Hugo González Monteverde
Hi Anna, Let's see one thing at a time. wrote: > ** If the three base pairs were UUU the value assigned to it (from the > codon value table) would be 0.296 This can be done in Python, and one appropriate tool may be a dictionary such as: >>> dna_table = { "UUU" : 0.296, "GG

Re: [Tutor] Are we the same?

2006-03-06 Thread Danny Yoo
On Mon, 6 Mar 2006, [ISO-8859-1] Hugo Gonz�lez Monteverde wrote: > I believe it is just spam pretending to be a legit invitation, that made > it to the list. Followup: Gavin later sent a reply apologizing to the list --- maybe he got a virus? --- but it didn't make it through since it was addre

Re: [Tutor] Analysing genetic code (DNA) using python

2006-03-06 Thread David Heiser
Here's one approach to the problem (using bogus codon values). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sjw28 Sent: Monday, March 06, 2006 8:37 AM To: tutor@python.org Subject: [Tutor] Analysing genetic code (DNA) using python I have many note

Re: [Tutor] how to get the return value?

2006-03-06 Thread Ingo
On 2006/3/06, Alan Gauld wrote: >> for every workingday of a week: >> [...] >> week >> ... > >To be honest I'd do this with a series of separate scripts triggered by the >OS - either cron on Unix or at in Windows... To be honest, I had my share of troubles with AT, so I try to stay away from

Re: [Tutor] saving .csv file as an xl worksheet

2006-03-06 Thread Hugo González Monteverde
Hello, .xls is a proprietary format used by Microsoft office, and unless you have the specs for that format and are willing to implement them (very very hard) it would not make much sense. If you absolutely need that, then maybe a macro in VBA from Excel itself may be a better option. Ch

Re: [Tutor] Are we the same?

2006-03-06 Thread Hugo González Monteverde
I believe it is just spam pretending to be a legit invitation, that made it to the list. Hugo ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Are we the same?

2006-03-06 Thread Danny Yoo
On 6 Mar 2006 [EMAIL PROTECTED] wrote: > I just took this test on Tickle.com. To see how I scored, take the test. [advertisement cut] I don't mean to be dull, but what does this have to do with Python? If it doesn't have anything to do with learning Python or programming, let's keep it off th

Re: [Tutor] Analysing genetic code (DNA) using python

2006-03-06 Thread Danny Yoo
> I have many notepad documents that all contain long chunks of genetic > code. They look something like this: > > atggctaaactgaccaagcgcatgcgtgttatccgcgagaaagttgatgcaaccaaacag [data example cut] > Basically, I want to design a program using python that can open and > read these documents. Hello

Re: [Tutor] Analysing genetic code (DNA) using python

2006-03-06 Thread Anna Ravenscroft
On 3/6/06, sjw28 <[EMAIL PROTECTED]> wrote: I have many notepad documents that all contain long chunks of geneticcode. They look something like this:atggctaaactgaccaagcgcatgcgtgttatccgcgagaaagttgatgcaaccaaacagtacgacatcaacgaagctatcgcactgctgaaagagctggcgactgctaaattcgtagaa agcgtggacgtagctgttaacctcggcat

[Tutor] Are we the same?

2006-03-06 Thread gmanbauer
Hi, I just took this test on Tickle.com. To see how I scored, take the test. The Super IQ Test http://web.tickle.com/invite?test=3046&type=t Your score will be shown to me, too. Gavin ___ Tutor maillist - Tutor@python.org http://mail.python.org/ma

Re: [Tutor] Analysing genetic code (DNA) using python

2006-03-06 Thread Kent Johnson
sjw28 wrote: > I have many notepad documents that all contain long chunks of genetic > code > I've tried various ways of doing this but keep coming unstuck along the > way. Has anyone got any suggestions for how they would tackle this > problem? > Thanks for any help recieved! You really

Re: [Tutor] how to get the return value?

2006-03-06 Thread Alan Gauld
> for every workingday of a week: > from 7.00 until 17.00: >every minute: > capture a frame and save it >at noon: > compile a video from the frames gathered this morning > do some file manipulations >at 17.00: > compile a video from the frames gathered this afternoo

Re: [Tutor] Query

2006-03-06 Thread Kent Johnson
Rob Lane wrote: > Hey, > > I am currently working on a final year project in college building a 3-D > virtual model of a building in a python based program called Vizard. I > have prepared a set of tutorials on powerpoint which i would like to > access by clicking on various objects in the buil

Re: [Tutor] after signal handler

2006-03-06 Thread Danny Yoo
On Mon, 6 Mar 2006, Hameed U. Khan wrote: > I want to go back after signal handler to the isntruction where I was > stuck. Below is the code I'm trying to play with. Hi Hameed, Here's a small test program that shows that the signal handling does go back to where we left off:

Re: [Tutor] source file or installer

2006-03-06 Thread Danny Yoo
On Mon, 6 Mar 2006, linda.s wrote: > what are the benefits of building python from source file? any > difference if using installer? Hi Linda, If a binary installer is available for your platform, you'll probably want to stick with it. It provides the most convenient way to get Python. Som

[Tutor] Query

2006-03-06 Thread Rob Lane
Hey,I am currently working on a final year project in college building a 3-D virtual model of a building in a python based program called Vizard. I have prepared a set of tutorials on powerpoint which i would like to access by clicking on various objects in the building. e.g. Click on a Window/Air

[Tutor] Analysing genetic code (DNA) using python

2006-03-06 Thread sjw28
I have many notepad documents that all contain long chunks of genetic code. They look something like this: atggctaaactgaccaagcgcatgcgtgttatccgcgagaaagttgatgcaaccaaacag tacgacatcaacgaagctatcgcactgctgaaagagctggcgactgctaaattcgtagaa agcgtggacgtagctgttaacctcggcatcgacgctcgtaaatctgaccagaacgtacgt gg

[Tutor] curses delwin() functionality

2006-03-06 Thread ZeffriN
Hello all, Im writing about a topic which was discussed previously on this mailing list but didn't seem to be answered.. Bernd Prager asked whether the curses modules in Python had functionality like that of delwin() in the C libraries.  He also supplied the below code sample to demonstrate the

Re: [Tutor] how to get the return value?

2006-03-06 Thread seedseven
Danny Yoo <[EMAIL PROTECTED]> schrijft: > But since the scheduler runs in a separate loop than the rest of your > program, trying to return a value between the two won't work very well. > > > However, there are other approaches: we can use some kind of shared > container or communication c

Re: [Tutor] how to get the return value?

2006-03-06 Thread seedseven
Anna Ravenscroft <[EMAIL PROTECTED]> schrijft: > On 3/5/06, ingo <[EMAIL PROTECTED]> wrote: > > > > in news:[EMAIL PROTECTED] Kent Johnson wrote: > > [...] > > >>> > > >>>main(printtime(strf=None)) > > >>> > > >>>[...] > > >> > > >> Anna, > > >> > > >> that results in an syntax error / in

Re: [Tutor] how to get the return value?

2006-03-06 Thread seedseven
Alan Gauld <[EMAIL PROTECTED]> schrijft: > However the real question I have is how you intend to > access that result value. Is it a single value at the end > you want or the cumulative set of values from each > scheduled call? :) Alan, Currently I'm not quite sure what and how I want to

[Tutor] after signal handler

2006-03-06 Thread Hameed U. Khan
Hi, I want to go back after signal handler to the isntruction where I was stuck. Below is the code I'm trying to play with. #!/usr/bin/env python ### Start of code ### import os, signal def handler(signum, frame): print "Signum: ", signum return signal.signal(signal.SIGALRM,handler)

[Tutor] source file or installer

2006-03-06 Thread linda.s
what are the benefits of building python from source file? any difference if using installer? Linda ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] saving .csv file as an xl worksheet

2006-03-06 Thread arun
Hi ,   Can i save a file with a desired extension?? for ex:  I have a .csv file (test.csv) and i want to save this file as test.xls from a python script.   Thanx in advance ac ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listi