[Python.NET] Python 2.6 support

2010-10-20 Thread pythondotnet
Would you please post Python 2.6-compatible files to the download area? Thank you!
_
Python.NET mailing list - [email protected]
http://mail.python.org/mailman/listinfo/pythondotnet

[Python.NET] Support for CLR4 .NET Remoting

2016-10-20 Thread pythondotnet
Does pythonnet-2.1.0 support .NET Remoting? When I try to get an interface, 
python 2.7 crashes:
 
Unhandled Exception: System.NullReferenceException: Object reference not set to 
an instance of an object.
   at Python.Runtime.ClassDerivedObject.ToPython(IPythonDerivedType obj)
   at Python.Runtime.Converter.ToPython(Object value, Type type)
   at Python.Runtime.MethodBinder.Invoke(IntPtr inst, IntPtr args, IntPtr kw, 
MethodBase info, MethodInfo[] methodinfo)
   at Python.Runtime.MethodObject.Invoke(IntPtr target, IntPtr args, IntPtr 
kw,MethodBase info)
   at Python.Runtime.MethodBinding.tp_call(IntPtr ob, IntPtr args, IntPtr kw)
 
It's getting past these lines in my script:
   import clr
   clr.Addreference(my remoting DLL)
   from MyNamespace import *
 
and choking on a static method in my app's remoting DLL call which returns the 
interface. Through logging, I can tell that the code in that static method call 
is successfully executing:
   (IMyInterface)Activator.GetObject(typeof(IMyInterface), url);
and returning the object back to Python.
 
This worked fine before when my app targeted .NET 3.5 and I used the CLR2 
version of the Python for .NET package. Now  my app targets .NET 4.5.2 so I:
- Updated to Python 2.7.12
- Updated the copy of my app's remoting DLL in c:\python27\dll
- Removed the old Python for .NET package
- Executed "pip install pythonnet", which gave me version 2.1.0.
 
In C:\Python27\Lib\site-packages\ I see:
clr.pyd
Python.Runtime.dll v 2.0.0.2
Python.Runtime.dll.config
_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet

Re: [Python.NET] Support for CLR4 .NET Remoting

2016-10-24 Thread pythondotnet
 
> Can you provide minimal reproducible code sample for both C# and Python?
Tried uploading a .zip file to GitHub but got error "We don't support that file 
type." Instead I put a dropbox file link in the issue.

 > What is the latest pythonnet version in which this works?
I only ever used pythonnet-2.0-alpha2-clr2.0_131_py27_UCS2 with Python 2.7.2, 
where it worked when controlling my .Net 3.5-based-based GUI app. I only 
updated my app to .NET 4.5.2 last week, which is the first time I tried 
CLR4-compatible PythonDotNet with Python 2.7.12.

 > Are you testing this from interactive python or ipython? There are some
 differences between the 2 options.
 - Command shell:  C:\Python27> python my.py

 > Please also open an issue on github.
 Done: ".NET Remoting support broken  #276" 

 > BTW, why have you not switched to WCF?
