Re: [Webware-devel] Suggestion for Appserver script
On Fri, 2004-01-30 at 03:42, Christoph Zwerschke wrote: > When debugging an application, I like to run the Appserver with > unbuffered > Python output (Python option -u). Also, it might make sense to run it > with > Python using optimization (Python option -O). However, you cannot > give these > parameters to the Appserver script, since they would be passed on to > the > ThreadedAppServer script, and not to Python. My suggestion is to > catch these > two options if they are given in advance, and only pass the rest of > the > parameters on to the ThreadedAppServer: Thanks, Christoph. I've applied this to CVS. > Also, I noticed a minor flaw in WebKit/ImportSpy.py. There, the line > if f[-4:] == '.pyc': > should be replace to > if f[-4:].lower() in ('.pyc', '.pyo'): Ok, fixed this too. Thanks. peace, Jason --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel
[Webware-devel] Suggestion for Appserver script
Here is a suggestion for improvement of the Appserver script: When debugging an application, I like to run the Appserver with unbuffered Python output (Python option -u). Also, it might make sense to run it with Python using optimization (Python option -O). However, you cannot give these parameters to the Appserver script, since they would be passed on to the ThreadedAppServer script, and not to Python. My suggestion is to catch these two options if they are given in advance, and only pass the rest of the parameters on to the ThreadedAppServer: - AppServer #!/bin/sh # You may give the following Python parameters in advance # followed by the parameters passed on to ThreadedAppServer # -O with optimization (.pyo instead of .pyc) # -u unbuffered output (useful for debugging) unset OPTIONS while getopts ":Ou" OPT; do case $OPT in O | u) OPTIONS="$OPTIONS -$OPT";; esac done shift `expr $OPTIND - 1` RETCODE=3 # as long as the appserver returns a 3, it wants to be restarted while test $RETCODE -eq 3; do /usr/bin/env python $OPTIONS Launch.py ThreadedAppServer $* RETCODE=$? done Also, I noticed a minor flaw in WebKit/ImportSpy.py. There, the line if f[-4:] == '.pyc': should be replace to if f[-4:].lower() in ('.pyc', '.pyo'): There is a similar line in MiscUtils/inspect.py which is already ok. Christoph --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel
[Webware-devel] Suggestion for Appserver script
Here is another suggestion for the Appserver script. It fixes the problem that you cannot start it with startproc, like this startproc -f -u $WEBKIT_USR -g $WEBKIT_GRP \ -l $LOG -p $PID_FILE $WEBKIT_DIR/AppServer since there is no way to tell startproc to change to execute AppServer in the $WEBKIT_DIR directory. For an obscure reason, it always starts it with some system folder as working directory, and AppServer does not like it. So my suggestion is to let the AppServer script cd to the directory where it has been started first. The improved script now looks like that: --- AppServer.py --- #!/bin/sh # Make directory where AppServer is called the current directory DIR=`dirname $0` cd $DIR # You may give the following Python parameters in advance # followed by the parameters passed on to ThreadedAppServer # -O with optimization (.pyo instead of .pyc) # -u unbuffered output (useful for debugging) unset OPTIONS while getopts ":Ou" OPT; do case $OPT in O | u) OPTIONS="$OPTIONS -$OPT";; esac done shift `expr $OPTIND - 1` RETCODE=3 # as long as the appserver returns a 3, it wants to be restarted while test $RETCODE -eq 3; do /usr/bin/env python $OPTIONS Launch.py ThreadedAppServer $* RETCODE=$? done - Christoph --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel