Reloading mod_python dist-packages?
So, I am writing some python scripts that are copied into the dist-packages directory of python. However, I am also using python scripts in the FreeSWITCH scripts directory that refer to these python scripts in the dist-packages. To re-copy the files, I need to run "sudo python setup_fs.py" each time I make a change. However, I also need to restart FreeSWITCH because I don't know of a way to reload the dist-packages used by mod_python. Any ideas? PS: This is the project I am referring to: < https://github.com/kheimerl/libvbts>
Any ideas? If it is not possible, please let me know. Thanks, Amil http://www.amilkhanzada.com/2012/06/gmail-keeping-mailing-list-topics-you.ht... On Sun, Jul 15, 2012 at 8:57 PM, Amil <amilkhanzada@gmail.com> wrote:
So, I am writing some python scripts that are copied into the dist-packages directory of python. However, I am also using python scripts in the FreeSWITCH scripts directory that refer to these python scripts in the dist-packages. To re-copy the files, I need to run "sudo python setup_fs.py" each time I make a change.
However, I also need to restart FreeSWITCH because I don't know of a way to reload the dist-packages used by mod_python.
Any ideas?
PS: This is the project I am referring to: < https://github.com/kheimerl/libvbts>
*last bump* On Thu, Jul 19, 2012 at 12:17 PM, Amil <amilkhanzada@gmail.com> wrote:
Any ideas? If it is not possible, please let me know.
Thanks, Amil
http://www.amilkhanzada.com/2012/06/gmail-keeping-mailing-list-topics-you.ht...
On Sun, Jul 15, 2012 at 8:57 PM, Amil <amilkhanzada@gmail.com> wrote:
So, I am writing some python scripts that are copied into the dist-packages directory of python. However, I am also using python scripts in the FreeSWITCH scripts directory that refer to these python scripts in the dist-packages. To re-copy the files, I need to run "sudo python setup_fs.py" each time I make a change.
However, I also need to restart FreeSWITCH because I don't know of a way to reload the dist-packages used by mod_python.
Any ideas?
PS: This is the project I am referring to: < https://github.com/kheimerl/libvbts>
Reloading the mod should be enough. I imagine that mod_python respects anything that the interpreter would do as if it was running standalone. Reloading modules is potentially hazardous and you should be careful with it: http://stackoverflow.com/questions/684171/how-to-re-import-an-updated-packag... Regards, João Mesquita On Mon, Aug 13, 2012 at 4:42 PM, Amil <amilkhanzada@gmail.com> wrote:
*last bump*
On Thu, Jul 19, 2012 at 12:17 PM, Amil <amilkhanzada@gmail.com> wrote:
Any ideas? If it is not possible, please let me know.
Thanks, Amil
http://www.amilkhanzada.com/2012/06/gmail-keeping-mailing-list-topics-you.ht...
On Sun, Jul 15, 2012 at 8:57 PM, Amil <amilkhanzada@gmail.com> wrote:
So, I am writing some python scripts that are copied into the dist-packages directory of python. However, I am also using python scripts in the FreeSWITCH scripts directory that refer to these python scripts in the dist-packages. To re-copy the files, I need to run "sudo python setup_fs.py" each time I make a change.
However, I also need to restart FreeSWITCH because I don't know of a way to reload the dist-packages used by mod_python.
Any ideas?
PS: This is the project I am referring to: < https://github.com/kheimerl/libvbts>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi João, Thank you for the response. However, mod_python is not reloadable on my machine:
freeswitch@amil-ubuntu> reload mod_python 2012-08-13 13:44:48.922331 [CRIT] switch_loadable_module.c:1421 Module is not unloadable. -ERR unloading module [Module is not unloadable] +OK Reloading XML -ERR loading module [Module already loaded] 2012-08-13 13:44:49.242317 [WARNING] switch_loadable_module.c:1370 Module mod_python Already Loaded! 2012-08-13 13:44:49.242317 [INFO] mod_enum.c:812 ENUM Reloaded 2012-08-13 13:44:49.242317 [INFO] switch_time.c:1123 Timezone reloaded 530 definitions
Any other ideas? Is there some command to just reload the dist-packages? If not, I guess this is a feature request (although not urgent). -Amil On Mon, Aug 13, 2012 at 2:27 PM, João Mesquita <jmesquita@freeswitch.org>wrote:
Reloading the mod should be enough. I imagine that mod_python respects anything that the interpreter would do as if it was running standalone.
Reloading modules is potentially hazardous and you should be careful with it: http://stackoverflow.com/questions/684171/how-to-re-import-an-updated-packag...
Regards, João Mesquita
participants (2)
-
Amil
-
João Mesquita