[Freeswitch-users] Possible to mock out _freeswitch.py?
Anthony Minessale
anthony.minessale at gmail.com
Wed Jan 28 16:23:16 PST 2009
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 at highergear.com>wrote:
> 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:
> > Have you see this
> >
> >
> http://fisheye.freeswitch.org/browse/FreeSWITCH/src/mod/languages/mod_python/python_example.py?r=9052
> >
> > /b
> >
> > On Jan 28, 2009, at 4:31 PM, Brian Deacon wrote:
> >
> > > 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 at lists.freeswitch.org
> > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > > UNSUBSCRIBE:
> http://lists.freeswitch.org/mailman/options/freeswitch-users
> > > http://www.freeswitch.org
> >
> >
> > _______________________________________________
> > Freeswitch-users mailing list
> > Freeswitch-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090128/8a3f6b7d/attachment-0002.html
More information about the FreeSWITCH-users
mailing list