What file formats are acceptable for Python script files?

.py or .cgi extensions are available for Python script files.

  • The .cgi extension is used for Python CGI script files which deliver publicly accessible web output.
     
  • The .py extension should be used for Python scripts that are only meant to be run from the command line and for scripts that don't provide web output.
Was this answer helpful?

Related Articles

What file permissions must I provide to my Python script files?

The appropriate permissions for Python script files vary depending upon the function of the...

Where can I find the Python executable's path?

The default Python executable's absolute path on the servers of Hostginger Hosting is...

How to create and activate an environment using Virtualenv in Python?

You can build unique Python environments on your own with the virtualenv application. The...

How to install Python packages using PIP?

The PIP program enables you to install Python packages. To use the PIP program, follow these...