- Yeah, I know, Remoting is deprecated : (  Need to learn about WCF and see 
what kind of pain it will cause my long-established user base.
----- Original Message - Subject: PythonDotNet Digest, Vol 147, 
Issue 18
From: [email protected]
Date: 10/21/16 10:00 am
To: [email protected]

Send PythonDotNet mailing list submissions to
 [email protected]
 
 To subscribe or unsubscribe via the World Wide Web, visit
 https://mail.python.org/mailman/listinfo/pythondotnet
 or, via email, send a message with subject or body 'help' to
 [email protected]
 
 You can reach the person managing the list at
 [email protected]
 
 When replying, please edit your Subject line so it is more specific
 than "Re: Contents of PythonDotNet digest..."
 
 
 Today's Topics:
 
 1. Support for CLR4 .NET Remoting (pythondotnet)
 2. Re: Support for CLR4 .NET Remoting (Denis Akhiyarov)
 
 
 --
 
 Message: 1
 Date: Thu, 20 Oct 2016 10:38:28 -0700
 From: "pythondotnet" 
 To: [email protected]
 Subject: [Python.NET] Support for CLR4 .NET Remoting
 Message-ID:
 
<20161020103828.3e63f68611bc0deecd5a6dd5fef89a2f.fe160eb814.mail...@email09.godaddy.com>
 
 Content-Type: text/plain; charset="utf-8"
 
 Does pythonnet-2.1.0 support .NET Remoting? When I try to get an interface, 
python 2.7 crashes:
 
 Unhandled Exception: System.NullReferenceException: Object reference not set 
to an instance of an object.
 at Python.Runtime.ClassDerivedObject.ToPython(IPythonDerivedType obj)
 at Python.Runtime.Converter.ToPython(Object value, Type type)
 at Python.Runtime.MethodBinder.Invoke(IntPtr inst, IntPtr args, IntPtr kw, 
MethodBase info, MethodInfo[] methodinfo)
 at Python.Runtime.MethodObject.Invoke(IntPtr target, IntPtr args, IntPtr 
kw,MethodBase info)
 at Python.Runtime.MethodBinding.tp_call(IntPtr ob, IntPtr args, IntPtr kw)
 
 It's getting past these lines in my script:
 import clr
 clr.Addreference(my remoting DLL)
 from MyNamespace import *
 
 and choking on a static method in my app's remoting DLL call which returns the 
interface. Through logging, I can tell that the code in that static method call 
is successfully executing:
 (IMyInterface)Activator.GetObject(typeof(IMyInterface), url);
 and returning the object back to Python.
 
 This worked fine before when my app targeted .NET 3.5 and I used the CLR2 
version of the Python for .NET package. Now my app targets .NET 4.5.2 so I:
 - Updated to Python 2.7.12
 - Updated the copy of my app's remoting DLL in c:\python27\dll
 - Removed the old Python for .NET package
 - Executed "pip install pythonnet", which gave me version 2.1.0.
 
 In C:\Python27\Lib\site-packages\ I see:
 clr.pyd
 Python.Runtime.dll v 2.0.0.2
 Python.Runtime.dll.config
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
<http://mail.python.org/pipermail/pythondotnet/attachments/20161020/433148c7/attachment-0001.html>
 
 --
 
 Message: 2
 Date: Thu, 20 Oct 2016 13:01:48 -0500
 From: Denis Akhiyarov 
 To: "A list for users and developers of Python for .NET"
 
 Subject: Re: [Python.NET] Support for CLR4 .NET Remoting
 Message-ID:
 
 Content-Type: text/plain; charset="utf-8"
 
 Can you provide minimal reproducible code sample for both C# and Python?
 What is the latest pythonnet version in which this works?
 
 Are you testing this from interactive python or ipython? There are some
 differences between the 2 options.
 
 Please also open an issue on github.
 
 BTW, why have you not switched to WCF?
 
 Thanks,
 Denis
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
<http://mail.python.org/pipermail/pythondotnet/attachments/20161020/c7b05f88/attachment-0001.html>
 
 --
 
 Subject: Digest Footer
 
 ___
 PythonDotNet mailing list
 PythonDotNet

[Python.NET] Support for WinPython 2.7 x64

2017-07-19 Thread pythondotnet
I have a user that needs Python for .NET to work with 
https://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.9.1/
 
I'm guessing it isn't a problem that he has WinPython as opposed to regular 
CPython, but I don't see support for 64-bit on 
https://sourceforge.net/projects/pythonnet/
 
Is what he needs possible?
_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


Re: [Python.NET] PythonDotNet Digest, Vol 156, Issue 4

2017-07-20 Thread pythondotnet
Thanks Denis. How do the versions on github map to the versions on the old 
site? I need to avoid this defect:
https://github.com/pythonnet/pythonnet/issues/276
 On the old site, I could see which version was the CLR2, defect-free one 
(pythonnet-2.0-alpha2-clr2.0_py27/), but it is only 32-bt. I think the 
corresponding version on github is 2.0.0, but I can't figure out how to just 
download the 64-bit version of  2.0.0.
  
 
- Original Message - Subject: PythonDotNet Digest, Vol 156, 
Issue 4
From: [email protected]
Date: 7/20/17 10:00 am
To: [email protected]

Send PythonDotNet mailing list submissions to
 [email protected]
 
 To subscribe or unsubscribe via the World Wide Web, visit
 https://mail.python.org/mailman/listinfo/pythondotnet
 or, via email, send a message with subject or body 'help' to
 [email protected]
 
 You can reach the person managing the list at
 [email protected]
 
 When replying, please edit your Subject line so it is more specific
 than "Re: Contents of PythonDotNet digest..."
 
 
 Today's Topics:
 
 1. Support for WinPython 2.7 x64 (pythondotnet)
 2. Re: Support for WinPython 2.7 x64 (Denis Akhiyarov)
 
 
 --
 
 Message: 1
 Date: Wed, 19 Jul 2017 09:00:12 -0700
 From: "pythondotnet" 
 To: [email protected]
 Subject: [Python.NET] Support for WinPython 2.7 x64
 Message-ID:
 
<20170719090012.3e63f68611bc0deecd5a6dd5fef89a2f.3933b3b147.mail...@email09.godaddy.com>
 
 Content-Type: text/plain; charset="utf-8"
 
 I have a user that needs Python for .NET to work with 
https://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.9.1/
 
 I'm guessing it isn't a problem that he has WinPython as opposed to regular 
CPython, but I don't see support for 64-bit on 
https://sourceforge.net/projects/pythonnet/
 
 Is what he needs possible?
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
<http://mail.python.org/pipermail/pythondotnet/attachments/20170719/82ae7846/attachment-0001.html>
 
 --
 
 Message: 2
 Date: Wed, 19 Jul 2017 18:20:43 +
 From: Denis Akhiyarov 
 To: "A list for users and developers of Python for .NET"
 
 Subject: Re: [Python.NET] Support for WinPython 2.7 x64
 Message-ID:
 
 Content-Type: text/plain; charset="utf-8"
 
 Python for . NET project moved from SourceForge to GitHub in 2014.
 
 WinPython comes with pythonnet pre-installed since 2016.
 
 In any Python distribution the easiest way is to install with pip from PyPI:
 
 pip install pythonnet
 
 Other installation options here:
 
 https://github.com/pythonnet/pythonnet/wiki/Installation
 
 Thanks,
 Denis
 
 On Wed, Jul 19, 2017, 11:09 AM pythondotnet 
 wrote:
 
 > I have a user that needs Python for .NET to work with
 > https://sourceforge.net/projects/winpython/files/WinPython_2.7/2.7.9.1/
 >
 > I'm guessing it isn't a problem that he has WinPython as opposed to
 > regular CPython, but I don't see support for 64-bit on
 > https://sourceforge.net/projects/pythonnet/
 >
 > Is what he needs possible?
 > _
 > Python.NET mailing list - [email protected]
 > https://mail.python.org/mailman/listinfo/pythondotnet
 >
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
<http://mail.python.org/pipermail/pythondotnet/attachments/20170719/9940277d/attachment-0001.html>
 
 --
 
 Subject: Digest Footer
 
 ___
 PythonDotNet mailing list
 [email protected]
 https://mail.python.org/mailman/listinfo/pythondotnet
 
 
 --
 
 End of PythonDotNet Digest, Vol 156, Issue 4
 
_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


Re: [Python.NET] surveying the landscape ...

2015-06-16 Thread Ron Harding via PythonDotNet
i'm still new with ironpython, along with using python 2.7, platformio, 
pyserial, pyvisa. 
I am an EE who cross trained into MS .NET programming from embedded 
micro-controller systems development and manufacturing.   
I primarily use python on embedded linux systems such as beaglebone black, 
raspberry pi, seeeduino arch. 
although i also have netduino devices running MS .NET micro framework. 
does python.net run on .net micro framework?  
thanks
Ron
 “The desire that guides me in all I do is the desire to harness the forces of 
nature to the service of mankind.




”Nikola Tesla“Radio Power Will Revolutionize the World” (Modern Mechanix & 
Inventions, July, 1934) 


 On Tuesday, June 16, 2015 2:37 AM, Tony Roberts  wrote:
   

 Hi Adam,

from my point of view it'd be great to have more people involved. I've been 
doing some development, but more or less out of necessity (I enjoy working on 
the project when I can, but don't really have the time to commit to it much 
more than I have been unfortunately).
To give you some background around why there's the renshawbay repo as well as 
the main repo; Initially I created the renshawbay repo as there were various 
changes I needed to make to the project while it was hosted in sourceforge, and 
for me it was easier to manage that in github. I added Python 3 support, and 
later some stuff around subclassing .net classes in Python. It was then decided 
to move the project to github, so we created the pythonnet repo directly from 
the sourceforge repo rather than fork the renshawbay repo. The thinking back 
then was that we should do a 2.0 release based off that fork, and then once 
that was stable look at merging in the Python 3 work from the renshawbay fork.
So, to answer your first question - pythonnet/pythonnet is the official repo, 
but most new development (new features etc) has taken place on the 
renshawbay/pythonnet fork in the python3 branch (which maintains support for 
Python 2).
There's no official roadmap that I'm aware of. There are some issues and 
milestones in the github repo, but AFAIK no one is actively working on those 
right now. There are only a couple of issues remaining for the 2.0 release 
however.
Pull requests to the official repo are reviewed and merged by the project 
owners (of which I'm one). So far those have been bug fixes or changes 
necessary for the 2.0 release. I keep the renshawbay fork up to date with any 
commits to the main repo.
For what it's worth, here's what I'm aware of that needs attention:    - 
Finalizing and releasing to PyPI the 2.0 release for Python 2.x only    - 
Testing and getting the renshawbay python3 branch working on non-windows 
platforms (the linux build currently has problems, and I've not tested any mac 
builds)    - Merging the renshawbay python3 branch into the main pythonnet fork 
   - Updating the docs
If you're able to help at all that would be much appreciated.
Best regards,Tony

On Tue, Jun 16, 2015 at 12:08 AM Tribble, Brett  wrote:

Adam, I’m ecstatic that there’s a player out there who is making good use of 
Python.net, and who would like to help contribute. Organizational and 
logistical issues aside, I’m all for anything you can throw at the project! 
Someone correct me if I’m wrong, but I believe Brian Lloyd has largely yielded 
this project to Tony and the community. Based on Brian and  Tony’s past posts, 
I’m fairly sure they’ll welcome any and all contributions to the project. It 
may sound sacrilegious to some, but I would love to see the PTVS 
(https://pytools.codeplex.com/) folks get involved with the project. They’re 
turning out a solid product, and this fits solidly in with what Microsoft is 
trying to do with PTVS, .NET Core, Azure etc.  From: PythonDotNet 
[mailto:[email protected]]On Behalf Of Brad 
Friedman
Sent: Monday, June 15, 2015 2:36 PM
To: A list for users and developers of Python for .NET
Subject: Re: [Python.NET] surveying the landscape ... I'll chime in and say the 
lack of these kinds of legitimate "stake-holder" systems and responsibilities 
has forced me to turn away from depending my work on this project. I still keep 
up on it in hopes that it will turn around.  If a legitimate player were to 
step up and contribute to a responsible, active and stable future for the 
project, I'd likely reconsider my stance and begin active support again. It's 
hard to justify putting much into it as one guy with limited resources.  It 
needs full multi-platform release and development support both as a python 
module and a .net embedding toolkit, both for Python 2.x and 3.x.  That's a lot 
of work to commit to getting set right and maintaining.
On Jun 15, 2015, at 3:57 PM, Adam Klein  wrote:
Hello all, We are usingPython.NET at BlueMountain to interface between our 
large .NET code base and the cpython ecosystem for interactive, exploratory 
co

Re: [Python.NET] Getting an open Python file handle into CLR

2015-07-21 Thread Ron Harding via PythonDotNet
perhaps re-directed command line calls for stdin, stdout, stderr in c# 
interacting with python i/o command line calls(although in python it is common 
practice to daisy chain commands).
i have used this many times to get out of scrapes for 3rd party process calls 
in c#. 
good luck!
Ron “The desire that guides me in all I do is the desire to harness the forces 
of nature to the service of mankind.
”Nikola Tesla“Radio Power Will Revolutionize the World” (Modern Mechanix & 
Inventions, July, 1934) 


 On Monday, July 20, 2015 9:05 PM, Dan Lenski  wrote:
   

 Hi,
I posted this on StackOverflow but thought it might be a better question 
for this mailing list.

http://stackoverflow.com/questions/31530059/how-can-i-open-a-net-
filestream-object-from-a-python-file-handle

I'm trying to figure out how to transform an open Python file handle 
into a System.IO.FileStream object so that I can pass it to C# code.

Here's what I've got so far. This produces the good ol' win32 (HANDLE*) 
object, I believe:

import clr, msvcrt
from Microsoft.Win32.SafeHandles import SafeFileHandle
from System.IO import FileStream, FileAccess
from System import IntPtr, Int32, Int64

pyf=open("c:/temp/testing123.txt","w")
fileno=pyf.fileno()
print fileno              # 6
handle = msvcrt.get_osfhandle(fileno)
print handle              # 1832L

Unfortunately, I can't figure out how to convince the clr module to cast 
this handle into something that I can use as an IntPtr, as required by 
the constructors of FileStream or SafeFileHandle.

I've tried various versions of the following, but they all give me 
TypeError ("value cannot be converted to System.IntPtr"):

FileStream(IntPtr(handle), True)
FileStream(IntPtr(Int32(handle), True)
SafeFileHandle(IntPtr(handle), True)

Thanks,
Dan Lenski

_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


  _
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet

Re: [Python.NET] Getting an open Python file handle into CLR

2015-07-21 Thread Ron Harding via PythonDotNet
>how do I cast a win32 file handle to an IntPtr?

i ran into this in the past as well; specifically when i started using FTDI USB 
devices on DLPdesign development kits.  the library is written in c++ MFC code. 
 After providing data marshal/platform invoke i applied the intptr in c#.   The 
USB device that I am accessing, passes a file handle to indicate specific pass 
/ fail condition.  i.e. the first command opens a connection to the device, the 
expected handle is 'OK'.  if not one of many different possible error messages 
is passed in the file handle.  

SummaryOpen the device and return a handle which will be used for subsequent 
accesses.DefinitionFT_STATUS FT_Open (int iDevice, FT_HANDLE 
*ftHandle)ParametersiDevice Index of the device to open. Indices are 0 
based.ftHandle Pointer to a variable of type FT_HANDLE where the handle will 
bestored. This handle must be used to access the device.Return ValueFT_OK if 
successful, otherwise the return value is an FT error code.
public class Wrapper{private static IntPtr m_USBhandler;
[DllImport("FTD2XX.dll", EntryPoint="FT_Open")]public static extern uint 
FT_Open(int iDevice, ref IntPtr ftHandle);
[DllImport("FTD2XX.dll", EntryPoint="FT_Close")]public static extern uint 
FT_Close(IntPtr ftHandle);
[DllImport("FTD2XX.dll", EntryPoint="FT_Read")]public static extern uint 
FT_Read(IntPtr ftHandle, byte[] lpBuffer,uint dwBytesToRead, ref 
uintlpdwBytesReturned);
[DllImport("FTD2XX.dll", EntryPoint="FT_Write")]public static extern uint 
FT_Write(IntPtr ftHandle, byte[] lpBuffer,uint dwBytesToWrite, ref 
uintlpdwBytesWritten);
[DllImport("FTD2XX.dll", EntryPoint="FT_Purge")]public static extern uint 
FT_Purge(IntPtr ftHandle, uint dwMask);
public static bool OpenDevice(){if (((FT_Status)Wrapper.FT_Open(1, ref 
m_USBhandler)) ==FT_Status.Ok){return true;}else{return false;}}

i hope this helps you by seeing one way of applying file handles in c#. 
Ron  “The desire that guides me in all I do is the desire to harness the forces 
of nature to the service of mankind.”Nikola Tesla“Radio Power Will 
Revolutionize the World” (Modern Mechanix & Inventions, July, 1934) 


 On Tuesday, July 21, 2015 11:12 AM, Dan Lenski  wrote:
   

 Ron Harding via PythonDotNet  writes:

> perhaps re-directed command line calls for stdin, stdout, stderr in c# 
interacting with python i/o command line calls(although in python it is 
common practice to daisy chain commands).

Unfortunately, I cannot redirect the output of the C# library to a 
convenient filehandle like stdout/stderr; I need to be specify a 
FileStream object.

It pretty much comes down to this: how do I cast a win32 file handle to an 
IntPtr?

Thanks,
Dan

_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


  _
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet

Re: [Python.NET] Embedding a Python interactive shell in a .NET application

2016-05-27 Thread Ron Harding via PythonDotNet
anks,Saparya

On Tue, May 17, 2016 at 3:33 AM, Nils Becker  wrote:

Hey,
a while ago I wrote something like a light wrapper around Python.NET to embed 
CPython with numpy/scipy in a .NET GUI. It manages local/global dictionaries, 
automatically converts simple data types and numpy arrrays<->C# arrays and 
provides a plotting widget in C# that shows matplotlib plots. It also has some 
other convenience functions.
The code is by no means complete, fully tested or even nice. However, for me it 
works.
I uploaded it to github: https://github.com/Lodomir/PythonInterfaceAs it 
demonstrates some not-well documented use of Python.NET, I thought it maybe 
nice to share the code.
You will need to add the references to Python.NET to build the main project 
(PythonInterface) and additionally to the PythonInterface-DLL to build the 
examples.
CheersNils
2016-05-13 22:04 GMT+02:00 Denis Akhiyarov :

for embedding look at c# embedding unit tests and also here:
1. Old API:
http://pythonnet.github.io/readme.html

2. New simplified API using dynamic:
https://github.com/pythonnet/pythonnet/blob/master/README.md



On Thu, May 12, 2016 at 4:16 PM, Saparya K  wrote:

Thanks for your response, Denis. 
I had not come across Sho earlier. It looks very interesting. (If only Python 
3.x support was available, though it does look like they have added support for 
their own math and visualization libraries). 

I am going over the demos and the unit tests and I was able to write a simple 
console application to access .NET objects from Python. This is very 
encouraging! I am still figuring out how to embed Python code in my C# WinForms 
application (instead of a console application).
I will continue my experiments, but in the meantime if you or anyone else has 
any ideas on how to redirect the result from the Python interpreter (say, to a 
rich text box), I would love to hear them. That is one part of the puzzle that 
is unclear to me.
Thanks,Saparya
On Wed, May 11, 2016 at 4:01 PM, Denis Akhiyarov  
wrote:

This is definitely possible with WinForms or WPF. See the demo folder in 
pythonnet repo. One of the demo's is still in pull request.
You should probably just try running previous IronPython attempts using 
pythonnet and report issues if any. Have a look at Sho from Microsoft.
There is someone trying to embed ipython REPL using pythonnet/Excel-DNA or COM 
in Excel with Custom Task Pane (CTP) written in WinForms:
https://groups.google.com/forum/#!topic/jupyter/CVht4orvQtc





On Wed, May 11, 2016 at 4:44 PM, Saparya K  wrote:

Hello PythonNet,
I am looking to embed a Python interactive (REPL) shell in a .NET WinForms 
application.This C# application displays a graphical visualization of some 
data. Methods to manipulate the data in the C# application would be exposed via 
a Python API.The idea is to be able to interact with the data from the Python 
shell via the API, and thereby updating the graphical view. 

Ideally, the shell should support any valid Python syntax that is required to 
use the API. This would involve:
   
   - Querying a collection of data from the application via the Python API
   - Then manipulating this collection in the Python shell
   - Making API calls with the modified collection as an argument
I came across a few examples where an interactive shell was developed using 
IronPython. A limitation with this approach is the absence of Python 3.x 
support (and other C-compiled libraries) in IronPython. For this reason, I 
would prefer to use Python.NET if it is possible.
Has anyone here tried something like this with Python.NET before? Does it looks 
like what I am trying to achieve is feasible?

Any direction would be very helpful!
_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet



_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet



_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet



_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet



_____
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet





_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet

  _
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet

Re: [Python.NET] Update License - MIT

2016-08-02 Thread Joe Frayne via PythonDotNet
I responded to the thread with my approval of the proposed change.

Thanks,

Joe

From: Denis Akhiyarov [mailto:[email protected]]
Sent: Monday, August 01, 2016 10:39 PM
To: A list for users and developers of Python for .NET 
Cc: Joe Frayne ; [email protected]
Subject: Update License - MIT

We are in the process of updating pythonnet library to MIT license and asking 
for permission from all past contributors to change the license from legacy 
Zope Public License Version 2.0 to MIT license.

Please see discussion here:

https://github.com/pythonnet/pythonnet/issues/234

If you think that you are past contributor and not listed there, then please 
reply in this github issue.

I identified two people from sourceforge history who are not listed in github 
history:

@hardcoded and @jfrayne (Joe Frayne)

Not sure who @hardcoded is?

Brian, do you have the history before 2006?

If not, then we have to assume that you are the only contributor before 
migration to sourceforge in 2006.

Thank you,
Denis

_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet

[Python.NET] Using a List with Pythonnet

2017-05-20 Thread Matt Slezak via PythonDotNet
I have not been able to figure out this issue - I have a C# DLL that requires a 
List to be populated but it appears Pythonnet returns the integer value 
of the Enum which does not agree with the List datatype.  My question is 
posted here: PythonNET - how to put an Enum into a List? C# NET Python I 
believe there is some kind of workaround from other posts on StackExchange but 
I can't replicate that workaround.  Any help would be greatly appreciated.
  
|  
|   
|   
|   ||

   |

  |
|  
|   |  
PythonNET - how to put an Enum into a List? C# NET Python
 I have a NET library I'm using from Python with PythonNET and can't figure out 
how to put an enum into a...  |   |

  |

  |

 
_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] Fw: Using a List with Pythonnet

2017-05-20 Thread Matt Slezak via PythonDotNet
I have not been able to figure out this issue - I have a C# DLL that requires a 
List to be populated but it appears Pythonnet returns the integer value 
of the Enum which does not agree with the List datatype.  My question is 
posted here: PythonNET - how to put an Enum into a List? C# NET Python I 
believe there is some kind of workaround from other posts on StackExchange but 
I can't replicate that workaround.  Any help would be greatly appreciated.



  
|  
|  
|  
|   ||

  |

  |
|  
|   |  
PythonNET - how to put an Enum into a List? C# NET Python
 I have a NET library I'm using from Python with PythonNET and can't figure out 
how to put an enum into a...  |   |

  |

  |

 


   _
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] Newbie question - does the NET DLL have to be compiled with the same compiler version as Python

2017-05-21 Thread Matt Slezak via PythonDotNet
I have wrapped a project and it does everything except calculate the results 
(blah).  In Cython I know I had to compile Python add-ins with Visual Studio 
2015 for Python 3.5.  The NET DLL I am using was compiled with Visual Studio 
2013.  Could this be a problem?  Or does PythonNET not care about the compiler 
used for DLLs?
Much appreciated.
Matt Slezak_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


Re: [Python.NET] Newbie question - does the NET DLL have to be compiled with the same compiler version as Python

2017-05-21 Thread Matt Slezak via PythonDotNet
Just FYI the error I get trying to calculate results (I have an equivalent 
MATLAB wrapper that works):
QCLSpread.CalculateResults()Traceback (most recent call last):
  File "", line 1, in     
QCLSpread.CalculateResults()
Exception: QCLDispatch.QclSpreadOpt   at 
QclEndurAdapter.QclSpreadOption.CalculateResults()
The NET DLL was compiled with Visual Studio 2013 and Python 3.5 uses Visual 
Studio 2015 I don't know if that's the problem but I can recompile the NET DLL 
if so.  Otherwise if anyone has ideas on how to get more information on the 
error that would be greatly appreciated.  The error is not very clear in a 
troubleshooting sense. 

On Sunday, May 21, 2017 10:55 AM, Matt Slezak via PythonDotNet 
 wrote:
 

 I have wrapped a project and it does everything except calculate the results 
(blah).  In Cython I know I had to compile Python add-ins with Visual Studio 
2015 for Python 3.5.  The NET DLL I am using was compiled with Visual Studio 
2013.  Could this be a problem?  Or does PythonNET not care about the compiler 
used for DLLs?
Much appreciated.
Matt Slezak_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


   _
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


Re: [Python.NET] Newbie question - does the NET DLL have to be compiled with the same compiler version as Python

2017-05-22 Thread Matt Slezak via PythonDotNet
I fixed it, it was a huge wrapper and I missed 1 variable.  All working now.  
Testing the speed vs a MATLAB wrapper we'll see which is better.  It would be 
nice if PythonNET could be put in a nogil Cython loop with prange (OpenMP) to 
get multiple processors, although from the FAQ looks like that's not possible.  
Best,
Matt Slezak

Sent from Yahoo Mail on Android 
 
  On Sun, May 21, 2017 at 10:55 AM, Matt Slezak via 
PythonDotNet wrote:   I have wrapped a project and it 
does everything except calculate the results (blah).  In Cython I know I had to 
compile Python add-ins with Visual Studio 2015 for Python 3.5.  The NET DLL I 
am using was compiled with Visual Studio 2013.  Could this be a problem?  Or 
does PythonNET not care about the compiler used for DLLs?
Much appreciated.
Matt Slezak_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet
  
_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] Creating an Installer for C# Apps that use Python.Runtime

2018-03-20 Thread Andrew Yang via PythonDotNet
Hi All,
This might be a really dumb question, but I was wondering how can I create an 
installer for a C# wpf app, that uses pythonnet's Python.Runtime.dll? 
Currently, I've created a python module, imported the module in "using 
(Py.GIL())", and called some functions I've written. What methods are there to 
allow a user who does not have Python installed to be able to install and use 
my app (with or without having to install python)? I'm not sure if this is 
relevant, but I'm only importing from modules I've written or __builtin__ in 
the module used in my C# app.
Additionally, is the Python.Runtime.dll that I build on my machine compatible 
with my users'?
Best regards,Andrew_____
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] Speeding Up Pythonnet

2018-05-22 Thread Jared Broad via PythonDotNet
Hi All, my first post here =)

