sys.stdin and Java class

marc_risney at my-deja.com marc_risney at my-deja.com
Tue Dec 14 23:07:19 EST 1999


Pyhtonistas, I am having the most frustrating
attempt at the following task:

In my CGI I have created a function that feeds a
Java class a string, the output is an encrypted
key, problem, how do I capture the ouptu and
using sendmail pass the Loadkey???
I have used os.popen, os.system, nothing appears
to work...Help please!!, the ouput is occuring
during teh HTML creation in my CGI and interfering
here is my function

def GenerateLicenceKey(prod,exprdate):
     key = "java Checksum " + str(prod) + "-1-1-0-
-1234-" + exprdate
     keyfile = open('keys.txt','a')


     rslts = sys.stdout.write(key)
     rslts = raw_input()
     keyfile.write(rslts)
     keyfile.close()



Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list