[IronPython] deepcopy() in IRONPY
Pigneri, Rocco
rpigneri at LavaStorm.com
Fri Mar 28 15:39:37 CET 2008
Bernd,
I played around with this a lot myself when I was using IPS. The only
solution I could find was to add an import statement to the top of any
file in which I wanted to use that code. The concept of building a
"reference" as in C# is not yet supported in IPS.
I seem to recall being told that if you need to, you can also add paths
to sys.path in order to add things that are not in standard Python
paths; however, I myself haven't done this as I think that IPS just adds
the regular Python paths that it finds.
Hope that helps,
Rocco
________________________________
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Bernd Viehmann
Sent: Friday, March 28, 2008 7:32 AM
To: Discussion of IronPython
Subject: Re: [IronPython] deepcopy() in IRONPY
Thanks much for the answers. The own implementation of copy is the best
solution for me. It works.
But allow me one question regarding the usage of "standard" CPython
modules.
Who can i use them when using the IronPython-Studio? Haven't found any
config-items inside yet.
Thank you and regards
Bernd
2008/3/27, Dave Fugate <dfugate at microsoft.com>:
If you replace 'deepcopy(x)' with 'copy(x)' below it should
workJ
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Dave Fugate
Sent: Thursday, March 27, 2008 9:56 AM
To: Discussion of IronPython
Subject: Re: [IronPython] deepcopy() in IRONPY
We sort of have a similar problem with respect to IronPython
tests - the tests we ship on CodePlex need to run without dependencies
on standard CPython libraries. What we did for the case of the 'copy'
module was to reimplement the functionality needed in pure Python. For
example, a naive implementation of copy.deepcopy might look like the
following:
def copy(y):
if type(y)!=list:
return y
ret_val = list(y)
return [deepcopy(x) for x in ret_val]
Hope that helps!
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Bernd Viehmann
Sent: Wednesday, March 26, 2008 10:21 PM
To: Discussion of IronPython
Subject: Re: [IronPython] deepcopy() in IRONPY
Hi Curt,
thanks, but I am not allowed to install FePy on the
Production-Server. So I need a solution with pure IronPython ;-).
Regards
Bernd
2008/3/26, Curt Hagenlocher <curt at hagenlocher.org>:
On Wed, Mar 26, 2008 at 8:04 AM, Bernd Viehmann
<bernd.viehmann at googlemail.com> wrote:
>
> How can i use the copy-module-functionality in ipy?
Have you tried just using the py files that ship with CPython?
You can get a distribution of IronPython that incorporates these
files
from Seo's FePy project at http://fepy.sourceforge.net
--
Curt Hagenlocher
curt at hagenlocher.org
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080328/8da18592/attachment.html>
More information about the Ironpython-users
mailing list