We're using Pythonnet in LEAN - an open source algorithmic trading
platform. We load the python object and then we make it look like a C#
interface
<https://github.com/QuantConnect/Lean/blob/master/AlgorithmFactory/Loader.cs#L170>
.

Each time a method/property is called we see 75% of the time being spent in
Pythonnet; and only 10-25% being actual work.

The raw C# version of LEAN runs up to 20x faster than our python layer;
we're looking for suggestions on how to improve the speed of the library /
C#-Py interop.

Thanks
Jared


-- 
Jared Broad

www.quantconnect.com
Phone-USA: +1 917 327 0556
*Democratizing Finance, Empowering Individuals*
Facebook <http://www.facebook.com/QuantConnect> | Twitter
<https://twitter.com/#!/QuantConnect> | LinkedIn
<http://www.linkedin.com/company/quantconnect> | Skype: jaredbroad

We're recruiting! Join us and make your mark on the future of finance
<https://www.quantconnect.com/jobs>
_____
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] Tips for Debugging?

2018-07-09 Thread Jared Broad via PythonDotNet
Hello PythonNet

Do you have any tips/experiences/tools for allowing debugging for a
C#-pythonnet script?

Thank you
Jared

-- 
Jared Broad

www.quantconnect.com
Phone-USA: +1 917 327 0556
*Democratizing Finance, Empowering Individuals*
Facebook <http://www.facebook.com/QuantConnect> | Twitter
<https://twitter.com/#!/QuantConnect> | LinkedIn
<http://www.linkedin.com/company/quantconnect> | Skype: jaredbroad

