[Gmodulo-commits] gmodulo-shell/src gsapp.py, NONE, 1.1 gsbrowsecmds.py, NONE, 1.1 gscommand.py, NO
Status: Beta
Brought to you by:
inean
From: Carlos MartÃn <in...@us...> - 2007-08-31 16:38:50
|
Update of /cvsroot/gmodulo/gmodulo-shell/src In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31818/src Added Files: gsapp.py gsbrowsecmds.py gscommand.py gscommandmanager.py gserror.py gsextensioncmds.py gsformat.py gshelpcmds.py gshostcmds.py gsshellcmds.py gstalk.py Log Message: added missing files --- NEW FILE: gsbrowsecmds.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gstalk.py --- ### ### Copyright 2002 Ximian, Inc. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License, version 2, ### as published by the Free Software Foundation. ### ### This program is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with this program; if not, write to the Free Software ### Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ### import sys import os import stat show_messages = 1 show_verbose = 0 show_warnings = 1 show_errors = 1 show_debug = 0 be_terse = 0 # Check to see if stdout has been redirected to a file. stdout_is_file = 0 if stat.S_ISREG(os.fstat(sys.stdout.fileno())[stat.ST_MODE]): stdout_is_file = 1 def message(str): if show_messages: print str esc = "" def message_status(str): if show_messages and not be_terse: # If we've redirected to a file, don't print escape characters if stdout_is_file: print str else: print esc + "[1G" + str + esc + "[0K", sys.stdout.flush() def message_finished(str, force_output=0): if show_messages and (force_output or not be_terse): # If we've redirected to a file, don't print escape characters if stdout_is_file: print str else: print esc + "[1G" + str + esc + "[0K" def verbose(str): if show_verbose: print str def warning(str): if show_warnings: print "Warning: " + str def error(str): if show_errors: print "ERROR: " + str def fatal(str): error(str) sys.exit(1) def debug(str): if show_debug: print "DEBUG: " + str def prompt(str): sys.stdout.write(str + " ") sys.stdout.flush() return raw_input() --- NEW FILE: gsshellcmds.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gsapp.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gshostcmds.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gscommand.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gshelpcmds.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gsformat.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gscommandmanager.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gserror.py --- (This appears to be a binary file; contents omitted.) --- NEW FILE: gsextensioncmds.py --- (This appears to be a binary file; contents omitted.) |