Unstoppable Domains โ€” Get your daily AI drops report

Python Problem

NamecheapNamecheap
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back