VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
bdeacon at highergear.com Guest
|
Posted: Wed Jan 28, 2009 5:35 pm Post subject: [Freeswitch-users] Possible to mock out _freeswitch.py? |
|
|
Greetings,
Actually any advice on how to test or diagnose my mod_python code would
be appreciated. For the most part I've been trying to keep as much of
my code as possible separated from the actual interaction with
freeswitch so that it's separately testable. But I will occasionally
run into:
[ERR] mod_python.c:121 eval_some_python() Error importing module
This latest is, I think some missing modules in site_packages, but it'd
be nice to get some output hinting at that. So nice would be able to
have a mocked out _freeswitch so the rest of my unit test stuff could
run. Or failing that, is there a switch I can flip to get some of the
python errors output to the log?
TIA,
Brian
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
|
Back to top |
|
|
bdeacon at highergear.com Guest
|
Posted: Wed Jan 28, 2009 7:12 pm Post subject: [Freeswitch-users] Possible to mock out _freeswitch.py? |
|
|
I have. But 'says here:
http://wiki.freeswitch.org/wiki/Mod_python#Can_I_test_scripts_using_python_shell.3F
That the "import _freeswitch" in freeswitch.py breaks except when the
script is run by mod_python. (At which point there is some python
voodoo going on here that is beyond me. Is _freeswitch a
runtime-generated SWIGism?)
So I was thinking I could dump a _freeswitch.py onto the PYTHONPATH when
trying to debug code outside of mod_python. But probably easier for
trivial things would be to just get the python error output to spit to
the log, but it seems to be getting swallowed.
Or was there something else in python_example.py that I've been too
dense to notice?
Brian
On Wed, 2009-01-28 at 16:39 -0600, Brian West wrote:
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Wed Jan 28, 2009 7:20 pm Post subject: [Freeswitch-users] Possible to mock out _freeswitch.py? |
|
|
On Jan 28, 2009, at 6:07 PM, Brian Deacon wrote:
Correct you can't do that unless its running in mod_python inside FreeSWITCH.
Quote: |
So I was thinking I could dump a _freeswitch.py onto the PYTHONPATH when
trying to debug code outside of mod_python. But probably easier for
trivial things would be to just get the python error output to spit to
the log, but it seems to be getting swallowed.
Or was there something else in python_example.py that I've been too
dense to notice? |
I think the key is to know you can only run it inside FreeSWITCH.
|
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Wed Jan 28, 2009 7:26 pm Post subject: [Freeswitch-users] Possible to mock out _freeswitch.py? |
|
|
very much voodoo going on.
The freeswitch.py is generated by swig to link the FS api into FS itself so when the python script runs it uses the glue to get to the .so who in turn references symbols back into FS itself.
So it can't run outside of FS because it depends on symbols from the core.
On Wed, Jan 28, 2009 at 6:07 PM, Brian Deacon <bdeacon@highergear.com (bdeacon@highergear.com)> wrote:
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|