Topics Map > Communication and Collaboration > cPanel Web Hosting
cPanel, How to use Python on cPanel
You can use Python for scripting and programming on the web.illinois.edu platform.
The cPanel dashboard includes a utility that allows you to choose the Python version and install additional modules.
- Log in to your cPanel account dashboard at https://web.illinois.edu/.
- In the Software section of the dashboard, click on the Setup Python App utility.
- Choose the Python version you want from those available.
- Enter a directory name in your home directory where you would like your application files to be stored.
- Enter the name your application will be referred to in the browser. The domain is already provided for you.
- Click Setup and wait for the page to update.
When it is done with the configuration, your new application will be listed under the "Existing applications" section.
Once the application is configured, you can change the directory, the URI and the version of Python you are using in the Existing Applications section.
The newly created application will be supplied with a stub only. The real application can be developed or put into the application folder now.
After the application is ready in the application folder, the wsgi parameter can be set (See below).
In the Existing Applications section, there is a Modules field.
- Start typing a module name in the input field, and a list of Python extension choices will be displayed.
- Choose the entry you want from the drop-down and click Add.
You can also delete extensions from this interface as well.
The WSGI entry is to specify the Python WSGI application entry point. It must be specified as a filename, must be callable and separated by a colon.
For example, if your app is running from the file flask/run.py by calling callable app, set WSGI to flask/run.py:app .
You can run simple commands from the web interface. For example, you can install packages from specific repositories or control web applications by means of django-admin by entering the command in the "Execute command" input field.