![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
How to run Python scripts in a browser window
I am trying to figure out how to make the Windows (IIS?) system I am using display the output of .py files in a browser window rather than launch the command prompt.
I found this page, which instructed me to edit the registry, although that seems to have had no effect even after I restarted. However, I'm not sure I did this correctly--I opened regedt32 and navigated to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\, then created a new Multi-String Value named ScriptMap with the value ".py :REG_SZ: c:\<path to python>\python.exe -u %s %s " (no parentheses). The reason I mention this is because I have almost no experience with Windows, and if anyone notices something I'm doing wrong, it would help. Any ideas? Thanks. |
|
|
|
|
|
#2 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
This reference is a little more detailed.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#3 |
|
Expert Programmer
|
The link you gave me talks about the "Internet Service Manager (ISM)". Is this a program? If so, how can I find it?
And another thing. I am writing a script that needs to access files on a T: drive which is shared over a network. I don't believe it is set up to be a web server, just such that anyone on the network can access the files on the drive. There is a separate web server that is used for hosting the website which I know has Python installed, but I don't know of any way to access files on the T: drive from it. How can I get around this? |
|
|
|
|
|
#4 | ||
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
Quote:
|
||
|
|
|
|
|
#5 | |
|
Expert Programmer
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,827
Rep Power: 5
![]() |
It will be accessible by any computer in the network, if localhost is replaced with your computer's private IP (eg. 192.168.0.110), found by executing the command "ipconfig" (windows only).
It will be accessible by any computer period, if localhost is replaced with your computer's public IP (eg. 64.230.61.156), and port 80 (or in your case, 8080) is forwarded to your computer's private IP (see first paragraph). If you don't like a window always being open, save it as .pyw and it'll run as a background process (windows only). Hope this helps. |
|
|
|
|
|
#7 | ||
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
Quote:
|
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|