how r u compiling your script. May be there lies a problem?
I tried this compile.py script
- !#/usr/bin/env python
-
import py_compile
-
py_compile.compile("MyScript.py")
and than changed the permission and it worked
Yeah that how I did it, just from a console though I didn't write a script to do it.
I do $ python
>>> import py_compile
>>> py_compile.compile('libhmi_sys.py')
Then I chmod +x libhmi_sys.pyc
then I try and run it with ./libhmi_sys.pyc
and get:
-
root@tilsan1-hmi:/opt/tilsan/hmi# ./libhmi_sys.pyc
-
: command not foundine 1:
-
./libhmi_sys.pyc: line 2: {+Fc: command not found
-
./libhmi_sys.pyc: line 3: dZ
-
Z
-
d: command not found
-
./libhmi_sys.pyc: line 4: syntax error near unexpected token `('
-
./libhmi_sys.pyc: line 4: `Zd
-
jo;eiie Zedjoeie nend
-
djo1eideendjp eideiie Zedjoeie neiie joeid
-
Zeidedjo4djo
-
ndjo e
-
eqqedjoreideide
-
dZeiie
-
ZedjoAedjo4djo
-
ndjo e
-
eqqedjowedjojeide
-
eide eideiie Zedjoeie neqedjoYeideideiie Zedjoeie neqqnedS(iNt:iis/opt/tilsan/hmi/tmp/extInput.jss/opt/tilsan/hmi/hmi_db/s /media/TILSAN-USB/4roller-backups /dev/sdb1cCs
-
tidttidtidttidtittidtdtidtidttd tidtid'
-
^[[?1;2c^[[?1;2croot@tilsan1-hmi:/opt/tilsan/hmi# 1;2c1;2c
-
bash: 1: command not found
-
bash: 2c1: command not found
-
bash: 2c: command not found
-
Does that mean anything to you's guys?
Like I said, on my workstation doing the exact same routine it all works fine :(