Help with HTML in Python
#1
Hi!

I want to open a url from the xbox via a python script. I'd like to have a command button or something that I can click on in order to activate the link. Basically, what I am doing is issueing a command to a storage server that I have to turn it off.

I am VERY new to python, but not to programming.

Any help would be greatly appreciated.

Here's what I have so far, which doesn't work! Shocked Please correct me if my syntax is incorrect. The login and password and IP have been changed for demonstration purposes.Big Grin

Code:
import urllib2
reg = urllib2.urlopen(url='http://login:[email protected]/exec_raw.php?cmd=reboot%20-p%20now')

try:
    handle = urllib2.urlopen(req)

SL
Reply
#2
I'm no expert but I think you have a typo...
change
handle = urllib2.urlopen(req)
to
handle = urllib2.urlopen(reg)
Let us know Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Help with HTML in Python0