Discussion:
[Python.NET] Python for .NET with PythonXY ?
Daniel Mader
2011-05-17 15:15:46 UTC
Permalink
Dear list,

with a couple of colleagues, I am using PythonXY as the main Python
distribution when using Windows. It is based on Python 2.6 (2.7 is now
in the focus so that the next release will be made for this).
From what we see it should be possible to make this installation ".NET
aware" without duplicating anything. However, we can't really find the
required steps to do so.

Could you please point out what we'd need to download in order to
proceed? Is there a "clean" installer so that PythonXY can be updated
later? Or does a manual install interfere with this?

Thank you many times in advance for a quick-installation guide,
best regards,

Daniel
_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
Dave Hirschfeld
2011-05-17 15:50:30 UTC
Permalink
Post by Daniel Mader
Dear list,
with a couple of colleagues, I am using PythonXY as the main Python
distribution when using Windows. It is based on Python 2.6 (2.7 is now
in the focus so that the next release will be made for this).
From what we see it should be possible to make this installation ".NET
aware" without duplicating anything. However, we can't really find the
required steps to do so.
Could you please point out what we'd need to download in order to
proceed? Is there a "clean" installer so that PythonXY can be updated
later? Or does a manual install interfere with this?
Thank you many times in advance for a quick-installation guide,
best regards,
Daniel
To "install" Python.NET all you need to do is copy clr.pyd and
Python.Runtime.dll to your Python (sys.prefix) directory.

Don't know about any binary installers sorry, I've always just downloaded the
source, compiled in VS and copied the files over.


Works fine with PythonXY though as PythonXY doesn't know anything about the
files it can't "uninstall" them (you'd just have to manually delete them) - e.g.

Executing Python(x,y) 2.6.5.6 profile startup script: default.py
Loading NumPy
Loading SciPy
Importing all NumPy functions, modules and classes
Logging to C:\Users\dhirschfeld\.xy\logs\2011-05-17.py

*** Pasting of code with ">>>" or "..." has been enabled.
Qt: Could not initialize OLE (error 80010106)
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.10.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

IPython profile: xy

Welcome to pylab, a matplotlib-based Python environment.
For more information, type 'help(pylab)'.

In [2]: import clr

In [3]: import System

In [4]: print System.DateTime.Now
17/05/2011 16:49:21

In [5]:

HTH,
Dave



_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet
Daniel Mader
2011-05-18 08:29:32 UTC
Permalink
Dear Dave.

thank you very much for your quick reply, we've done as you
recommended and it works beautifully!

It was especially helpful that you pointed out that the python.exe
itself is NOT necessary!

Best regards,
Daniel + colleagues
Post by Dave Hirschfeld
Post by Daniel Mader
Dear list,
with a couple of colleagues, I am using PythonXY as the main Python
distribution when using Windows. It is based on Python 2.6 (2.7 is now
in the focus so that the next release will be made for this).
From what we see it should be possible to make this installation ".NET
aware" without duplicating anything. However, we can't really find the
required steps to do so.
Could you please point out what we'd need to download in order to
proceed? Is there a "clean" installer so that PythonXY can be updated
later? Or does a manual install interfere with this?
Thank you many times in advance for a quick-installation guide,
best regards,
Daniel
To "install" Python.NET all you need to do is copy clr.pyd and
Python.Runtime.dll to your Python (sys.prefix) directory.
Don't know about any binary installers sorry, I've always just downloaded the
source, compiled in VS and copied the files over.
Works fine with PythonXY though as PythonXY doesn't know anything about the
files it can't "uninstall" them (you'd just have to manually delete them) - e.g.
Executing Python(x,y) 2.6.5.6 profile startup script: default.py
 Loading NumPy
 Loading SciPy
 Importing all NumPy functions, modules and classes
 Logging to C:\Users\dhirschfeld\.xy\logs\2011-05-17.py
*** Pasting of code with ">>>" or "..." has been enabled.
Qt: Could not initialize OLE (error 80010106)
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.
IPython 0.10.2 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.
IPython profile: xy
 Welcome to pylab, a matplotlib-based Python environment.
 For more information, type 'help(pylab)'.
In [2]: import clr
In [3]: import System
In [4]: print System.DateTime.Now
17/05/2011 16:49:21
HTH,
Dave
_________________________________________________
http://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________
Python.NET mailing list - PythonDotNet-+ZN9ApsXKcEdnm+***@public.gmane.org
http://mail.python.org/mailman/listinfo/pythondotnet

Loading...