So I want to make this python script... It will log the two parameters I pass it in a file. For example, if I went to...
Then the program would open up file.txt and output...Code:http://mydomain.com/subdir/myScript.py?total=18384&time=9838482
Total: 18384
Time: 9838482
I'm just running an automated script on a server and need some basic functionality. So would this code work for this purpose?
Also, since I'm new to Python, would there be a better way to write that code?Code:f = open('wowus.txt', 'w') value = ('The result: ', total) s = str(value) f.write(s); f.write('\n'); value = ('Running time: ', time) s = str(value) f.write(s); f.write('\n\n'); f.close()
tl;dr: Basically, if I pass parameters to a script via HTTP, can I just use them?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks