very much voodoo going on.<br>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.<br>
So it can&#39;t run outside of FS because it depends on symbols from the core.<br><br><br><div class="gmail_quote">On Wed, Jan 28, 2009 at 6:07 PM, Brian Deacon <span dir="ltr">&lt;<a href="mailto:bdeacon@highergear.com">bdeacon@highergear.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have. &nbsp;But &#39;says here:<br>
<a href="http://wiki.freeswitch.org/wiki/Mod_python#Can_I_test_scripts_using_python_shell.3F" target="_blank">http://wiki.freeswitch.org/wiki/Mod_python#Can_I_test_scripts_using_python_shell.3F</a><br>
<br>
That the &quot;import _freeswitch&quot; in freeswitch.py breaks except when the<br>
script is run by mod_python. &nbsp;(At which point there is some python<br>
voodoo going on here that is beyond me. &nbsp;Is _freeswitch a<br>
runtime-generated SWIGism?)<br>
<br>
So I was thinking I could dump a _freeswitch.py onto the PYTHONPATH when<br>
trying to debug code outside of mod_python. &nbsp;But probably easier for<br>
trivial things would be to just get the python error output to spit to<br>
the log, but it seems to be getting swallowed.<br>
<br>
Or was there something else in python_example.py that I&#39;ve been too<br>
dense to notice?<br>
<font color="#888888"><br>
Brian<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
On Wed, 2009-01-28 at 16:39 -0600, Brian West wrote:<br>
&gt; Have you see this<br>
&gt;<br>
&gt; <a href="http://fisheye.freeswitch.org/browse/FreeSWITCH/src/mod/languages/mod_python/python_example.py?r=9052" target="_blank">http://fisheye.freeswitch.org/browse/FreeSWITCH/src/mod/languages/mod_python/python_example.py?r=9052</a><br>

&gt;<br>
&gt; /b<br>
&gt;<br>
&gt; On Jan 28, 2009, at 4:31 PM, Brian Deacon wrote:<br>
&gt;<br>
&gt; &gt; Greetings,<br>
&gt; &gt;<br>
&gt; &gt; Actually any advice on how to test or diagnose my mod_python code<br>
&gt; &gt; would<br>
&gt; &gt; be appreciated. &nbsp;For the most part I&#39;ve been trying to keep as much of<br>
&gt; &gt; my code as possible separated from the actual interaction with<br>
&gt; &gt; freeswitch so that it&#39;s separately testable. &nbsp;But I will occasionally<br>
&gt; &gt; run into:<br>
&gt; &gt; [ERR] mod_python.c:121 eval_some_python() Error importing module<br>
&gt; &gt;<br>
&gt; &gt; This latest is, I think some missing modules in site_packages, but<br>
&gt; &gt; it&#39;d<br>
&gt; &gt; be nice to get some output hinting at that. &nbsp;So nice would be able to<br>
&gt; &gt; have a mocked out _freeswitch so the rest of my unit test stuff could<br>
&gt; &gt; run. &nbsp;Or failing that, is there a switch I can flip to get some of the<br>
&gt; &gt; python errors output to the log?<br>
&gt; &gt;<br>
&gt; &gt; TIA,<br>
&gt; &gt; Brian<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Freeswitch-users mailing list<br>
&gt; &gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; &gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; &gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; &gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Freeswitch-users mailing list<br>
&gt; <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>