[Tutor] [tutor] dictionary

2006-06-06 Thread emilia12
Hi, how can i print a dictionary, sorted by the values? - Поличба 666. Само в кината. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Combo Box in Tkinter

2006-06-06 Thread John Fouhy
Check out Python MegaWidgets (pmw.sourceforge.net). On 07/06/06, Keo Sophon <[EMAIL PROTECTED]> wrote: > Hi, > > Is there any Combo Box in Tkinter? I looked for it but only found list box. > Might it be list box having any option to make itself as a combo box? > > Thanks, > Phon >

[Tutor] Apologies

2006-06-06 Thread Kermit Rose
I%60 should have been I%12 My previous request has been solved. From: Kermit Rose Date: 06/06/06 22:05:17 To: tutor@python.org Subject: end of line character seems to be invisible. why? I ran the program # inp = open("CMT_MCAID", "rb") # out = open("mcaid.txt", "w")

[Tutor] Combo Box in Tkinter

2006-06-06 Thread Keo Sophon
Hi, Is there any Combo Box in Tkinter? I looked for it but only found list box. Might it be list box having any option to make itself as a combo box? Thanks, Phon ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] end of line character seems to be invisible. why?

2006-06-06 Thread Kermit Rose
I ran the program #inp = open("CMT_MCAID", "rb") #out = open("mcaid.txt", "w") #for I in range(1,1000): #if I I%60=== 0: #out.write('\n') #ch = inp.read(1) #if not ch: break # EOF #k = ord(ch) # convert to integer #kl

Re: [Tutor] bounced email

2006-06-06 Thread Tim Peters
[Kermit Rose] > My last email to you bounced. > > > Why? > > From: [EMAIL PROTECTED] > Date: 06/06/06 20:30:49 > To: [EMAIL PROTECTED] > Subject: The results of your email commands > > > The results of your email command are provided below. Attached is your > original message. > > - Unprocessed: >

Re: [Tutor] bounced email

2006-06-06 Thread Kent Johnson
Kermit Rose wrote: > > > My last email to you bounced. > > > Why? I don't know, it seems to be complaining about the HTML and missing some image? Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How do I get Dos to recognize python command?

2006-06-06 Thread Kent Johnson
Kermit Rose wrote: > > I followed the model in > > http://www.byteofpython.info/read/source-file.html > > and saw following results. > > > C:\DavidKaremera\June2006\SAS>python med.py > 'python' is not recognized as an internal or external command, > operable program or batch file. >

[Tutor] bounced email

2006-06-06 Thread Kermit Rose
the following after my reply to you? -- next part -- An HTML attachment was scrubbed... URL: http://mail.python org/pipermail/tutor/attachments/20060606/798770c9/attachment.HTML -- next part -- A non-text attachment was scrubbed... Name: not

[Tutor] How do I get Dos to recognize python command?

2006-06-06 Thread Kermit Rose
I followed the model in http://www.byteofpython.info/read/source-file.html and saw following results. C:\DavidKaremera\June2006\SAS>python med.py 'python' is not recognized as an internal or external command, operable program or batch file. What do I do to make DOS recognize pyt

Re: [Tutor] Tutor Digest, Vol 28, Issue 10

2006-06-06 Thread Kent Johnson
Kermit Rose wrote: > Thank you very much. It looks exactly what I wished to know. > > But now, I realize that I don't know how to invoke Python to compile and > execute the > program file. There is no separate compile step, Python does that automatically. The details of running a program vary

[Tutor] python application on a web page

2006-06-06 Thread Puzzled Me
Hi,   I am so new to everything, I don't even know where to post my question... do bear...   I made this Python calculator that will take an equation as an input and will display the computed curves on a shiny Tkinter interface   Now, I'd like to make this application available on a public w

Re: [Tutor] Tutor Digest, Vol 28, Issue 10

2006-06-06 Thread Kermit Rose
    From: [EMAIL PROTECTED] Date: 06/06/06 12:31:25 To: tutor@python.org Subject: Tutor Digest, Vol 28, Issue 10     Message: 9 Date: Tue, 06 Jun 2006 12:21:51 -0400 From: Kent Johnson <[EMAIL PROTECTED]> Subject: Re: [Tutor] Reading characters from file in binary mode To: Python Tutor

Re: [Tutor] elif

2006-06-06 Thread Sean Fioritto
Øyvind, I know this isn't Python advice, but in general it seems as if setting up a cron job would be easier. If you don't know how, I could gladly help. - Sean On 6/6/06, Øyvind <[EMAIL PROTECTED]> wrote: > Hello. > > I need to make a program that does certain things every 5 minutes > mon-frida

Re: [Tutor] Reference a variable from a string whose value is the name of the variable

2006-06-06 Thread Patrick Wheeler
>data = [ ]>for i in xrange(1,101):> data = "" %i  _n, f %i_v)) The function locals() will return a dictionary of variables in the current scope.  This can then be used to reference variables by name. x=1 xname = 'x' print locals()['x'] print locals()[xname] This prints: 1 1 or for your example.

Re: [Tutor] Truly generic database API

2006-06-06 Thread Kent Johnson
Smith, Jeff wrote: > I'm looking for a truly generic database API in that the underlying DB > could be text, XML, SQL engine, etc. > > For instance, initially, the underlying database will probably be text > files but we may at some point want to move to a real database server or > possibly an XML

