Hi, and HNY
I search to compile a python script (.py => .pyo) but the result is not good
In fact I use : python -O -m compileall basedonne.py result : basedonne.pyo, but it's not good for pyext
I have tested with simple.py for example, but it's the same result, my simple.pyo is not good
I don't know where is my problem ? it's not pyext, because I have a good python script I think that it's my compilation
best regards
p
Hi Philippe, what means "it is not good" exactly? That it doesn't work? My main question would be what you expect from the "compilation" to .pyo. It's not a compilation to machine code as e.g. with C languages but rather a mere translation to bytecode. It doesn't bring any speedups for execution, just a tiny bit (negligible i would say) when loading the script. all the best, Thomas
2014/1/6 Philippe Boisnard philemon1@mac.com
Hi, and HNY
I search to compile a python script (.py => .pyo) but the result is not good
In fact I use : python -O -m compileall basedonne.py result : basedonne.pyo, but it's not good for pyext
I have tested with simple.py for example, but it's the same result, my simple.pyo is not good
I don't know where is my problem ? it's not pyext, because I have a good python script I think that it's my compilation
best regards
p
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi
I have understood, that for pyext, compilation is made by pyext itself but I have a problem my script doesn't seem good
try: import pyext except: print "ERROR: This script must be loaded by the PD/Max pyext external"
class basededonne(pyext._class):
# number of inlets and outlets
_inlets=1
_outlets=1
# methods for all inlets index=0 fichier="empty"
def symbol_1(self,fich):
chaines=str(fich)
self.fichier = open("/Applications/puredata/67-vazulkaNew/Vazulka_Janvier_4/basedonnee.txt",'r')
for ligne in self.fichier:
for chaine in self.chaines:
if chaine in ligne:
self._outlet(ligne)
my version of pyext and python
py/pyext 0.2.2 - python script objects (C)2002-2011 Thomas Grill - http://grrrr.org/ext
using Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
best regards
philippe
Le 6 janv. 2014 à 22:18, Thomas Grill a écrit :
Hi Philippe, what means "it is not good" exactly? That it doesn't work? My main question would be what you expect from the "compilation" to .pyo. It's not a compilation to machine code as e.g. with C languages but rather a mere translation to bytecode. It doesn't bring any speedups for execution, just a tiny bit (negligible i would say) when loading the script. all the best, Thomas
2014/1/6 Philippe Boisnard philemon1@mac.com Hi, and HNY
I search to compile a python script (.py => .pyo) but the result is not good
In fact I use : python -O -m compileall basedonne.py result : basedonne.pyo, but it's not good for pyext
I have tested with simple.py for example, but it's the same result, my simple.pyo is not good
I don't know where is my problem ? it's not pyext, because I have a good python script I think that it's my compilation
best regards
p
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Thomas Grill http://grrrr.org
Hi Philippe, it's impossible to give you qualified feedback on your report. You don't specify what exactly the problem is - are there error outputs? Why do you know that something "is not good"... this you should tell me. Besides, a Python script is dependent on proper indentation. It seems that the symbol_1 function is not indented relative to the class, but it's not possible to be really sure with pasted code. You should attach the script file along with all console output that makes you think that there is a problem. gr~~~
2014/1/7 Philippe Boisnard philemon1@mac.com
Hi
I have understood, that for pyext, compilation is made by pyext itself but I have a problem my script doesn't seem good
try: import pyext except: print "ERROR: This script must be loaded by the PD/Max pyext external"
class basededonne(pyext._class):
# number of inlets and outlets _inlets=1 _outlets=1
# methods for all inlets index=0 fichier="empty"
def symbol_1(self,fich): chaines=str(fich) self.fichier = open("/Applications/puredata/67-vazulkaNew/Vazulka_Janvier_4/basedonnee.txt",'r') for ligne in self.fichier: for chaine in self.chaines: if chaine in ligne: self._outlet(ligne)
my version of pyext and python
py/pyext 0.2.2 - python script objects (C)2002-2011 Thomas Grill - http://grrrr.org/ext
using Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)]
Python array support enabled
best regards
philippe
Le 6 janv. 2014 à 22:18, Thomas Grill a écrit :
Hi Philippe, what means "it is not good" exactly? That it doesn't work? My main question would be what you expect from the "compilation" to .pyo. It's not a compilation to machine code as e.g. with C languages but rather a mere translation to bytecode. It doesn't bring any speedups for execution, just a tiny bit (negligible i would say) when loading the script. all the best, Thomas
2014/1/6 Philippe Boisnard philemon1@mac.com
Hi, and HNY
I search to compile a python script (.py => .pyo) but the result is not good
In fact I use : python -O -m compileall basedonne.py result : basedonne.pyo, but it's not good for pyext
I have tested with simple.py for example, but it's the same result, my simple.pyo is not good
I don't know where is my problem ? it's not pyext, because I have a good python script I think that it's my compilation
best regards
p
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Thomas Grill http://grrrr.org