We're recruiting! Join us and make your mark on the future of finance
<https://www.quantconnect.com/jobs>
_____
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


[Python.NET] Fwd: Tips for Debugging?

2018-07-28 Thread Alex Catarino via PythonDotNet
Hi pythonnet team,

I followed your tutorials ( https://github.com/pythonnet/
pythonnet/wiki/Various-debugging-scenarios-of-embedded-CPython) and I could
test two out of three scenarios (I couldn't get ptvsd to work).
When I tested it on Lean, I've verified that we don't get much information
with the mixed-mode cross-language debugger, so I extended your example
with a mock Lean algorithm:
https://github.com/QuantConnect/pythonnet/tree/debug

First scenario - mixed-mode cross-language debugger (attached file:
mixeddebugger.png):
The debugger doesn't give us the information about the object if we
click/mounse over on it or inspect it in Locals/Watch. We need to know what
attributes it has to access them in "Immediate Window".

Second scenario - python debugger  (attached file: pythondebugger.png):
The debugger does show the information.

The issue with the python debugger is that as we are using threads in Lean,
we need to detach and reattach on every iteration in this code snippet the
emulates the OnData call:

Task.Factory.StartNew(() =>
{
algorithm.Run();

}).ContinueWith((ant) =>
{
algorithm.Initialize();

}).ContinueWith((ant) =>
{
algorithm.OnData(DateTime.UtcNow.ToString());
algorithm.OnData(DateTime.UtcNow.ToString());
algorithm.OnData(DateTime.UtcNow.ToString());

}).Wait();

I have tried to attach the debugger in different places in the python
script. If I call it in module level, breakpoints are never hit in the
algorithm. If I call it in Initialize, only breakpoints in Initialize are
hit. And finally, if I call it in OnData, I need to detach and reattach on
every OnData call from the block above.

Best regards,
Alex


On Wed, Jul 25, 2018 at 12:13 AM, Denis Akhiyarov  wrote:

> I wrote a debugging tutorial using PTVS here and further improvements are
> welcome!
>
> https://github.com/pythonnet/pythonnet/wiki/Various-debuggin
> g-scenarios-of-embedded-CPython
>
>
> On Tue, Jul 10, 2018, 2:13 AM Jared Broad via PythonDotNet <
> [email protected]> wrote:
>
>> Hello PythonNet
>>
>> Do you have any tips/experiences/tools for allowing debugging for a
>> C#-pythonnet script?
>>
>> Thank you
>> Jared
>>
>> --
>> Jared Broad
>>
>> www.quantconnect.com
>> Phone-USA: +1 917 327 0556
>> *Democratizing Finance, Empowering Individuals*
>> Facebook <http://www.facebook.com/QuantConnect> | Twitter
>> <https://twitter.com/#!/QuantConnect> | LinkedIn
>> <http://www.linkedin.com/company/quantconnect> | Skype: jaredbroad
>>
>> We're recruiting! Join us and make your mark on the future of finance
>> <https://www.quantconnect.com/jobs>
>> _____
>> Python.NET mailing list - [email protected]
>> https://mail.python.org/mailman/listinfo/pythondotnet
>>
>
_
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


Re: [Python.NET] Embedded Python .Net example - running scripts

2018-10-03 Thread Ron Harding via PythonDotNet
 it I get:
 
default, Mar 29 2018, 13:32:41
 
[MSC v.1900 64 bit (AMD64)]
 
win32
 
python
 
  
 
F:\Anaconda3\python36.zip;F:\Anaconda3\Lib;F:\Anaconda3\DLLs;C:\MX6
 
  
 
And the second time I run it I get:
 
default, Mar 29 2018, 13:32:41
 
[MSC v.1900 64 bit (AMD64)]
 
win32
 
pyth???
 
???
 
F:\Anaconda3\python36.zip;F:\Anaconda3\Lib;F:\Anaconda3\DLLs;C:\MX6
 
  
 
And the application doesn’t crash! Instead it just says the skimage module 
can’t be found. Notice the bolded lines (bold added after the fact). The 
program name and python home values are being corrupted.
 
Is there something I am doing wrong as far as taking down the PythonEngine such 
that it could be put back up in an as-new state later on?
 








Steve





Please be advised that this email may contain confidential information. If you 
are not the intended recipient, please notify us by email by replying to the 
sender and delete this message. The sender disclaims that the content of this 
email constitutes an offer to enter into, or the acceptance of, any agreement; 
provided that the foregoing does not invalidate the binding effect of any 
digital or other electronic reproduction of a manual signature that is included 
in any attachment._____
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet
  
_____
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet
_____
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet


Re: [Python.NET] PythonDotNet Digest, Vol 175, Issue 3

2019-06-11 Thread Jared Broad via PythonDotNet
QuantConnect's questions for the community:

- Who are you? Where are you based? Are you an individual or a company?

- Out of 10, 1 being a low priority, 10 being critical to survival, where
would you place PythonNet's priority in your organization?

- Are you winning to sponsor the project to hire a full-time developer?
(e.g. 10 companies, $500 ea).

- Order the following priorities for PythonNet future from first is most
important: *Speed, Stability, Python Version Support, Supported Features
(e.g. named args), Documentation, Promotion/Website, **Support for **Community
Questions*





ᐧ

On Tue, Jun 11, 2019 at 8:31 AM  wrote:

> Send PythonDotNet mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.python.org/mailman/listinfo/pythondotnet
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PythonDotNet digest..."
>
>
> Today's Topics:
>
>1. Re: pythonnet development (Denis Akhiyarov)
>2. Re: pythonnet development (David Lassonde)
>
>
> --
>
> Message: 1
> Date: Mon, 10 Jun 2019 22:10:57 -0500
> From: Denis Akhiyarov 
> To: "A list for users and developers of Python for .NET"
> 
> Cc: Benedikt Reinartz 
> Subject: Re: [Python.NET] pythonnet development
> Message-ID:
> <
> calxxjlrxg0sv0iqxf--kgoyw3yvahm-enn8hfcx5-ekx-ft...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> We are planning to have a conversation about the future of the project and
> most important questions with developers who responded. Please reply if you
> are interested in joining this chat.
>
> On Sat, Jun 8, 2019, 12:00 AM Victor ?LOST? Milovanov <
> [email protected]>
> wrote:
>
> > What do you mean by ?reach out in GitHub repo?? Is there an issue for
> this
> > we could comment on?
> >
> >
> >
> > I could consider stepping up, but
> >
> >
> >
> >1. I am relatively new to the project, and
> >2. My interest only lies in ensuring Python.NET continues to work from
> >.NET. I?d be very sloppy responding to anything related to reverse
> >embedding.
> >
> > So it is only possible, if there is someone else with more experience
> with
> > the project.
> >
> >
> >
> > At this moment I don?t even fully understand its architecture (which
> could
> > be fixed by a Skype session, or, much better, 1-2 in-person meetings).
> >
> >
> >
> > Regards,
> >
> > Victor
> >
> >
> >
> > *From: *Denis Akhiyarov 
> > *Sent: *Friday, June 7, 2019 3:47 PM
> > *To: *A list for users and developers of Python for .NET
> > 
> > *Cc: *Benedikt Reinartz 
> > *Subject: *Re: [Python.NET] pythonnet development
> >
> >
> >
> > Hi Victor,
> >
> >
> >
> > Are you interested in getting involved? Please reach out in GitHub repo.
> > If anyone is really serious about this commitment, please send me a
> private
> > message. I received some private interest as well as a Twitter thread:
> >
> >
> >
> > https://mobile.twitter.com/denfromufa/status/1137032838287699969
> >
> >
> >
> > On Fri, Jun 7, 2019, 12:45 PM Victor ?LOST? Milovanov <
> > [email protected]> wrote:
> >
> > Hi Denis,
> >
> >
> >
> > Who are the current maintainers of Python.NET repo?
> >
> >
> >
> > Regards,
> >
> > Victor
> >
> >
> >
> > *From: *Denis Akhiyarov 
> > *Sent: *Friday, June 7, 2019 6:31 AM
> > *To: *A list for users and developers of Python for .NET
> > 
> > *Cc: *Benedikt Reinartz 
> > *Subject: *[Python.NET] pythonnet development
> >
> >
> >
> > I would like to step down from pythonnet development, this mailing list,
> > and helping out on stackoverflow.
> >
> >
> >
> > If someone is interested in moderating this mailing list, please reach
> out
> > to me.
> >
> >
> >
> > Thanks,
> >
> > Denis
> >
> >
> >
> > _
> > Python.NET mailing list - [email protected]
> > https://mail.python.org/mailman