mò -á¸Ec@s^dZdZddd!ZdddZdkZdkZdkZdkZdkZd kl Z d a e fƒZ d „Z d „Zd „Zeieieieidddhd„Zeieieieidhd„ZydklZWnd„ZnXdZddddddddddddeeid„Zedjo e ƒndS(s:" exec python $0 ${1+"$@"} sL Command-line Bobo Usage bobo [options] module_path [path_info] where: module_path -- is a full path to a published module path_info -- Is the information after the module name that would normally be specified in a GET URL, including a query string. Description The command-line interface to Bobo provides a handy way to test, debug, and profile Bobo without a web server. Options -u username:password -- Supply HTTP authorization information -e name=value -- Supply environment variables. Use a seperate -e option for each variable specified. -p profiler_data_file -- Run under profiler control, generating the profiler data file, profiler_data_file. -t -- Compute the time required to complete a request, in milliseconds. -r n -- Specify a repeat count for timing or profiling. -d -- Run in debug mode. With this option, bobo will run under Python debugger control. Two useful breakpoints are set. The first is at the beginning of the module publishing code. Steping through this code shows how bobo finds objects and obtains certain meta-data. The second breakpoint is at the point just before the published object is called. To jump to the second breakpoint, you must enter 's' followed by a carriage return to step into the module, then enter a 'c' followed by a carriage return to jump to the first breakpoint and then another 'c' followed by a carriage return to jump to the point where the object is called. Finally, enter 's' followed a carriage return. -s Don't generate any output Examples For example, to debug a published object (such as a method), spam, the following might be entered:: bobo -d /prj/lib/python/mymod container/spam s c c s $Id: Test.py 67823 2006-05-02 09:55:17Z philikon $ s$Revision: 1.41 $i iþÿÿÿs %s t_i<N(sclockidcCs]dk} dk}dk}y‡|i| iddƒ\}} t| ƒdjpt| ƒdjo td‚n(t| ƒdjo| ddf} n| d} Wn$| i i t ƒ| i dƒnXd}}} } }h}xø|D]ð\}}|djo d} n|djo d}n|d jo d}n|d jo |} qì|d jo |}qì|d jot|ƒaqì|d joG|idƒ}|djotd|‚n||d||| R=RCRBR9R7R#R:R8R;RERF((R$tpublish_module®s\          #     cCsšdkl}dkl} dkl} dg} |d|d|ƒ} | ||| ƒ}x$|i ƒD]\} }||| RCRDRERFRGR(RGR?R6RR@RRCRFR>RER;R#R=R9R:((R$tpublish_module_pmäs     (s getlinenocCs|iS(N(tcodetco_firstlineno(RR((R$t getlinenoõstMainRtGETc# Bsö|}|} |}|}|djo h}n| djo h} n|djo e }n|ddjod|d}n|}d|d| d9ƒo | }n ei6}e |d$|d%|d(| ƒei;i8| ƒdS(:Nit+s../../lib/python/is bobo.servert SERVER_NAMEt80t SERVER_PORTtREQUEST_METHODs204.183.226.81 t REMOTE_ADDRsbobo.remote.hostt REMOTE_HOSTsBobo/%stHTTP_USER_AGENTs 127.0.0.1t HTTP_HOSTtSERVER_SOFTWAREs HTTP/1.0 tSERVER_PROTOCOLs,image/gif, image/x-xbitmap, image/jpeg, */* t HTTP_ACCEPTsbobo.server.hosttSERVER_HOSTNAMEsCGI/1.1 tGATEWAY_INTERFACEt SCRIPT_NAMEt?t PATH_INFOit QUERY_STRINGtsBasic %stHTTP_AUTHORIZATIONt ComponentsR@R6s /dev/nulltwRCR?s_for i in range(%s): publish_module(file, environ=env, stdout=open('/dev/null','w'),extra=extra)(spublishs call_objecttPdbcBstZd„Zd„ZRS(NcCsMt|dƒo dGHn1|idƒ|idƒ|idƒd|_dS(Ntdone_pubspub already done.Rii(thasattrtselftdo_stdo_cRn(Rptarg((R$tdo_pub<s     cCs@t|dƒo dGHn$|idƒ|idƒd|_dS(Ntdone_obsob already done.Rii(RoRpRtRrRu(RpRs((R$tdo_obDs    (t__name__t __module__RtRv(((R$Rm;s cCsUy |i}Wntj onX|i}t|ƒ}|i}|i ||ƒdS(N( tmethtim_functAttributeErrort func_codeRRRTtlinenot co_filenametfilenametdbt set_break(R€RyRRRR}((R$tfbreakNs    t breakpointsRs.bobodbtrspdb> sÅ* Type "sc" to jump to beginning of real publishing process. * Then type c to jump to the beginning of the URL traversal algorithm. * Then type c to jump to published object call.sApublish_module(file,environ=env,debug=1,extra=extra, stdin=stdin)RPtfiles%s milliseconds R(?RRRRRRRRRRRCtscriptt defaultModuleRtrequest_methodt __version__RtsplitRRRtbase64t encodestringR tpathtdirR…tjointcdirR tplatformt__main__RPtopenR?RtcR1R<R#t call_objecttpdbRmR€R‚tdbdatatbtreadRKRLR(Rtpromptt__dict__R6R.RtpmRQRt done_stringtfpRo(#R†RRRRRRRRœRCRˆRžRR?RR<R…R’R‚RRR‹R•R#RR€R˜R—RRmR”R6RR–RŽ((R$R#ùsº                +            !    8  !   R’(RR‰tDONE_STRING_DEFAULTR t tracebackRR R R.R+RttypeRLR%R1R?R6RR@RRPRQtcodehackRTR‡R#Rw(RŸRQRPRTR+R#R R%RRR1R RLR‰R R.R‡R ((R$Rfs(K -   , -6' 6