Mercurial > MadButterfly
comparison inkscape/firefox/helper_mb.py @ 353:3d03451be435
Import the file specified in the mozplugger helper. This is the first step to handle the same file between inkscape and helper
author | wycc |
---|---|
date | Mon, 09 Mar 2009 01:28:56 +0800 |
parents | 63aaf96209cd |
children | 50d33c3987ba |
comparison
equal
deleted
inserted
replaced
352:4350aa369149 | 353:3d03451be435 |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 from twisted.web import server, resource,soap | 2 from twisted.web import server, resource,soap |
3 from twisted.internet import reactor,defer | 3 from twisted.internet import reactor,defer |
4 import os,time | 4 import os,time,sys |
5 import traceback | 5 import traceback |
6 | 6 |
7 | 7 |
8 | 8 |
9 | 9 |
143 except: | 143 except: |
144 traceback.print_exc() | 144 traceback.print_exc() |
145 | 145 |
146 pid = os.fork() | 146 pid = os.fork() |
147 if pid==0: | 147 if pid==0: |
148 os.execvp("inkscape-mb",["inkscape-mb","/tmp/scene.mbsvg"]) | 148 os.execvp("inkscape-mb",["inkscape-mb",sys.argv[1]]) |
149 s = Server() | 149 s = Server() |
150 s.client = None | 150 s.client = None |
151 s.pid = pid | 151 s.pid = pid |
152 site = server.Site(s) | 152 site = server.Site(s) |
153 # Sleep for two seconds to wait for the inkscape become ready. It seems that our inkscape modification has | 153 # Sleep for two seconds to wait for the inkscape become ready. It seems that our inkscape modification has |