File: testscript_cleanup.py

package info (click to toggle)
rpy 1.0.3-15
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 692 kB
  • ctags: 671
  • sloc: ansic: 2,144; python: 1,592; makefile: 129; sh: 69
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()