DWShells
← All guides

Development / 6 min READ

Run Python and persistent sessions

Use approved Python environments and reconnect to portal-managed tmux sessions.

Reviewed 6 October 2026 · DarkWorld Network · Applies to the selected shell’s effective permissions

Two ways to manage work Workflow illustration
  1. 01Python app

    Environment → uploaded script → managed Run script.

  2. 02Persistent terminal

    Session → attach in Shell Access → detach and return.

Check your plan

A Python environment

  1. Create an environment

    Open Python in Packages, choose an environment name and use Create environment.

  2. Upload a script

    Select a UTF-8 .py file. The current portal upload limit is 64 KiB. Use Upload script, then select the uploaded script or its returned path.

  3. Install required dependencies

    Enter the packages your script actually needs and use Install dependencies. Inspect the result before running the script.

  4. Run and inspect

    Select the correct environment and script path relative to your home, then use Run script. Check View logs. Stop an unused application before changing or deleting its environment.

A simple first script

Save as hello.py locally, upload it and use it to check that your environment works:

print("Hello from my DWShells Python environment")

This script prints one line and exits normally. A finished process is expected, not a failed always-on app. Deleting an unused environment keeps uploaded scripts, but you should still save independent copies.

Persistent terminal work

  1. Create a session

    In the appropriate Packages session manager, choose a session name and use Create session. Available IRC clients are shown by the panel.

  2. Attach in Shell Access

    Use Copy attach command and run the exact command in your browser terminal or SSH connection. Portal-managed sessions use a dedicated tmux socket.

  3. Detach and return

    Press Ctrl+B, release, then D to detach from tmux. Reconnect later and run the same attach command. Closing the session is different from detaching and terminates that session’s work.

Example attach command

For a portal-managed session named ircsession:

tmux -S ~/.dwshell-tmux.sock attach -t ircsession

Use the name and command copied from your panel. A plain tmux attach can look for a different socket and miss the portal-managed session.

Troubleshooting

What you seeWhat to do
Python is unavailableCheck your plan and ask staff if your intended work needs additional permission.
Module not foundInstall the dependency in the selected environment and inspect its installation output.
Script exits immediatelyRead logs. A short script may have completed normally.
No tmux session foundCheck selected shell, session name and the dedicated socket in the copied command.

Read this topic in the wiki ↗ · Documentation hub ↗

Reference and help

Checked against the current customer-panel implementation and DWShells signup and rules. For assigned values and eligibility, use your dashboard. Need help? Join #DWShells on DarkWorld IRC or contact staff. Do not send credentials.

CONTINUE LEARNINGProtect your account and important files →