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
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
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
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
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
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
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
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
.
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
, 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
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
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
,
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
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
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
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
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"
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
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
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
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:
21 matches
Mail list logo