IronPython newbie: not clear on imports and assemblies

T

Thomas Gagne

OK--I also haven't programmed on .NET before.

My goal is to play with the "EssentialPDF" libraries inside IronPython.
But I'm not clear on how to import (load?) Essential's .dll files. Of
course, all the samples files are in C# and VB. I guess I"m wondering
if Essential's libraries (assemblies?) should already be in my path or
if I need to provide a path to them, and whether or not I'm going to use
"import" or Assembly.Load(), and if the latter, where am I to find
Assembly? I'm pretty sure that has to be imported as well 'cause
whenever I try to use it I'm told it doesn't exist...

Anyway, I'll keep Googling around and reading tutorials to catch-up. I
haven't used Python since 1999 so I need some refreshing...
 
M

Mike Driscoll

OK--I also haven't programmed on .NET before.

My goal is to play with the "EssentialPDF" libraries inside IronPython.
  But I'm not clear on how to import (load?) Essential's .dll files.  Of
course, all the samples files are in C# and VB.  I guess I"m wondering
if Essential's libraries (assemblies?) should already be in my path or
if I need to provide a path to them, and whether or not I'm going to use
"import" or Assembly.Load(), and if the latter, where am I to find
Assembly?  I'm pretty sure that has to be imported as well 'cause
whenever I try to use it I'm told it doesn't exist...

Anyway, I'll keep Googling around and reading tutorials to catch-up.  I
haven't used Python since 1999 so I need some refreshing...

First of all, you should join the IronPython mailing list and ask
there. They can probably give quicker, better answers. See
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

You might also want to buy Michal Foord's new book: IronPython in
Action from Manning.

I'm pretty new to IronPython too, but my guess is that you'd have to
do something like this:

<code>
import clr
clr.AddReference("EssentialPDF")

# now EssentialPDF should be in your python namespace
# so you can do something like this:

from EssentialPDF import SomeModule

# or

EssentialPDF.SomeModule

</code>

At least, that's how it seems to work for most .NET libraries. Hope
that helps.

- Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top