Re: Lyx on Windows: ps2eps missing?
Op 7-5-2012 15:29, Klaus-Dieter Bauer schreef: Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error Unable to Convert to Loadable Format. You didn't mention which version of LyX you have installed. There was a bug in the version of ImageMagick that was included in the LyX installer. This bug prevented pdf images to be previewed. The latest LyX installer has a newer version of ImageMagick that fixes this. 3. Would ps2eps be included if I had chosen the combined LyX/MiKTeX installer? CTAN says, that it is not part of MiKTeX ( http://www.ctan.org/pkg/ps2eps ). 3a. If yes, is there anywhere any indication that the combined installer should be preferred? No, it should be ok to install MikTex separately. I don't have ps2eps as well, so that is not the problem. Vincent
Re: Lyx on Windows: ps2eps missing?
2012/5/10 Vincent van Ravesteijn v...@lyx.org: Op 7-5-2012 15:29, Klaus-Dieter Bauer schreef: Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error Unable to Convert to Loadable Format. You didn't mention which version of LyX you have installed. There was a bug in the version of ImageMagick that was included in the LyX installer. This bug prevented pdf images to be previewed. The latest LyX installer has a newer version of ImageMagick that fixes this. [...] Vincent Ah sorry, that LyX Version number was lost during editing the email. LyX was installed using the installer LyX-2.0.3-1-Installer.exe, which should be the latest one. Anyway, the problem did not seem Image-Magick related to me. Switching to using convert.exe for PDF-PNG conversion fixed the problem after all. It was the default converter, that did not work -- and that uses ps2eps in an intermediate step, which should be related to the LaTeX distribution rather than Image Magick. Your answer seems to indicate, that LyX is meant to use Image Magick for PDF previewing by default though. Deleting my local LyX settings and running reconfigure didn't solve the problem, so it SHOULD not be a problem with my local settings. Just to be sure, I found a work-around, as said before. So my interest in that behaviour is more or less academic right now. :-) kind regards, Klaus-Dieter
Re: Lyx on Windows: ps2eps missing?
Ah sorry, that LyX Version number was lost during editing the email. LyX was installed using the installer LyX-2.0.3-1-Installer.exe, which should be the latest one. There is a newer installer which fixes a security issue in the same ImageMagick library. Anyway, the problem did not seem Image-Magick related to me. Switching to using convert.exe for PDF-PNG conversion fixed the problem after all. It was the default converter, that did not work -- and that uses ps2eps in an intermediate step, which should be related to the LaTeX distribution rather than Image Magick. Your answer seems to indicate, that LyX is meant to use Image Magick for PDF previewing by default though. The default should use the script Resources\convertDefault.py which indeed should use ImageMagick's convert.exe. I'm not sure which step goes wrong for you. Vincent
Re: Lyx on Windows: ps2eps missing?
Op 7-5-2012 15:29, Klaus-Dieter Bauer schreef: Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error Unable to Convert to Loadable Format. You didn't mention which version of LyX you have installed. There was a bug in the version of ImageMagick that was included in the LyX installer. This bug prevented pdf images to be previewed. The latest LyX installer has a newer version of ImageMagick that fixes this. 3. Would ps2eps be included if I had chosen the combined LyX/MiKTeX installer? CTAN says, that it is not part of MiKTeX ( http://www.ctan.org/pkg/ps2eps ). 3a. If yes, is there anywhere any indication that the combined installer should be preferred? No, it should be ok to install MikTex separately. I don't have ps2eps as well, so that is not the problem. Vincent
Re: Lyx on Windows: ps2eps missing?
2012/5/10 Vincent van Ravesteijn v...@lyx.org: Op 7-5-2012 15:29, Klaus-Dieter Bauer schreef: Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error Unable to Convert to Loadable Format. You didn't mention which version of LyX you have installed. There was a bug in the version of ImageMagick that was included in the LyX installer. This bug prevented pdf images to be previewed. The latest LyX installer has a newer version of ImageMagick that fixes this. [...] Vincent Ah sorry, that LyX Version number was lost during editing the email. LyX was installed using the installer LyX-2.0.3-1-Installer.exe, which should be the latest one. Anyway, the problem did not seem Image-Magick related to me. Switching to using convert.exe for PDF-PNG conversion fixed the problem after all. It was the default converter, that did not work -- and that uses ps2eps in an intermediate step, which should be related to the LaTeX distribution rather than Image Magick. Your answer seems to indicate, that LyX is meant to use Image Magick for PDF previewing by default though. Deleting my local LyX settings and running reconfigure didn't solve the problem, so it SHOULD not be a problem with my local settings. Just to be sure, I found a work-around, as said before. So my interest in that behaviour is more or less academic right now. :-) kind regards, Klaus-Dieter
Re: Lyx on Windows: ps2eps missing?
Ah sorry, that LyX Version number was lost during editing the email. LyX was installed using the installer LyX-2.0.3-1-Installer.exe, which should be the latest one. There is a newer installer which fixes a security issue in the same ImageMagick library. Anyway, the problem did not seem Image-Magick related to me. Switching to using convert.exe for PDF-PNG conversion fixed the problem after all. It was the default converter, that did not work -- and that uses ps2eps in an intermediate step, which should be related to the LaTeX distribution rather than Image Magick. Your answer seems to indicate, that LyX is meant to use Image Magick for PDF previewing by default though. The default should use the script Resources\convertDefault.py which indeed should use ImageMagick's convert.exe. I'm not sure which step goes wrong for you. Vincent
Re: Lyx on Windows: ps2eps missing?
Op 7-5-2012 15:29, Klaus-Dieter Bauer schreef: Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error "Unable to Convert to Loadable Format". You didn't mention which version of LyX you have installed. There was a bug in the version of ImageMagick that was included in the LyX installer. This bug prevented pdf images to be previewed. The latest LyX installer has a newer version of ImageMagick that fixes this. 3. Would ps2eps be included if I had chosen the combined LyX/MiKTeX installer? CTAN says, that it is not part of MiKTeX ( http://www.ctan.org/pkg/ps2eps ). 3a. If yes, is there anywhere any indication that the combined installer should be preferred? No, it should be ok to install MikTex separately. I don't have ps2eps as well, so that is not the problem. Vincent
Re: Lyx on Windows: ps2eps missing?
2012/5/10 Vincent van Ravesteijn: > Op 7-5-2012 15:29, Klaus-Dieter Bauer schreef: > >> Hello! >> >> I stumbled into problems previewing PDF graphics inside LyX. It would >> give me the error "Unable to Convert to Loadable Format". > > You didn't mention which version of LyX you have installed. There was a bug > in the version of ImageMagick that was included in the LyX installer. This > bug prevented pdf images to be previewed. The latest LyX installer has a > newer version of ImageMagick that fixes this. > [...] > Vincent Ah sorry, that LyX Version number was lost during editing the email. LyX was installed using the installer "LyX-2.0.3-1-Installer.exe", which should be the latest one. Anyway, the problem did not seem Image-Magick related to me. Switching to using "convert.exe" for PDF->PNG conversion fixed the problem after all. It was the default converter, that did not work -- and that uses ps2eps in an intermediate step, which should be related to the LaTeX distribution rather than Image Magick. Your answer seems to indicate, that LyX is meant to use Image Magick for PDF previewing by default though. Deleting my local LyX settings and running "reconfigure" didn't solve the problem, so it SHOULD not be a problem with my local settings. Just to be sure, I found a work-around, as said before. So my interest in that behaviour is more or less academic right now. :-) kind regards, Klaus-Dieter
Re: Lyx on Windows: ps2eps missing?
Ah sorry, that LyX Version number was lost during editing the email. LyX was installed using the installer "LyX-2.0.3-1-Installer.exe", which should be the latest one. There is a newer installer which fixes a security issue in the same ImageMagick library. Anyway, the problem did not seem Image-Magick related to me. Switching to using "convert.exe" for PDF->PNG conversion fixed the problem after all. It was the default converter, that did not work -- and that uses ps2eps in an intermediate step, which should be related to the LaTeX distribution rather than Image Magick. Your answer seems to indicate, that LyX is meant to use Image Magick for PDF previewing by default though. The default should use the script "Resources\convertDefault.py" which indeed should use ImageMagick's convert.exe. I'm not sure which step goes wrong for you. Vincent
Lyx on Windows: ps2eps missing?
Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error Unable to Convert to Loadable Format. That got me some hits on Google, but the hits typically were from 2003, the issue being about EPS files. I investigated the message log, with only Graphics conversion and loading enabled (full file see attachment). I found that the conversion takes a very roundabout way, converting the PDF to PS, than the PS to EPS and then EPS to PNG. On examining the temporary directory, I found several PS files (and some subdirectories unrelated to the image conversion), but no EPS or PNG files. And indeed I found out that my system doesn't have a ps2eps script on any of the PATH prefix folders. It has ps2epsi though in MiKTeX! My solution was to add a custom converter for PDF PNG, simply using LyX's own Image Magick convert.exe: convert -density 96 pdf:$$i png:$$o However, I'm now wondering... 1. Did I just overlook posts describing a solution? 2. Why does the default converter go such a roundabout way, when most file formats work well with convert.exe directly? 3. Would ps2eps be included if I had chosen the combined LyX/MiKTeX installer? CTAN says, that it is not part of MiKTeX ( http://www.ctan.org/pkg/ps2eps ). 3a. If yes, is there anywhere any indication that the combined installer should be preferred? kind regards, Klaus-Dieter Platform Information: - Windows 7 - MiKTeX 2.9, installed separately. Should be the newest version, so not having ps2eps is surprising to me. - Cygwin installed, but only /bin on the windows PATH. 13:54:40.281: (graphics-reload)C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(408): Converting it to format. C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\support\FileName.cpp(945): Recognised Fileformat: pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf with displayed filename: E:\studium\diplomarbeit\labbook\3.Lyx\images\fe-100-s5-100gb-supercellsize-convergence.pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\support\FileName.cpp(945): Recognised Fileformat: pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(385): The file contains pdf format data. C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to bmp C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to pbm C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to pgm C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(127): Converter c-tor: from_file: E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf to_file_base: C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/CacheItem.PJ3672 from_format: pdf to_format:png C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(264): build_script ... C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(376): ready! C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(142): Conversion script: -- #!/usr/bin/env python # -*- coding: utf-8 -*- import os, shutil, sys def unlinkNoThrow(file): ''' remove a file, do not throw if an error occurs ''' try: os.unlink(file) except: pass infile = E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf outfile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.pdf shutil.copy(infile, outfile) os.chdir(C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/) infile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.pdf infile_base = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672 outfile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.ps outdir = os.path.dirname(outfile) if os.system(r'pdf2ps ' + '' + infile + '' + ' ' + '' + outfile + '' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) unlinkNoThrow(infile) infile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.ps infile_base = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672 outfile =
Lyx on Windows: ps2eps missing?
Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error Unable to Convert to Loadable Format. That got me some hits on Google, but the hits typically were from 2003, the issue being about EPS files. I investigated the message log, with only Graphics conversion and loading enabled (full file see attachment). I found that the conversion takes a very roundabout way, converting the PDF to PS, than the PS to EPS and then EPS to PNG. On examining the temporary directory, I found several PS files (and some subdirectories unrelated to the image conversion), but no EPS or PNG files. And indeed I found out that my system doesn't have a ps2eps script on any of the PATH prefix folders. It has ps2epsi though in MiKTeX! My solution was to add a custom converter for PDF PNG, simply using LyX's own Image Magick convert.exe: convert -density 96 pdf:$$i png:$$o However, I'm now wondering... 1. Did I just overlook posts describing a solution? 2. Why does the default converter go such a roundabout way, when most file formats work well with convert.exe directly? 3. Would ps2eps be included if I had chosen the combined LyX/MiKTeX installer? CTAN says, that it is not part of MiKTeX ( http://www.ctan.org/pkg/ps2eps ). 3a. If yes, is there anywhere any indication that the combined installer should be preferred? kind regards, Klaus-Dieter Platform Information: - Windows 7 - MiKTeX 2.9, installed separately. Should be the newest version, so not having ps2eps is surprising to me. - Cygwin installed, but only /bin on the windows PATH. 13:54:40.281: (graphics-reload)C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(408): Converting it to format. C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\support\FileName.cpp(945): Recognised Fileformat: pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf with displayed filename: E:\studium\diplomarbeit\labbook\3.Lyx\images\fe-100-s5-100gb-supercellsize-convergence.pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\support\FileName.cpp(945): Recognised Fileformat: pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(385): The file contains pdf format data. C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to bmp C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to pbm C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to pgm C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(127): Converter c-tor: from_file: E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf to_file_base: C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/CacheItem.PJ3672 from_format: pdf to_format:png C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(264): build_script ... C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(376): ready! C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(142): Conversion script: -- #!/usr/bin/env python # -*- coding: utf-8 -*- import os, shutil, sys def unlinkNoThrow(file): ''' remove a file, do not throw if an error occurs ''' try: os.unlink(file) except: pass infile = E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf outfile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.pdf shutil.copy(infile, outfile) os.chdir(C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/) infile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.pdf infile_base = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672 outfile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.ps outdir = os.path.dirname(outfile) if os.system(r'pdf2ps ' + '' + infile + '' + ' ' + '' + outfile + '' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) unlinkNoThrow(infile) infile = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.ps infile_base = C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672 outfile =
Lyx on Windows: ps2eps missing?
Hello! I stumbled into problems previewing PDF graphics inside LyX. It would give me the error "Unable to Convert to Loadable Format". That got me some hits on Google, but the hits typically were from 2003, the issue being about EPS files. I investigated the message log, with only "Graphics conversion and loading" enabled (full file see attachment). I found that the conversion takes a very roundabout way, converting the PDF to PS, than the PS to EPS and then EPS to PNG. On examining the temporary directory, I found several PS files (and some subdirectories unrelated to the image conversion), but no EPS or PNG files. And indeed I found out that my system doesn't have a "ps2eps" script on any of the "PATH prefix" folders. It has "ps2epsi" though in MiKTeX! My solution was to add a custom converter for PDF > PNG, simply using LyX's own Image Magick "convert.exe": convert -density 96 pdf:$$i png:$$o However, I'm now wondering... 1. Did I just overlook posts describing a solution? 2. Why does the default converter go such a roundabout way, when most file formats work well with convert.exe directly? 3. Would ps2eps be included if I had chosen the combined LyX/MiKTeX installer? CTAN says, that it is not part of MiKTeX ( http://www.ctan.org/pkg/ps2eps ). 3a. If yes, is there anywhere any indication that the combined installer should be preferred? kind regards, Klaus-Dieter Platform Information: - Windows 7 - MiKTeX 2.9, installed separately. Should be the newest version, so not having ps2eps is surprising to me. - Cygwin installed, but only "/bin" on the windows PATH. 13:54:40.281: (graphics-reload)C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(408): Converting it to format. C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\support\FileName.cpp(945): Recognised Fileformat: pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(378): [CacheItem::Impl::convertToDisplayFormat] Attempting to convert image file: E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf with displayed filename: E:\studium\diplomarbeit\labbook\3.Lyx\images\fe-100-s5-100gb-supercellsize-convergence.pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\support\FileName.cpp(945): Recognised Fileformat: pdf C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(385): The file contains pdf format data. C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to bmp C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to pbm C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsCacheItem.cpp(340): Unable to convert from pdf to pgm C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(127): Converter c-tor: from_file: E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf to_file_base: C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/CacheItem.PJ3672 from_format: pdf to_format:png C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(264): build_script ... C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(376): ready! C:\Users\Vincent\Documents\LyX\source\lyx-svn-branch\src\graphics\GraphicsConverter.cpp(142): Conversion script: -- #!/usr/bin/env python # -*- coding: utf-8 -*- import os, shutil, sys def unlinkNoThrow(file): ''' remove a file, do not throw if an error occurs ''' try: os.unlink(file) except: pass infile = "E:/studium/diplomarbeit/labbook/3.Lyx/images/fe-100-s5-100gb-supercellsize-convergence.pdf" outfile = "C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.pdf" shutil.copy(infile, outfile) os.chdir("C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/") infile = "C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.pdf" infile_base = "C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672" outfile = "C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.ps" outdir = os.path.dirname(outfile) if os.system(r'pdf2ps ' + '"' + infile + '"' + ' ' + '"' + outfile + '"' + '') != 0: unlinkNoThrow(outfile) sys.exit(1) if not os.path.isfile(outfile): if os.path.isfile(outfile + '.0'): os.rename(outfile + '.0', outfile) import glob for file in glob.glob(outfile + '.?'): unlinkNoThrow(file) else: sys.exit(1) unlinkNoThrow(infile) infile = "C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672.ps" infile_base = "C:/Users/klaus/AppData/Local/Temp/lyx_tmpdir.Hp3672/gconvert6.ER3672" outfile =