Sunday, 11. December 2005 02:04.
Executing the frozen runpy.exe (using as example timtools runpy syncspz.py) failed:
Traceback (most recent call last): File "runpy.py", line 49, in ? File "lino\console\application.pyo", line 238, in main File "runpy.py", line 43, in run File "syncspz.py", line 2, in ? from lino.scripts.sync import SyncJob ImportError: No module named sync
Explanation: py2exe does not store the scripts themselves in the library.zip. And this is okay. So I created a new module lino.apps.synchronizer containing the Synchronizer class. The modules in lino.scripts should contain only the wrapper logic to convert command-line options to arguments.
Here is the new version of the first runpy script:
from lino.console import syscon from lino.apps.timtools.synchronizer import Synchronizer job=Synchronizer() job.addProject(r"c:\tim\stvith", r"x:\tim\stvith") job.addProject(r"x:\tim\dlm", r"c:\tim\dlm") job.addProject(r"x:\tim\localdlm", r"c:\tim\localdlm") job.addProject(r"x:\tim", r"c:\tim") syscon.run(job.run)
Refering articles:
- New TIM Tool "runpy.exe" (09.12.05) — runpy.exe just executes the specified Python scripts. This is just another method to avoid having to install Python and Lino. more