-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckscript.py
More file actions
executable file
·39 lines (35 loc) · 934 Bytes
/
Copy pathcheckscript.py
File metadata and controls
executable file
·39 lines (35 loc) · 934 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
try:
import os
from subprocess import call
print 'Python is installed'
except ImportError:
raise ImportError('This should not be possibe')
exit()
try:
import Bio
from Bio import SeqIO
print 'BioPython is installed'
except ImportError:
raise ImportError('BioPython Not Installed')
def clean_up():
filelist = os.listdir('.')
for name in filelist:
os.remove(name)
os.chdir(os.pardir)
os.rmdir('testdir')
os.mkdir('testdir')
os.chdir('testdir')
filename = 'QWERTY'
texname = filename+'.tex'
#print texname
outfile = open(texname, 'w')
print >>outfile, '\\documentclass[12pt]{article}'
print >>outfile, '\\begin{document}'
print >>outfile, '\\end{document}'
outfile.close()
try:
call(["pdflatex", "-interaction=batchmode", texname])
print 'PDFLaTex is installed'
except:
print 'PDFLaTex not installed'
clean_up()