Yes, this was correct.  I had never installed the package, I was just grabbing the Bin zip and running that.<br><br>I have now compiled the dependencies directly into my assembly using pyc.py.<br><br><div class="gmail_quote">
On Tue, Aug 2, 2011 at 1:11 AM, Markus Schaber <span dir="ltr">&lt;<a href="mailto:m.schaber@3s-software.com">m.schaber@3s-software.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, John,<br>
<br>
Von: John Gietzen<br>
<div class="im"><br>
&gt; I&#39;m trying to compile Pygments to be called from a C# library, but I&#39;ve come accross a few hurdles.<br>
<br>
&gt; The first was an issue with function calls with more that 13 arguments throwing an error stating that the compiler is &quot;Unable to make a reference to a transient module from a non-transient module.&quot;  See: <a href="http://ironpython.codeplex.com/workitem/31125" target="_blank">http://ironpython.codeplex.com/workitem/31125</a><br>

&gt; There is a previous issue saying that it was fixed in 2.7.1b1, but it still fails with the 150 argument call that is present in Pygments.<br>
<br>
</div>150 arguments? That seems far from sane for me, but the Pygments people seem to have a reason for it, I hope. :-)<br>
<br>
Maybe you can pack all those arguments into a tuple, effectively changing the call into a 1-argument call?<br>
<br>
Caller site:<br>
Change &quot;result = function(a,b,c,d) into result = function((a,b,c,d))&quot;<br>
<br>
Calee site:<br>
Change &quot;def function(a,b,c,d):&quot; to &quot;def function(tuple):&quot; \n &quot;    a,b,c,d = tuple&quot;<br>
<div class="im"><br>
&gt; Now, I&#39;ve run into a brick wall.  I cannot get IronPython to import the `codecs` module, no matter what I try.  Using reflector, I can see that a class the module exists in &quot;IronPython.Modules&quot;, nut there doesn&#39;t seem to be a `[assembly: PythonModule]` attribute for it.<br>

<br>
</div>As far as I can see, that class implements the _codecs module. The &quot;codecs&quot; module is a pure python module.<br>
<div class="im"><br>
&gt; Even in the interactive console when I try to simply execute `import codecs` I get a message saying &quot;ImportError: No module named codecs&quot;.<br>
<br>
</div>I can open the codec module just fine from the interactive console, in both 2.7.1b2 and 2.6.0.<br>
<div class="im"><br>
&gt; I have noticed that there is a &quot;_codecs&quot; module, but it does not have e.g the `open` method.<br>
<br>
</div>The design is the same than in cPython: codecs.py is a high level module written in pure python, and it uses a low level native module _codecs internally. _codecs is a C-written Library in cPython (.dll or .so), while it is a C# class providing the same interface in IronPython. This allows IronPython to reuse the pure python part of the standard library.<br>

<div class="im"><br>
&gt; What am I doing wrong?<br>
<br>
</div>Maybe your search path (sys.path) does not include the directory where the python standard library was installed? Or you did not install it at all?<br>
<br>
For me, it was installed by the IronPython installer.<br>
<br>
<br>
Best regards<br>
<br>
Markus Schaber<br>
<br>
___________________________<br>
We software Automation.<br>
<br>
3S-Smart Software Solutions GmbH<br>
Markus Schaber | Developer<br>
Memminger Str. 151 | 87439 Kempten | Germany | Tel. <a href="tel:%2B49-831-54031-0" value="+49831540310">+49-831-54031-0</a> | Fax <a href="tel:%2B49-831-54031-50" value="+498315403150">+49-831-54031-50</a><br>
<br>
Email: <a href="mailto:m.schaber@3s-software.com">m.schaber@3s-software.com</a> | Web: <a href="http://www.3s-software.com" target="_blank">http://www.3s-software.com</a><br>
CoDeSys internet forum: <a href="http://forum.3s-software.com" target="_blank">http://forum.3s-software.com</a><br>
Download CoDeSys sample projects: <a href="http://www.3s-software.com/index.shtml?sample_projects" target="_blank">http://www.3s-software.com/index.shtml?sample_projects</a><br>
<br>
Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915<br>
_______________________________________________<br>
Ironpython-users mailing list<br>
<a href="mailto:Ironpython-users@python.org">Ironpython-users@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">http://mail.python.org/mailman/listinfo/ironpython-users</a><br>
</blockquote></div><br>