Revision: 391 http://rpy.svn.sourceforge.net/rpy/?rev=391&view=rev Author: warnes Date: 2008-01-02 09:29:55 -0800 (Wed, 02 Jan 2008)
Log Message: ----------- Add startup options to prevent initialization of console read/write/showfiles Modified Paths: -------------- trunk/rpy/rpy.py trunk/rpy/rpy_options.py Modified: trunk/rpy/rpy.py =================================================================== --- trunk/rpy/rpy.py 2007-11-30 01:44:49 UTC (rev 390) +++ trunk/rpy/rpy.py 2008-01-02 17:29:55 UTC (rev 391) @@ -194,11 +194,22 @@ get_rpy_showfiles = _rpy.get_showfiles # Default I/O to functions in the 'rpy_io' module -set_rpy_output(rpy_io.rpy_output) -set_rpy_input(rpy_io.rpy_input) -if sys.platform != 'win32': - set_rpy_showfiles(rpy_io.rpy_showfiles) +if rpy_options['SETUP_WRITE_CONSOLE']: + set_rpy_output(rpy_io.rpy_output) +else: + print "\nSkipping initialization of R console *write* support.\n" +if rpy_options['SETUP_READ_CONSOLE']: + set_rpy_input(rpy_io.rpy_input) +else: + print "\nSkipping initialization of R console *read* support.\n" + +if rpy_options['SETUP_SHOWFILES']: + if sys.platform != 'win32': + set_rpy_showfiles(rpy_io.rpy_showfiles) +else: + print "\nSkipping initialization of R console *file viewer* support\n" + # Functions for processing events import threading Modified: trunk/rpy/rpy_options.py =================================================================== --- trunk/rpy/rpy_options.py 2007-11-30 01:44:49 UTC (rev 390) +++ trunk/rpy/rpy_options.py 2008-01-02 17:29:55 UTC (rev 391) @@ -28,14 +28,23 @@ 'RVER':None, # R Version *number* 'RUSER':None, # R User's Home Directory 'USE_NUMERIC':None, # Is Numeric module available - 'VERBOSE':False # Should status messages be displated. + 'VERBOSE':False, # Should status messages be displated. + 'SETUP_READ_CONSOLE': True, # Set to False to prevent standard console read config + 'SETUP_WRITE_CONSOLE': True, # Set to False to prevent standard console write config + 'SETUP_SHOWFILES': True # Set to False to prevent standard console file viewerd config } -def set_options(RHOME=None, USE_NUMERIC=None, VERBOSE=None): +def set_options(RHOME=None, USE_NUMERIC=None, VERBOSE=None, SETUP_READ_CONSOLE=None, SETUP_WRITE_CONSOLE=None, SETUP_SHOWFILES=None): if RHOME != None and os.path.isdir(RHOME): rpy_options['RHOME'] = RHOME if USE_NUMERIC != None and USE_NUMERIC in [True, False]: rpy_options['USE_NUMERIC'] = USE_NUMERIC if VERBOSE != None and VERBOSE in [True, False]: rpy_options['VERBOSE'] = VERBOSE + if SETUP_READ_CONSOLE != None and SETUP_READ_CONSOLE in [True, False]: + rpy_options['SETUP_READ_CONSOLE'] = VERBOSE + if SETUP_WRITE_CONSOLE != None and SETUP_WRITE_CONSOLE in [True, False]: + rpy_options['SETUP_WRITE_CONSOLE'] = VERBOSE + if SETUP_SHOWFILES != None and SETUP_SHOWFILES in [True, False]: + rpy_options['SETUP_SHOWFILES'] = VERBOSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list