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;) and I get the form filled. What about uploading a file programmaticaly? This might help

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;) and I get the form filled. Only if the form uses the GET method. If your file upload

[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? Thank you Paulino

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 should do

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 expects a different

[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] Redirect from a CGI script

2007-01-20 Thread Paulino
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 with Python2.5. Paulino On Sat, 2007-01-20 at 02:10 +, Paulino

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 It's not working. this simple

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

2007-01-18 Thread Paulino
. 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: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO

[Tutor] Redirect from a CGI script

2007-01-18 Thread Paulino
, the server script is as follows: 'from BaseHTTPServer import HTTPServer 'from CGIHTTPServer import CGIHTTPRequestHandler 'HTTPServer((localhost, 80), CGIHTTPRequestHandler).serve_forever() instead of redirecting, it only prints 'Location : /cgi-bin/ecodiv.pyw' inthe browser Paulino

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

2006-12-05 Thread Paulino
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

[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@python.org

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

2006-10-26 Thread Paulino
, 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 ___ Tutor maillist - Tutor@python.org http

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

[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 'htmlbrbrbodypPlease enter values in the fields/p/body/html ' 8 sys.exit(0) When the excption occurs, no message is

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 ano=form["ano"

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@python.org http://mail.python.org/mailman

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] database web app, what tool?

2006-10-01 Thread Paulino
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 ___ Tutor

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: