Skip to content

Instantly share code, notes, and snippets.

@anbara
Last active June 4, 2017 10:24
Show Gist options
  • Save anbara/880095fb8dde7e518c42267216600f8a to your computer and use it in GitHub Desktop.
Save anbara/880095fb8dde7e518c42267216600f8a to your computer and use it in GitHub Desktop.
# Convert PRN to EPS script by ps2epsi
from subprocess import Popen
import os
import sys
if __name__ == '__main__':
# Get full path
path = os.path.dirname(sys.argv[0])
# Make ps path
file = os.listdir(path+'/ps/')
# Do ps2epsi
for num in range(len(file)):
name, ext = os.path.splitext(file[num])
cmd = 'ps2epsi ' + path+'/ps/'+file[num] + ' '+ path + '/eps/' + name + '.eps'
popen = Popen(cmd, shell=True)
popen.wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment