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 <[email protected]>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
> > > [email protected]
> > > 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
> > [email protected]
> > 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
> [email protected]
> 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:[email protected] <msn%[email protected]>
GTALK/JABBER/PAYPAL:[email protected]<paypal%[email protected]>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:[email protected] <sip%[email protected]>
iax:[email protected]/888
googletalk:[email protected]<googletalk%3aconf%[email protected]>
pstn:213-799-1400
_______________________________________________
Freeswitch-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to