I thinks I got it. 
ipy.exe pyc.py /target:dll cycle.py 
would create cycle.dll
----- Original Message ----
From: Bob Rosembob <[EMAIL PROTECTED]>
To: Discussion of IronPython <[email protected]>
Sent: Tuesday, July 1, 2008 2:29:12 PM
Subject: Re: [IronPython] Another deployment question...


Michael, thanks for your help.
 
I looked at the documentation and tried to follow the directions but I got 
something different then what I expected.
Here what I did:
1. Copied IronPython and IronMath dlls and ipy.exe into the directory where my 
script is
2. Started command prompt and changed the directory
3. Typed the following
ipy.exe cycle.py /target:cycle.dll
 
It executed the script but didn't create cycle.dll. I guess I'm missing 
something.
Please advise,
Bob


 
----- Original Message ----
From: Michael Foord <[EMAIL PROTECTED]>
To: Discussion of IronPython <[email protected]>
Sent: Tuesday, July 1, 2008 10:26:18 AM
Subject: Re: [IronPython] Another deployment question...

Bob Rosembob wrote:
> One script that I'm using is a third party code and they would prefere 
> me to use the compiled version of it. Is there a way to compile it?
>  

You *cannot* use '.pyc' files with IronPython.

With IronPython 1 you can compile Python files into .NET assemblies that 
you can import from as if they were Python files (Resolver Systems use 
that). You can use the 'Pyc' compiler sample to do this.

There is not yet any equivalent for IronPython 2.

Michael Foord

> Please advise.
>  
> Thanks,
> Bob
>  
> -----------------------------------------------------------------------
> Bob Rosembob wrote:
> >/ Hi there,
> />/ I have a couple of questions.
> />/ 
> />/ 1. If I'm using IronPython to call Python function from my C# app.
> />/ What do I need to deploy my project?
> />/ 
> />/ I added references to my project to the following dlls:
> />/ /IronPython.dlll
> />/ IronMath.dll/
> />/ /
> />/  /
> />/ In the code I'm using the following:
> />/ /using IronPython.Runtime;
> />/ using IronPython.Runtime.Types;
> />/ using IronPython.Runtime.Operations;
> />/ usingIronPython.Hosting;
> />/ using IronPython.Modules;/
> />/ /
> />/  /
> />/ The script imports:
> />/ /string/
> />/ /sys/
> />/ /os/
> />/ /math/
> />/ and other
> />/ 
> />/ 2. In order to run the script I had to copy imported libraries 
> into />/ directory where my exe is.  For some reason if I copy the 
> compiled
> />/ version of the files (e.g. string.pyc, sys.pyc, etc.) my script won't
> />/ find them. It can see only none-compiled files. Why is it? What 
> should />/ I do to be able run all script files (py) as compiled (pyc)?
> /
> Those compiled files are compiled into bytecode for the CPython VM. They
> will never run on the .NET framework.
>
> What is wrong with using the '.py' source files?
>
> Michael
>
>
> >/ 
> />/ Please advise.
> />/ 
> />/ Thanks,
> />/ Bob
> />/ 
> />/
> />/ 
> ------------------------------------------------------------------------/
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>  


-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.resolverhacks.net/
http://wwww.theotherdelia.co.uk/

_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


      
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to