[Tutor] File upload from python shell

2007-10-13 Thread Paulino
Hello! How can I upload a file from python? If it is a form to fill with values it's simple: urlopen("http://site.com/action?key1=value1;key2=value2";) and I get the form filled. What about uploading a file programmaticaly? Tha

Re: [Tutor] File upload from python shell

2007-10-14 Thread Paulino
Luke Paireepinart escreveu: > Paulino wrote: >> Hello! >> >> >> How can I upload a file from python? >> >> If it is a form to fill with values it's simple: >> >> >> urlopen("http://site.com/action?key1=value1;key2=value2"

Re: [Tutor] File upload from python shell

2007-10-15 Thread Paulino
Kent Johnson escreveu: > Paulino wrote: >> Hello! >> >> >> How can I upload a file from python? >> >> If it is a form to fill with values it's simple: >> >> >> urlopen("http://site.com/action?key1=value1;key2=value2&quo

Re: [Tutor] e-learning Python

2006-09-28 Thread Paulino
Yes I'm looking for something more interactive, but didn't find anything yet. Lerning by one's self has it's limitations... [EMAIL PROTECTED] escreveu: Message: 1 Date: Tue, 26 Sep 2006 10:05:56 + (UTC) From: Andrei <[EMAIL PROTECTED]> Subject: Re: [Tutor] e-learning Python To: tu

[Tutor] database web app, what tool?

2006-10-01 Thread Paulino
? There are so many options! Zope-Plone have it's own web server, so less config is required. But i can't find any recipe or tutorial usefull for this task... there is also django, turbogears, webware, apache and mod-python..... Thank you Paulino

Re: [Tutor] tkinter

2006-10-09 Thread Paulino
Hi Abdullah! There is a kind of grid for tkinter that you can find online in the python cookbook, search for MultiListbox. But if you really want a spreadsheet like grid, you'd rather use wx.grid from wxPython. wxPython is much more powerfull than tkinter and is as easy to learn. You can find

[Tutor] Exception and sys.exit() in a cgi script

2006-10-15 Thread Paulino
This is a peace of a CGI script i have. 1 import cgi 2 form=cgi.FieldStorage() 3 try : 4 ano=form["ano"].value 5 conta=form["conta"].value 6 except KeyError : 7 print 'Please enter values in the fields ' 8 sys.exit(0) When the excption occurs, no message is shown on the browser.

Re: [Tutor] How to open file in Excel/Calc spreadsheet?

2006-10-15 Thread Paulino
Very simple: os.startfile([file]) ex: >>> import os >>> os.startfile("d:\\documentos\\eleicoes2005-dn.xls") It works with any file tipe in windows, the file is opened with it's associated application. Basil Shubin wrote: > Hi ,friends! > > How I can open Excel or OOCalc spreadsheet file

Re: [Tutor] Exception and sys.exit() in a cgi script

2006-10-15 Thread Paulino
Thank you, Yes I have other scripts working fine. The OS is WXP and the server is the python's CGIHTTPserver (for an intranet use only) - Hi Paulino, > This is a peace of a CGI script i have. > > 1 import cgi > 2 form=cgi.FieldStorage() > 3 try : > 4 an

[Tutor] CGIHTTPServer - redirect output to a log file

2006-10-15 Thread Paulino
How can I redirect the output of an CGIHTTPServer from the console to a logfile? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] CGIHTTPServer - redirect output to a log file

2006-10-15 Thread Paulino
well, I'm running this CGIserver on windows... Glenn T Norton escreveu: > Paulino wrote: > >> How can I redirect the output of an CGIHTTPServer from the console to >> a logfile? >> ___ >> Tutor maillist - Tutor@p

Re: [Tutor] Exception and sys.exit() in a cgi script

2006-10-21 Thread Paulino
Mike Hansen Mike.Hansen at atmel.com Mon Oct 16 18:43:29 CEST 2006 > This is a peace of a CGI script i have. > > 1 import cgi > 2 form=cgi.FieldStorage() > 3 try : > 4 ano=form["ano"].value > 5 conta=form["conta"].value > 6 except KeyError : > 7 print 'Please

