Can anyone help me with the process of making an executable python script in Unix?

Recommended Answers

All 4 Replies

You didn't reveal which Unix. Also you didn't tell if you researched this question. That said I'd find out which Unix I'm running and then look to see if there is a Python for that Unix. After Python is installed then you run it just like the millions of other Linux machines so I'll now write about that.

This is the general answer for this query-
For this to happen, two conditions must be met:

  1. The script file’s mode must be executable
  2. The first line must begin with a hash(#). An example of this will be: #!/usr/local/bin/python

chmod u=rwx,g=rx,o=r myfile

"This example uses symbolic permissions notation. The letters u, g, and o stand for "user", "group", and "other". The equals sign ("=") means "set the permissions exactly like this," and the letters "r", "w", and "x" stand for "read", "write", and "execute", respectively. The commas separate the different classes of permissions, and there are no spaces in between them"  From
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.