Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: Aladin on April 01, 2020, 08:55:08 AM
-
I want to convert .py file to .exe and install it in the sd card and run it
Can someone help me
-
You don't usually have .exe files in Linux.
-
How can you make a Python script executable on Unix?
Put #! / Usr / bin / env python in the first line of your .py script.
Add execute permissions to the file (using chmod).
Run the script from the command line, for example. by providing ./my_script.py in the same directory.
Is this ok ?
-
Hi Aladin
How can you make a Python script executable on Unix? ...
How you ask your question is important. Your initial questions sounded like you were trying to mix Linux and Windows programs.
Place this as the first line in your script:
#!/usr/bin/env python
Set file permissions:
chmod 775 MyScript.py
Execute script:
./MyScript.py
-
You may need /usr/bin/env python3 if using the python3.6 extension.