I want to know abspath of python script followed by steps below.
1. *built it to byte code by py_compile.*
2. *execute it to check abspath.*
But I got *2 results* when I execute it.I found the *results based on the
path of script* followed by py_compile.
Here is my script test.py :
import osimport inspect
Build it with py_compile, then got 2 results when I enter *different path
*enter the folder and compile with only script name.*
[~]cd /usr/local/bin/[/usr/local/bin/]python -m py_compile
*In other folder and compile with absolute script name.*
[~]python -m py_compile /usr/local/bin/test.py[~]python
how come got 2 different results?