Bugs item #1562193, was opened at 2006-09-20 13:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1562193&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Faramir^ (faramir2)
Assigned to: Nobody/Anonymous (nobody)
Summary: IDLE Hung up after open script by command line...
Initial Comment:
Hello,
I wrote that code in python and saved as prx.py:
--- CUT ---
from BaseHTTPServer import HTTPServer,
BaseHTTPRequestHandler
from time import strftime, gmtime
import urllib2
import thread
from sys import stdout
class RequestHandler(BaseHTTPRequestHandler):
def serve(self):
print "%s %s %s\r\n%s" % (self.command,
self.path,
self.request_version, self.headers)
header={}
header["content-length"]=0
for i in str(self.headers).split("\r\n"):
j=i.split(":", 1)
if len(j)==2:
header[j[0].strip().lower()] =
j[1].strip()
content=self.rfile.read(int(header["content-
length"]))
print content
url="http://faramir2.prv.pl"
u=urllib2.urlopen(url)
for i,j in u.info().items():
print "%s: %s" % (i,j)
self.server_version = "Apache"
self.sys_version = ""
self.send_response(200)
self.send_header("Content-type", "text/html;
charset=ISO-8859-2")
self.send_header("Connectin", "close")
self.end_headers()
def do_POST(self): self.serve()
def do_HEAD(self): self.serve()
def do_GET(self): self.serve()
address = ("", 80)
server = HTTPServer(address, RequestHandler)
thread.start_new_thread(server.serve_forever, () )
--- CUT ---
When I right click on that file and select "Edit with
IDLE" it opens. Then
when I push F5 the script is running. *Python Shell*
is restarting. But
when I try to connect by browser to http://
localhost:80/ IDLE Hung-up. I
don't see that hung ups when I open IDLE from shortcut
and then in IDLE
open file prx.py and run it works normally - good.
IDLE does't hung up.
I don't know why it works like that, but I think that
it's bug..
Python version: 2.5c2
Tk version: 8.4
IDLE version: 1.2c2
OS Version: Microsoft Windows XP Professional with SP2
---
Again:
* Freeze:
>
"C:\Python25\pythonw.exe" "C:\Python25\Lib\idlelib\idle.pyw"
-n -e "prx.py"
// then F5 on IDLE
// when run open Browser and try to open page: http://
localhost:80
// IDLE freezes
* Works ok:
>
"C:\Python25\pythonw.exe" "C:\Python25\Lib\idlelib\idle.pyw"
-e
// open prx.py in IDLE
// press F5 on IDLE
// run Browwser and try to open page: http://
localhost:80
// all works ok
---
regards,
Marek
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1562193&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com