views:

113

answers:

1

this works fine

ipy.exe pyc.py /main:ABMBancosPYDLL.py  /target:library 

now this

ipy.exe pyc.py /main:ABMBancosPYDLL.py /r:funciones.dll  /target:library 

gives me the following error

File pyc.py line 161 in pyc.py File pyc.py line 153 in Main

SystemError:"the provided route format isnt allowed" (well sort of, I translated it from spanish)

+1  A: 

If you load IronPython from the same directory does clr.AddReference('funciones.dll') work?

You don't necessarily need to use /r:... anyway. I would suggest embedding an import clr/ clr.AddReference(...) call instead - that way it'll work identically when running from source and when running the compiled version.

Dino Viehland
oh, I didnt realize I didnt need them if I have clr.AddReference(...) Thanksdo you think IronPython for asp.net in the future will support aspx files with dll files as codefiles? Some sw developers (as me) need the codefiles not to be directly viewable and right now that isnt supported, right? Now for that I run a little program I made which basically converts the codefile to 2 files, one of them only makes calls to the other so I can hide the logic by converting the second one to a dll, but that's an ugly hack :) Other than that, IronPython for asp.net is really the greatest for me
Pablo
You can pre-compile the .py files using clr.CompileModules, call clr.AddReference() on the compiledc code, and then the modules will be available for importing. Not 100% sure how that would integrate w/ ASP.NET - maybe you'd need a kick off .py file which loads the other ones.
Dino Viehland
ahh Dino, now that I got to work clr.CompileModules it seems I can import the modules. You have no idea how happy I am :)
Pablo