Re: [Tutor] Truly generic database API

2006-06-06 Thread johnf
On Tuesday 06 June 2006 09:22, Smith, Jeff wrote: > I'm looking for a truly generic database API in that the underlying DB > could be text, XML, SQL engine, etc. > > For instance, initially, the underlying database will probably be text > files but we may at some point want to move to a real databa

[Tutor] Truly generic database API

2006-06-06 Thread Smith, Jeff
I'm looking for a truly generic database API in that the underlying DB could be text, XML, SQL engine, etc. For instance, initially, the underlying database will probably be text files but we may at some point want to move to a real database server or possibly an XML file without having to recode

Re: [Tutor] Reading characters from file in binary mode

2006-06-06 Thread Kent Johnson
Kermit Rose wrote: > Hello. > > I wish to translate a SAS data file to text, and do not have the > professional > version of SAS to do so. > > I have the student version of SAS, and have translated the shortest of 4 SAS > data sets given. > > For the other 3, I wish to construct a python pro

Re: [Tutor] doubt plz help

2006-06-06 Thread Ezra Taylor
Siddhart: Kent is correct, I tried the os.system('clear') on my Debian linux box and the screen clears. Don't forget to use import os. Also, I 'm new to Python. Hello community. Ezra Taylor On 6/6/06, soumitr siddharth <[EMAIL PROTECTED]> wrote: > > how do i clear the sc

[Tutor] Reading characters from file in binary mode

2006-06-06 Thread Kermit Rose
Hello.   I wish to translate a SAS data file to text, and do not have the professional version of SAS to do so.   I have the student version of SAS, and have translated the shortest of 4 SAS data sets given.   For the other 3, I wish to construct a python program to read the characters in, on

Re: [Tutor] elif

2006-06-06 Thread Kent Johnson
Øyvind wrote: > Hello. > > I need to make a program that does certain things every 5 minutes > mon-friday. I have started writing it like this: > > if strftime('%w') == 1: > if strftime('%M') % 5 == 0: > n.start() > > elif strftime('%w') == 2: >

Re: [Tutor] doubt plz help

2006-06-06 Thread Kent Johnson
soumitr siddharth wrote: > how do i clear the scseer ?? > suppose i have two pages to display one > after the other ,how should i do it ? It depends on the OS and the type of display. For a console application on Windows, use os.system('cls') On Linux I think the corresponding command is os.syst

Re: [Tutor] Reference a variable from a string whose value is the name of the variable

2006-06-06 Thread Kent Johnson
Peter Jessop wrote: > Kent > > Thanks for your reply. > The structure is for sending form variables and values to a web server > with POST. > I am using urllib.urlencode which accepts a list or dictionary as argument. > > The idea is to look for airline tickets. > The airline I buy from only lets

Re: [Tutor] doubt plz help

2006-06-06 Thread Matthew Webber
>> Try to rephrase that question. I don't think I was the only one not understanding what you are asking? Try to rephrase that response. I'm sure that you understand the double negative in the second sentence, but many who speak English as a second language (including, possibly, the original poste

[Tutor] elif

2006-06-06 Thread Øyvind
Hello. I need to make a program that does certain things every 5 minutes mon-friday. I have started writing it like this: if strftime('%w') == 1: if strftime('%M') % 5 == 0: n.start() elif strftime('%w') == 2: if strftime('%M') % 5 == 0:

Re: [Tutor] doubt plz help

2006-06-06 Thread Øyvind
Try to rephrase that question. I don't think I was the only one not understanding what you are asking? >how do i clear the scseer ?? >suppose i have two pages to display one >after the other ,how should i do it ? -- This email has been scanned for viruses & spam by Decna as - www.decna.no De

Re: [Tutor] FileDialogBox in Tkinter

2006-06-06 Thread Alan Gauld
> Yes, it helps and does what I want. I had read some also your > document, but > they don't talk deeply and widely about Tkinter. However, they are > good > resource to start. Yes, the GUI topic in my tutor only introduces some of the language and the most basic principles. I then leave you to

Re: [Tutor] FileDialogBox in Tkinter

2006-06-06 Thread Keo Sophon
On Tuesday 06 June 2006 14:49, you wrote: > > What to do in order to get FileDialogBox in Tkinter for using? > > > >>> import tkFileDialog > >>> res = tkFileDialog.asksaveasfilename(defaultextension=".txt") > > Does that help? > > > Where to find a complete reference of Tkinter? > > I assume you ha

Re: [Tutor] Reference a variable from a string whose value is the name of the variable

2006-06-06 Thread Peter Jessop
Kent Thanks for your reply. The structure is for sending form variables and values to a web server with POST. I am using urllib.urlencode which accepts a list or dictionary as argument. The idea is to look for airline tickets. The airline I buy from only lets me search by data but I want to autom

Re: [Tutor] FileDialogBox in Tkinter

2006-06-06 Thread Alan Gauld
> What to do in order to get FileDialogBox in Tkinter for using? >>> import tkFileDialog >>> res = tkFileDialog.asksaveasfilename(defaultextension=".txt") Does that help? > Where to find a complete reference of Tkinter? I assume you have checked the Tkinter section of the Python web site? It