-4

I want to to know how to make runnable Python program in Linux. It will pack all library is necessary into 1 file to run on any Linux machine.

Thank for reading and looking forward to answering

Pravitha V
  • 3,308
  • 4
  • 33
  • 51
Thân Hoàng
  • 166
  • 1
  • 8

1 Answers1

-1

Linux machines will all have Python 2.5 at least installed.

Start the file with a shebang:

#!/usr/bin/python

Make it executable:

$ chmod +x filename.py

Then you can run it with the command:

$./filename.py
Ben Quigley
  • 727
  • 4
  • 18