Re: [Tutor] Help me.. problem in building calculator application

2006-10-26 Thread Paulino
pe: text/plain; charset="iso-8859-1" > > Hi folks, > > I am trying to build a rudimentary calculator application using Tkinter... > > Hi, Asrar! Try this article instead: http://www.devshed.com/c/a/Python/Designing-a-Calculator-in-wxPython/ Paulino ___

Re: [Tutor] cgi form field and popup window

2006-10-26 Thread Paulino
paulino wrote: I would like to have a popup window to show the possible options to a form field (supplier ID) and that by clicking on the desired item, the field is automatically filled. The options are a database field values. I wonder if this is possible to do with python

[Tutor] How to kill an app from python on windows?

2006-12-02 Thread Paulino
To launch an app one can state os.startfile('hello.pdf') and the file is opened in acrobat . And how can I kill the app from python, in order to, for instance, rename the file? Is it possible? thanks Paulino ___ Tutor maillist - Tutor@

Re: [Tutor] How to kill an app from python on windows? (Tim Golden)

2006-12-05 Thread Paulino
umstances of what you're doing. > > TJG > > > Thank you Tim, How do i get the pid of the process? Paulino ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Graphics with Python: wxPython vs. tkinter vs., PyCairo vs. PyX vs...

2007-01-18 Thread Paulino
gets to perform. Good luck Paulino > Date: Wed, 17 Jan 2007 14:09:57 -0600 > From: "Vijay Pattisapu" <[EMAIL PROTECTED]> > Subject: [Tutor] Graphics with Python: wxPython vs. tkinter vs. > PyCairo vs. PyX vs... > To: tutor@python.org > Message-ID: >

[Tutor] Redirect from a CGI script

2007-01-18 Thread Paulino
odiv.pyw " 'print I use CGIHTTPServer, the server script is as follows: 'from BaseHTTPServer import HTTPServer 'from CGIHTTPServer import CGIHTTPRequestHandler 'HTTPServer(("localhost", 80), CGIHTTPRequestHandler).serve_forever() instead o

Re: [Tutor] Redirect from a CGI script

2007-01-19 Thread Paulino
Thank you Andre, well it doesn't work either! Paulino Andre Engels escreveu: 2007/1/18, Paulino <[EMAIL PROTECTED]>: How can i redirect to another URL from a python CGI script. Is's suposed to be as simply as: print "Location : http://newurl " I

Re: [Tutor] Redirect from a CGI script

2007-01-20 Thread Paulino
he Karrigel embeded server and nothing happened... I tryed all the sugestions from Andre with no succes. The cgi script as only these two lines: 'print "Content-type:text/html\r\n" 'print "Location:http://python.org/\r\n\r"; I have a Win Xp pro machine

[Tutor] same output on diferent sys.stdout.encodings

2007-02-07 Thread Paulino
Hi everyone! I have some strings that include special characters, to be displayed in widget labels ( PyQt4 ). The output changes in diferent OS's due to diferent sys.stdout encoding Not only the labels in the GUI change, but the source file strings are altered when I move from win to linux and

Re: [Tutor] same output on diferent sys.stdout.encodings

2007-02-08 Thread Paulino
Yes I have that declaration in my script. Paulino > Send Tutor mailing list submissions to > tutor@python.org > > # -*- coding: iso-8859-1 -*- If you put this at the first line of your .py files (of course replace iso-8859-1 with whatever encoding you use) I think this s

Re: [Tutor] same output on diferent sys.stdout.encodings

2007-02-08 Thread Paulino
Yes that is the problem. But I canot control all the the encodings in every PC that the script is to be run... Paulino Kent Johnson escreveu: > > I think the problem you are having is with the source code encoding, > not sys.stdout.encoding. Probably your editor on linux