File: testscript_cleanup.py

package info (click to toggle)
rpy 1.0.3-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 636 kB
  • ctags: 774
  • sloc: ansic: 2,139; python: 1,591; makefile: 119; sh: 73
file content (16 lines) | stat: -rw-r--r-- 282 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from rpy import r
import os.path

# find out where the temp directory is
tempdir = r.tempdir()

# write its name into a file
f = open('tempdir','w')
f.write(tempdir)
f.close()

# put something there..
r.postscript(os.path.join(tempdir,"foo.ps"))
r.plot(1,1)
r.dev_off()