[Rpy] Problems with embedding rpy in cgi script

2007-04-12 Thread Ling Fung Tang
Hi,

I would like to use rpy in a cgi script.

it doesn't have any problem if i run it a command prompt, however,
when i put it onto the server, it doesn't work and returns the
following error message:

   14 from rpy import *
   15
   16
rpy undefined
 C:\Python24\Lib\site-packages\rpy.py
   61 RUSER = rpy_options['RUSER']
   62 else:
   63 RUSER = rpy_tools.get_R_USER()
   64
   65 VERBOSE=rpy_options['VERBOSE']
RUSER undefined, rpy_tools = None, rpy_tools.get_R_USER undefined
 C:\Python24\Lib\site-packages\rpy_tools.py in get_R_USER()
  119 RUSER = os.getenv("HOME")
  120   if not os.path.exists(str(RUSER)) and sys.platform == 'win32':
  121 RUSER = os.getenv("HOMEDRIVE") + os.getenv("HOMEPATH")
  122   if not os.path.exists(str(RUSER)):
  123 RUSER=os.getcwd()
RUSER = None, global os = ,
os.getenv = 


How can I solve the problem?

Thanks,
Paul

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
rpy-list mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/rpy-list


Re: [Rpy] Problems with embedding rpy in cgi script

2007-04-12 Thread Sean Davis

On 4/12/07, Ling Fung Tang <[EMAIL PROTECTED]> wrote:


Hi,

I would like to use rpy in a cgi script.

it doesn't have any problem if i run it a command prompt, however,
when i put it onto the server, it doesn't work



Remember that cgi scripts are run as a different user than "you".  You may
need to set up the path and environment variables specifically.  I don't
know the details of your system, though, to be able to give you more
specifics.

Sean
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
rpy-list mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/rpy-list