summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/GUI
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
committerKarl Berry <karl@freefriends.org>2010-04-19 23:59:33 +0000
commitdddce3148a2bc785603576b18ffcf72d39adbe47 (patch)
tree14f4c79ef11bcf0820a8d4ff2ab0c5ac009c365c /Build/source/utils/asymptote/GUI
parenta01e51b01f5819b6091af48cdca581e9f2a9282e (diff)
asy 1.93
git-svn-id: svn://tug.org/texlive/trunk@17934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/GUI')
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasy2asy.py4
-rwxr-xr-xBuild/source/utils/asymptote/GUI/xasyMainWin.py9
2 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/GUI/xasy2asy.py b/Build/source/utils/asymptote/GUI/xasy2asy.py
index 99a747cccda..a86a1e732d1 100755
--- a/Build/source/utils/asymptote/GUI/xasy2asy.py
+++ b/Build/source/utils/asymptote/GUI/xasy2asy.py
@@ -54,8 +54,8 @@ def startQuickAsy():
AsyTempDir=mkdtemp(prefix="asy_", dir="./")
else:
AsyTempDir=mkdtemp(prefix="asy_")+os.sep
- quickAsy = Popen([xasyOptions.options['asyPath']]+
- split("-noV -multiline -interactive -o"+AsyTempDir),
+ quickAsy = Popen([xasyOptions.options['asyPath'],"-noV","-multiline",
+ "-interactive","-o"+AsyTempDir],
stdin=PIPE,stdout=PIPE,stderr=STDOUT)
if quickAsy.returncode != None:
quickAsyFailed = True
diff --git a/Build/source/utils/asymptote/GUI/xasyMainWin.py b/Build/source/utils/asymptote/GUI/xasyMainWin.py
index 0a1ddc63e36..95dd4fb7cbc 100755
--- a/Build/source/utils/asymptote/GUI/xasyMainWin.py
+++ b/Build/source/utils/asymptote/GUI/xasyMainWin.py
@@ -144,6 +144,7 @@ class xasyMainWin:
self.exportMenu.add_command(label="PDF...",command=self.exportPDF,underline=0)
self.exportMenu.add_command(label="GIF...",command=self.exportGIF,underline=0)
self.exportMenu.add_command(label="PNG...",command=self.exportPNG,underline=1)
+ self.exportMenu.add_command(label="SVG...",command=self.exportSVG,underline=0)
self.fileMenu.add_cascade(label="Export",menu=self.exportMenu,underline=1)
self.fileMenu.add_separator()
@@ -720,6 +721,9 @@ class xasyMainWin:
def exportPNG(self):
self.exportFile(self.filename,"png")
+ def exportSVG(self):
+ self.exportFile(self.filename,"svg")
+
def exportFile(self,inFile, outFormat):
if(not self.testOrAcquireLock()):
return
@@ -743,9 +747,8 @@ class xasyMainWin:
return
fullname = os.path.abspath(outfilename)
outName = os.path.basename(outfilename)
- dirname = os.path.dirname(fullname)
- command = xasyOptions.options['asyPath']+" -f %s -o %s %s"%(outFormat,fullname,inFile)
- saver = subprocess.Popen(split(command),stdin=PIPE,stdout=PIPE,stderr=PIPE)
+ command=[xasyOptions.options['asyPath'],"-f"+outFormat,"-o"+fullname,inFile]
+ saver = subprocess.Popen(command,stdin=PIPE,stdout=PIPE,stderr=PIPE)
saver.wait()
if saver.returncode != 0:
tkMessageBox.showerror("Export Error","Export Error:\n"+saver.stdout.read()+saver.stderr.read())