python version?

Cliff Wells logiplexsoftware at earthlink.net
Tue Jun 18 14:02:25 EDT 2002


On Tue, 18 Jun 2002 08:12:53 GMT
George Hester wrote:
> I think you guys don't how to do it.

I think you wouldn't know an answer if it bit you:

[You]
What is a simple script that will tell me the version of python I am currently
running?  IIS 5.0 Windows 2000.

[Jeremy Yallop]
Look up sys.version and sys.version_info.

[You]
Traceback (innermost last): File "<Script Block >", line 5, in ?
Response.Write(sys.version) NameError: name 'sys' is not defined

[Gerhard]
You did not import the sys module.

[You]
I think you guys don't how to do it.

[Duncan Booth, doing your job for you]
Try this:
<html>
<head>
  <title>Python Version</title>
</head
<body>
<SCRIPT Language="Python" RUNAT=Server>
import sys
Response.Write(sys.version)
</SCRIPT>
</body>
</html>

Perhaps you'd like someone to come out and type it for you as well. 

Please remember that the people on this list aren't being paid to help you
write your program.  They expect you to do at least /a little/ of the research
yourself.  It's understandable if you don't know where to look, but when
someone points you to the relevant portion of the docs, you should at least
read it before asking again.  It's clear from your postings that you haven't
even read the tutorial.
If you can't do that then you should pay someone to write your program for you.

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308





More information about the Python-list mailing list