Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'canvas': 0.07; 'filename': 0.07; 'meeting.': 0.07; 'cc:addr:python-list': 0.09; 'english)': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'argument': 0.15; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'cc:name:laura creighton': 0.16; 'dialog.': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'subprocess': 0.16; 'app': 0.16; 'laura': 0.18; 'linux,': 0.18; 'windows': 0.20; '2015': 0.20; 'cc:addr:python.org': 0.20; 'cc:2**2': 0.20; 'button,': 0.22; 'sep': 0.22; 'tkinter': 0.22; 'code.': 0.23; 'bit': 0.23; 'slightly': 0.23; 'tried': 0.24; 'written': 0.24; "i've": 0.25; "doesn't": 0.26; '(which': 0.26; 'question': 0.27; '+0200,': 0.27; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'push': 0.30; 'somebody': 0.30; 'getting': 0.33; 'run': 0.33; 'problem': 0.33; 'curious': 0.33; 'file': 0.34; 'next': 0.35; 'done': 0.35; 'dir': 0.35; 'skip:> 10': 0.35; "isn't": 0.35; 'but': 0.36; '(and': 0.36; 'subject:: ': 0.37; 'pdf': 0.37; 'charset:us-ascii': 0.37; 'building': 0.38; "didn't": 0.39; 'takes': 0.39; 'save': 0.60; 'your': 0.60; 'header:Message- Id:1': 0.61; 'real': 0.62; 'back': 0.62; 'needing': 0.63; 'more': 0.63; 'different': 0.63; 'great': 0.63; 'between': 0.65; 'here': 0.66; '>def': 0.84; 'header:In-reply-to:1': 0.84; 'lying': 0.84; 'ok?': 0.84; 'working,': 0.84; 'period.': 0.95 To: Baladjy KICHENASSAMY cc: Laura Creighton , python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Postscript to pdf In-reply-to: References: <201509201812.t8KICXHu004041@fido.openend.se> <201509201909.t8KJ93oU018314@fido.openend.se> <201509201952.t8KJqh7W029272@fido.openend.se> Comments: In-reply-to Baladjy KICHENASSAMY message dated "Sun, 20 Sep 2015 23:11:20 +0200." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9294.1442789412.1@fido> Date: Mon, 21 Sep 2015 00:50:12 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Mon, 21 Sep 2015 00:50:13 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442789426 news.xs4all.nl 23743 [2001:888:2000:d::a6]:43683 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96902 In a message of Sun, 20 Sep 2015 23:11:20 +0200, Baladjy KICHENASSAMY writes: >well one more question :/ > >i tried this > >def save(): > Canevas.update() > Canevas.postscript(file=tkFileDialog.asksaveasfilename(), >colormode='color') > subprocess.call(["ps2pdf", "-dEPSCrop", "test.ps", "test.pdf"]) > > >i got the ps file but i didn't get the pdf file :/ It's 00:41 here in Sweden, and I have an 08:00 meeting. I am off to bed. Perhaps somebody else can help now, otherwise I will be back tomorrow. I've never tried to get subprocess to run as part of a savefile dialog. Try building a tkinter app that takes a filename argument (somepostscript file you have lying around) and then push the button, in the same dir makes a pdf of your ps using subprocess. If that works, then see about getting save to run that subprocess as part of the save process. I am very curious about whether that can be done -- but first check that your subprocess is working, period. The wretched thing is slightly different between windows and linux, and even between different linuxes, so needing to fiddle a bit here is normal (and frustrating). So right now I cannot tell if your problem is 'save doesn't like it like that' or 'your subprocess isn't working'. But nothing in Tkinter likes 'Canevas' -- (which is great French but rotten English) you must have written Canvas in your code. Paste the real thing in next time, ok? Sorry I am off now, Laura