Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Python Problem

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Barrucadu

Established Member
Impact
64
I have made a webserver in python, and I am trying to add PHP support to it;

Code:
cmd = '"'+path_to_php+'" '+hostfiles+file

This outputs, for example:
Code:
"E:/Servers/Abyss/PHP5/php-cgi.exe" E:/programming/python/httpd/subfolder/2/phptext.php

I then execute it with:
Code:
contents = commands.getoutput(cmd)

But when the command is executed, I always get:
Code:
'{' is not recognised as an internal or external command, operable program, or batch file.

Any ideas?

<edit>
Fixed, turned out that commands.getoutput() isn't supported on windows
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

The forum home page in the new NamePros Dark style
NamePros Dark has a new look
The dark style of the forum is now darker. The page is close to black, with a slight blue tint. New style: NamePros Dim Do you...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back