Python: Importing modules into CGI script
问题 I'm hoping someone might be able to explain to me why this is happening? I am running httpd on Centos 7 with Python 2.7 I have a python module in /home/user/Path/to/module.py . Lets say, for example, it prints "Hello World!" print("Hello World!") I then try to import it into the file /var/www/cgi-bin/index.py like so: #!/usr/bin/python import sys sys.path.append('/home/user/Path/to/') print('Content-type: text/html\n\n') print('<!DOCTYPE html>') print('<html lang="en">') print('<head>') print