From dddce3148a2bc785603576b18ffcf72d39adbe47 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Apr 2010 23:59:33 +0000 Subject: asy 1.93 git-svn-id: svn://tug.org/texlive/trunk@17934 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/asymptote/GUI/xasy2asy.py | 4 ++-- Build/source/utils/asymptote/GUI/xasyMainWin.py | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'Build/source/utils/asymptote/GUI') 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()) -- cgit v1.2.3