Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96902
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Subject | Re: Postscript to pdf |
| References | (4 earlier) <CAKSfFmhqTWzem6aW+3KOxKTo4C35JdmoRv=BrkSu8+Hruz3WmA@mail.gmail.com> <201509201909.t8KJ93oU018314@fido.openend.se> <CAKSfFmiThEyW8B=ni8NA1FGY1aC2sU3L1CApgy1oA6A8+MKQvQ@mail.gmail.com> <201509201952.t8KJqh7W029272@fido.openend.se> <CAKSfFmiV7pqRk4f0y28Vq3z-5pQb6Vs+J1TotR4CShKwk5GecQ@mail.gmail.com> |
| Date | 2015-09-21 00:50 +0200 |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11.1442789426.28679.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Postscript to pdf Bala Ji <baladjy@gmail.com> - 2015-09-20 09:20 -0700
Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 18:40 +0200
Re: Postscript to pdf Bala Ji <baladjy@gmail.com> - 2015-09-20 09:50 -0700
Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 20:12 +0200
Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 21:09 +0200
Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 20:27 +0200
Re: Postscript to pdf Christian Gollwitzer <auriocus@gmx.de> - 2015-09-21 15:39 +0200
Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 21:32 +0200
Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-20 21:52 +0200
Re: Postscript to pdf Laura Creighton <lac@openend.se> - 2015-09-21 00:50 +0200
Re: Postscript to pdf Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-20 20:25 -0400
Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-20 23:11 +0200
Re: Postscript to pdf Nobody <nobody@nowhere.invalid> - 2015-09-21 13:56 +0100
Re: Postscript to pdf Baladjy KICHENASSAMY <baladjy@gmail.com> - 2015-09-21 17:20 +0200
Re: Postscript to pdf Christian Gollwitzer <auriocus@gmx.de> - 2015-09-23 08:40 +0200
Re: Postscript to pdf mithra <curtis.rendon@gmail.com> - 2015-09-23 17:01 -0700
Re: Postscript to pdf Terry Reedy <tjreedy@udel.edu> - 2015-09-21 00:17 -0400
csiph-web