Some files were moved some time after being imported from svn. You need to
use --follow to follow renames/moves, i.e:
git log --follow src/embed_tests/pyimport.cs
All commits from svn were imported into git (and are still there). The one
you mention is here:
https://github.com/pythonnet/pythonnet
Hi Henning,
the best way to get a change or fix into the pythonnet is to submit it as a
pull request to the github repo, along with a description of the problem
the PR solves and appropriate unit tests.
The github repo can be found here: https://github.com/pythonnet/pythonnet
Kind regards,
Tony
ine.Initialize(), but I got the same problem (re ‘copy_reg’ not
>> found).
>> Any other suggestions?
>> --
>> Cameron Hayne
>> cameron.ha...@introspect.ca
>>
>>
>> On Apr 19, 2016, at 4:37 PM, Tony Roberts wrote:
>>
>> > No need to i
No need to import the c Python extension - from IronPython you would be
able to reference the Python.runtime assembly without it. The problem
you're having sounds like the python path isn't correct for cPython. You
could try setting the PYTHONHOME environment variable and see if that gets
you any f
would be particularly appreciated.
Contributors/github users: please note I have merged the develop branch
back into master and pull requests will now be accepted against the master
branch.
Best regards,
Tony Roberts
www.pyxll.com
_
Python.NET ma
Hi,
yes, deriving from a python class in Python that itself is derived from a
.net class doesn't work. Apologies, if I'd known that was what you were
doing I could have saved you some time by telling you that earlier.
AFAIK this hasn't been created as an issue in github, so please if you
could do
ok? seems like people were able to do this in ironpython:
>
> http://stackoverflow.com/questions/3856905/
>
> On Sun, Apr 3, 2016 at 10:40 AM, Tony Roberts wrote:
>
>> Yeah, it looks like the crash is probably because of the missing event
>> implementation as suspected. I&
Yeah, it looks like the crash is probably because of the missing event
implementation as suspected. I'm a bit surprised that it didn't fail
earlier when trying to instantiate the type.
If you do get a chance to take a look at adding that functionality be sure
to submit a pull request!
Best regard
What's the full stack trace?
I suspect it's something to do with the event declared on the interface not
being implemented. The managed type constructed doesn't define any events,
so that would cause the construction of the type of fail - which is
probably the error you're getting (although withou
When the tuple is destroyed each of the members will have their reference
count decremented. The tuple 'steals' the references of the members when
it's constructed, hence why there's the call to Incref and no need for a
corresponding decref. This happens in the Python C API and so there's no
need t
You have to decorate the methods you want to expose to .net with the
clrmethod decorator, e.g.
class MyClass(IInterface):
@clrmethod(int, [str])
def overridden_method(self, x):
return len(x)
The parameters to the clrmethod decorator are the method return type and
argument types. Y
fter I ran that statement 5 thousand times I got this:
>>>
>>>
>>> [image: Imagem inline 1]
>>>
>>>
>>> As you can see more that 12 thousand instances of “PyInt” and more than
>>> 6 thousand of “PyObject” are created . Apparently it is cre
my code and this just happens when I
> call “AsManagedObject”.
>
>
>
> Let me know if there is a newer version that could probably have that
> problem fixed which I am not aware of.
>
>
> I appreciate a lot your help!
>
>
>
> Best regards,
>
> Eliana
>
Hi Eliana,
which version of pythonnet are you using? when you say you're using the
latest are you building it yourself from the develop branch on github?
I had a quick look at the code that converts from a python object to a
double, and I don't see any obvious memory leaks there. Perhaps the leak
Look at .travis.yml or the travis-ci jobs to see how to build on Linux.
Tony
On Thu, Sep 10, 2015 at 10:35 PM Denis Akhiyarov
wrote:
> You need to change the configuration of build to Mono from Win. Maybe
> MonoDevelop supports this for solution/project files? If you build using
> setup.py wha
Hi,
take a look at setup.py. That's the easiest way to build it for Python 3.4
(you can use the solution, but you'll need to edit some settings - check
setup.py to see what it sets). You should be able to modify setup.py to
make it pick up VS 2015 easily enough.
regards,
Tony
On Wed, Sep 2, 201
Hi Denis,
you can use the remote debugger in PyCharm to attach to your .NET process.
It requires a small bit of python code in your application to make it
connect to the PyCharm debug server, but it works very well.
See the instructions here:
http://blog.jetbrains.com/pycharm/2010/12/python-remot
Hi,
looks like this just hasn't been implemented yet. I don't think it's
specific to the 3.4 build.
Could you create a github issue with your example if you get a chance? (
https://github.com/pythonnet/pythonnet/)
If you want to have a go at implementing it yourself, take a look at the
classes D
Hi,
I've merged the changes from the renshawbay/pythonnet fork into the develop
branch in pythonnet/pythonnet and released it as 2.1.0.dev1.
Binary wheels for windows (2.6 to 3.4, x86 and x86_64) have been uploaded
to PyPI, along with the source dist for Linux and Mac. You can install it
with pip
Hi,
I've finally gotten round to finishing off the last couple of things that
were blocking an 'official' 2.0.0 release (to do with packaging as
wheels/source dist).
There is now a 2.0.0 release available on PyPI (
https://pypi.python.org/pypi/pythonnet), with binary wheels for Windows (32
and 64
Hi Germano,
It helps to look at the full exception and stack trace, not just the
exception type. In this case you probably got this error
"System.InvalidOperationException: The calling thread must be STA, because
many UI components require this." which tells you that the main thread
you're calling
Hi Vincenzo,
are you using the pythonnet/pythonnet repo on github? If so, you can modify
the setup.py file to build a debug version (set CONFIG="Debug" near the top
of the file). You can then attach the visual studio debugger to your python
process and step through the C# code. If you're using the
ground, I was a major contributor to the pandas
> library for a time; my firm is behind the Deedle library (
> https://github.com/BlueMountainCapital/Deedle).
>
> To state the obvious, the project has proven hugely valuable. BlueMountain
> has an interest in making sure the library doe
Hi,
I seem to remember some problems possibly related to this... those binaries
you've found are quite old now. As a first set I would recommend checking
out the latest source from github and building the pythonnet binaries
yourself. It should be as simple as running "python setup.py install" (or
Looks like a copy and paste error from RunString(string code) to me.
If you want to send a pull request to fix it (with a unit test if you have
one - I don't think RunString is currently covered by the tests) I'll merge
it.
thanks!
Tony
On Mon, Jun 8, 2015 at 7:52 AM Nils Becker wrote:
> Hell
This is one of the features I added to this fork:
https://github.com/renshawbay/pythonnet
It's not yet integrated into the main repo, but you can build it from the
source in github.
Take a look at the test_subclass.py unit test here:
https://github.com/renshawbay/pythonnet/blob/python3/src/tests/
That fix is in the develop branch on github (
https://github.com/pythonnet/pythonnet.git). You should be able to build it
from there just by running the setup.py script, e.g.
python setup.py install
cheers,
Tony
On Tue, Dec 2, 2014 at 6:55 AM, Hans Peter Jepsen wrote:
> Hi all
>
> I also ran
Hi Noel,
any python ide should work fine. If you're using windows you can just use
your regular python and import the clr module without using npython
(npython is useful for linux where some distros have python built a certain
way that means the clr module can't be imported). You could take a look
Hi,
probably your python has not been compiled with --enable-shared, and so it
ends up loading the python core twice (once in the executable, and again in
the so referenced by the pythonnet module). This means that the one
pythonnet is using doesn't get initialized correctly.
You could try buildi
Should be fixed now. Please re-open if it's still a problem (
https://github.com/renshawbay/pythonnet/issues/13).
cheers,
Tony
On Tue, Sep 30, 2014 at 4:57 PM, Tony Roberts wrote:
> Hi Serge,
>
> I see what you're saying. It would think that bit just needs to be moved
>
Hi Serge,
I see what you're saying. It would think that bit just needs to be moved
until after we're sure python has been initialized so it works in both
cases. I don't see any need to move it into a separate python module;
having it compiled into one is cleaner IMHO. If you're not subclassing .NE
Thanks Serge, that's done.
cheers,
Tony
On Mon, Sep 1, 2014 at 7:28 AM, Serge WEINSTOCK <
serge.weinst...@uk.bnpparibas.com> wrote:
> It took me sometime to figure that I have to first fork, create a
> branch, apply the patch, commit and create a pull request but I think I
> have now understoo
Hi Serge,
I don't see your pull request here
https://github.com/renshawbay/pythonnet/pulls, and I can't see your fork.
Could you send me the url of your fork and I'll take a look if I can pull
the changes from there?
If you want to have another go at creating the pull request this might help:
this might help:
https://help.github.com/articles/creating-a-pull-request
Best regards,
Tony
p.s. Apologies for the previous incomplete mail. My fat fingers sent it
early!
On Wed, Aug 27, 2014 at 5:33 PM, Tony Roberts wrote:
> Hi Serge,
>
> I don't see your pull request here
&g
Hi Serge,
ah great, good spot.
Certainly, please send a pull request to the github repo and I'll merge it.
thanks,
Tony
On Tue, Aug 26, 2014 at 1:07 AM, Serge WEINSTOCK <
serge.weinst...@uk.bnpparibas.com> wrote:
> Hi Tony,
>
> I think I've found the issue:
> The signatures of Py_SetPythonHom
Hi Serge,
sorry, not sure why one would work and not the other. For what it's worth,
I've been using the 3.2 x64 version for some time now, both for calling
.NET from python and for embedding Python into a .NET application without
any problem like the ones you describe.
What I suggest you try is
Hi Serge,
'mbcs' is what python uses to mean the current configured encoding. I would
guess that the encoding of sys.stdout is different when using visual studio
output console than the console.
You could try a different encoding method by setting the PYTHONIOENCODING
environment variable before
> about this.
>
> Again, thank you very much for your help!
>
>Beckett
>
> > Date: Wed, 18 Jun 2014 19:30:30 +0100
> > From: Tony Roberts
> > To: "A list for users and developers of Python for .NET"
> >
> > Subject: Re:
-bit base install.
> Would this possibly be the problem?
>
>Beckett
>
> > Date: Tue, 17 Jun 2014 22:58:21 +0100
> > From: Tony Roberts >
> > To: "A list for users and developers of Python for .NET"
> > >
> > Subject: Re: [Python.NET]
sual C++ 2010 Express. And I also tried Visual Studio 2012
> Express too. (Making sure to adjust my environment path accordingly.)
>
> I just want to confirm that this is indeed a compiler issue and doesn't
> have to do with the pythonnet code itself.
>
> Thanks,
>Bec
Hi,
use setupwin.py instead of setup.py in the renshawbay repo to build it.
cheers,
Tony
On Fri, Jun 13, 2014 at 5:18 PM, Beckett Simmons wrote:
> Hello all,
>
> I am trying to get pythonnet to build with python 3.4. I am on a Windows 7
> 64-bit machine and specifically want to use Python 3.4
rom this branch? That's a problem. Python.net <http://python.net/> is
> also used to embed python. Therefore, it should build from IDE on all
> platforms and also from an autotools system.
>
>
> On Jun 4, 2014, at 6:15 AM, Tony Roberts wrote:
>
> Hi Adam,
>
> tha
Hi Adam,
that 2.0.0.beta1 build was built from the source on github here:
https://github.com/pythonnet/pythonnet
You should build it using the setup.py script and not in the IDE.
There are CI builds setup for both windows and linux (see README.md) if you
want to see exactly how the wheel gets bu
may be an issue on
> my end.
>
>
>
> John
>
>
>
> *From:* PythonDotNet [mailto:pythondotnet-bounces+jgill=
> tokiomillennium@python.org] *On Behalf Of *Tony Roberts
> *Sent:* Wednesday, April 09, 2014 8:59 AM
> *To:* A list for users and developers of Pyth
Hi Jon,
add clr.AddReference("System.Collections") to your code before the import.
I'll take a look at why that warning message doesn't have the correct
assembly name.
cheers,
Tony
On Wed, Apr 9, 2014 at 12:36 PM, John Gill wrote:
> I just upgraded to pythonnet 2.0 - thanks to "pip install -p
I'm not familiar with how to build the pythondotnet source.
>>>
>>>
>>> On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote:
>>>
>>>> My mistake Tony,
>>>>
>>>> I was using the 2.0 CLR version of pythondotnet which doesn'
> statement.
>
>
> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote:
>
>> Hi,
>>
>> if your class has a constructor then the class docstring will get
>> replaced with a description of the constructor, even if you explicitly gave
>> the class a d
Hi,
if your class has a constructor then the class docstring will get replaced
with a description of the constructor, even if you explicitly gave the
class a docstring using DocStringAttribute.
I've created an issue for github for this and fixed it:
https://github.com/pythonnet/pythonnet/issues/1
Hi David,
that would seem to fit with the way most other projects work, and should
make it easier for anyone looking for the project on github to find it.
I'm happy to help out with the migration and maintenance if it is decided
to go ahead with this. The fork I created doesn't have the history f
eally prefer to get
super() working. If anyone has any ideas about how to get that working
please let me know...
cheers,
Tony
On Wed, Oct 9, 2013 at 10:27 AM, Tony Roberts wrote:
> Hi,
>
> am I right in thinking that currently when managed types are subclassed in
> python the pyth
Hi,
am I right in thinking that currently when managed types are subclassed in
python the python methods can't override the base class methods when called
from .net?
It would be useful to be able to do this for something I'm working on at
the moment, and before I started looking at it I wondered
Yes, I made some changes to get it working in Python 3 a while ago. The
code's on github: https://github.com/tonyroberts/pythonnet.
I've tested it with 3.3 x64 and it works ok for me (although I've only
really used the 3.2 x64 build extensively).
regards,
Tony
On Fri, Jul 5, 2013 at 3:56 AM, Ky
Hi David,
sure, you can get the code from here:
https://github.com/tonyroberts/pythonnet
and I put some pre-built binaries here: http://www.pyxll.com/pythonnet/
Tony
On Mon, Jun 3, 2013 at 5:38 AM, David Lechner wrote:
> On 2/28/2013 9:23 AM, Tony Roberts wrote:
>
>> If someon
Hi Alex,
you can import the clr module in the standard cPython interpreter, so I
don't think there's any need to use nPython. You just need to make sure
that the clr.pyd module is somewhere on your pythonpath.
regards,
Tony
On Wed, Mar 20, 2013 at 4:16 PM, Alex Campbell wrote:
> Hi,
>
> We ne
hing still works the same with older versions of python.
cheers,
Tony
On Tue, Feb 26, 2013 at 6:35 PM, Tribble, Brett wrote:
> This is crazy talk!
>
> ** **
>
> *From:* PythonDotNet [mailto:pythondotnet-bounces+btribble=
> ea@python.org] *On Behalf Of *Tony Roberts
&g
Hi,
I've made the necessary changes to the Python for .NET package for it to
work with Python 3.
What's the best way to get this integrated back into the main project? Can
I get access to the svn repo and check it into a branch for peer review and
integration? Or should I email someone a patch fi
56 matches
Mail list logo