| |
| |
| |
|
Comments:
<0> yason: congratulations <1> hey, how would i delete a previous version of python? <1> i have installed 2.4 <0> delete the old binary and lib directories <1> Traceback (most recent call last):
<1> File "/usr/local/bin/palabre", line 39, in ? <1> from palabre import palabreDaemon <1> File "/usr/lib/python2.2/site-packages/palabre/__init__.py", line 24, in ? <1> import ConfigParser, logging, os <1> ImportError: No module named logging <1> argggghhhh :@ <0> you may not want to delete the old version, other things might still be using it <0> the proper thing here is to adjust your PATH so that /usr/bin/env finds the version you want, not the old version <0> (this is a standard Unix thing and actually has nothing to do with Python) <0> export PATH=/usr/local/bin:$PATH <0> then try again <2> re <0> hey <0> congratulations on your new job, yason <3> how would i find a process's pid using python? <0> which process? <0> the running process? <3> im running a cherrypy server <3> problem is it starts hanging for a reason i dont know <3> so i want to kill it and restart it once ins awhile
<3> i can run a cron job to a python script.. <3> so i would need to kill cherrypy's pid <0> just use standard OS mechanisms, like killall (non-Solaris) or pidof <0> since you're not killling it from Python this isn't really a Python question <3> i want to do it from python <0> why would you want to do that <3> what i want to do, is send a request to the server and if i dont get any response, restart it <3> that seems better than restarting it daily, since it might not need to be restarted or, it might crash in an hour... <0> it still sounds like you'd be better off doing that from a shell anyway <0> but if you wanted to do that, then do the test, then run os.system on the shell command to kill the process <0> if you want to actually track the process, have your server log its pid somewhere and read it that way <3> how would i have the server log the pid? <0> I don't know, you seem to want to kill it from Python <0> the point is, all the things you can do to detect the server failure and kill it are doable from outside of Python -- to the point that doing them within Python will really just rely on those methods <3> ok <0> so it probably makes more sense for your cron job to be a shell script rather than a separate Python program <0> don't get me wrong -- you CAN do it in Python, I'm just not sure what you get out of it <3> cool, thanx for your advice <0> sure <2> xihr: thanks <4> what up people <5> must go now 1 alienware area51m 5700 laptop. price 550 includes shipping, case, wireless router. message me on msn at mcsltd@telusmail.net or aim at itscrazyguymike or yahoo at mcsltd2 if interested. this must go today. specs centrino 2.26, 1gb ram, 80gb hard drive, dvdrw/cdrw, built in modem, ethernet, firewire. usb2.0, 802.11b/g wireless. 256mb nvidia geforce go 6800 pcie, 17.1" uwxga display
Return to
#python or Go to some related
logs:
#delphi #politics #politics football supporters rioted #beginner slideshow_as2+loading Pakistani Femail 0.2.1.IY0BwIHaSAB #hardware #hardware
|
|