Re: [IronPython] How to place static class in script name space

2011-06-14 Thread Markus Schaber
Hi, Tom,

Von: Tom Unger

> But I want to eliminate the need for each script to do that import by setting 
> up the scope with:
> scriptScope.SetVariable("App", App);
> This does not compile because App is a static class, not an object.  

Maybe scriptScope.SetVariable("App", 
DynamicHelpers.GetPythonTypeFromType(typeof(App))) can help here?

The C# typeof() operator returns the .NET type object (the same as you get from 
GetType() of an instance), and the DynamicHelpers.GetPythonTypeFromType() 
method returns the corresponding python type object for that .NET type.

I successfully used it to expose types (constructors, static members) to 
IronPython 2.6 scripts.

(DynamicHelpers is defined in the IronPython.Runtime.Types namespace.)

HTH,
Markus

 
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] memoryview / passing string data to a C functionwithout copying

2011-05-31 Thread Markus Schaber
Hi, Peter,

> Von: users-boun...@lists.ironpython.com [mailto:users-
[...]
> 
>  Does anyone know how to pass the contents of a string to a C
function
> without copying it?

A non-pythonic suggestion:

Maybe you could use the .NET System.FileStream to read the data into a
byte array (or a .NET memory stream), and pass that one to the cFunc?

Or you wait for IronPython 3 which has better support for byte data.

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] how to generate multiple concurrent scriptignengines?

2011-04-19 Thread Markus Schaber
Hi,

 

You can re-read the thread at 
http://lists.ironpython.com/pipermail/users-ironpython.com/.

 

The fastest possibility is:

- Fetch the IronPython source.

- Patch PythonContext.GetEqualSite yourself according to the description in the 
thread.

- Use your own compiled version.

 

Grüße,

Markus

 

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von surangika ranathunga
Gesendet: Dienstag, 19. April 2011 04:28
An: Discussion of IronPython; Jeff Hardy
Betreff: Re: [IronPython] how to generate multiple concurrent scriptignengines?

 

Hi,

Sorry I missed the posts on this thread. This is the code that caused me the 
problem (I posted this in the first post of the thread)

So according to your mails, I take that this is due to a bug in the ironpython 
code. Is there a way I can have some alternative work-out, something that I can 
do through my code? (i'm in kind of a hury to finish the project :S )

 

ScriptEngine engine = Python.CreateEngine();

ScriptRuntime runtime = engine.Runtime;

ScriptScope scope = runtime.CreateScope();

ops = engine.Operations;

try

{

ScriptSource source = engine.CreateScriptSourceFromFile("ironpython.py");

source.Execute(scope);

string class_param = rule;

object[] parameters = new object[1];

parameters[0] = class_param;

object klass = scope.GetVariable("model_checker");

object instance = ops.Invoke(klass, parameters);

method = ops.GetMember(instance, "check_model");

}

catch (Exception e)

{

Console.WriteLine(e.ToString());

}

 

 



--- On Thu, 14/4/11, Jeff Hardy mailto:jdha...@gmail.com> > 
wrote:


From: Jeff Hardy mailto:jdha...@gmail.com> >
Subject: Re: [IronPython] how to generate multiple concurrent scriptign 
engines?
To: "Discussion of IronPython" mailto:users@lists.ironpython.com> >
Cc: "surangika ranathunga" mailto:lady_ra...@yahoo.com> >
Received: Thursday, 14 April, 2011, 7:35 AM

As long as you have a ScriptScope per thread, you should be able to
share the ScriptEngine & Runtime between threads.

What is the exception that you are getting? If it's a GUI program,
remember that UI elements can only be manipulated from the main
thread.

- Jeff

On Thu, Apr 14, 2011 at 1:02 AM, surangika ranathunga
http://nz.mc1102.mail.yahoo.com/mc/compose?to=lady_ra...@yahoo.com> > wrote:
>
> Hi,
> I am using Ironpython to connect to a legacy python code from C#.
> I am not fully familiar with Ironpython, but managed to get it 
working for a single-threaded application.
> This is how I implemented this:
>
> ScriptEngine engine = Python.CreateEngine();
> ScriptRuntime runtime = engine.Runtime;
> ScriptScope scope = runtime.CreateScope();
> ops = engine.Operations;
> ScriptSource source = 
engine.CreateScriptSourceFromFile("ironpython.py");
> source.Execute(scope);
> string class_param = rule;
> object[] parameters = new object[1];
> parameters[0] = class_param;
> object klass = scope.GetVariable("model_checker");
> object instance = ops.Invoke(klass, parameters);
> method = ops.GetMember(instance, "check_model");
>
> Now I want to make my application multi-threaded, and I want to have 
concurrently running scripting engines. Essentially, these engines should 
access the same underlying python code, and hence these scripting engines are 
identical to each other.
> Without any change, the above code works fine for most of the time 
for a multi-threaded application. However, there is an exception that appears 
from time to time, and I suspect that it is due to a concurrency issue.
>
> Is there anything specific that I should do to generate multiple 
scripting engines running in separate threads without interfering with each 
other?
>
> any ideas greatly appreciated
>
> ___
> Users mailing list
> Users@lists.ironpython.com 
 
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] AttributeError : System.Drawing.Graphics is "read-only"

2011-04-18 Thread Markus Schaber
Hi, Niko,

A small self-contained running example would be nice.

I tried to guess some of the missing context, and now get the exception that 
MainForm has no _paint member.

Regards,
Markus


> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von NikoVFR
> Gesendet: Montag, 18. April 2011 15:31
> An: users@lists.ironpython.com
> Betreff: Re: [IronPython] AttributeError : System.Drawing.Graphics is
> "read-only"
> 
> 
> class MainForm(Form):
>   def MainFormPaint(self, sender, e):
>   print "MainFormPaint %i"%self._paint
>   gr = e.Graphics
>   self.MainPanel.Draw(gr,0)
> 
> class MainPanel:
>   def Draw(self,gr,starty):
>   y = starty
>   for c in self.Children:
>   y = c.Draw(gr,y)
> 
> Tell me if you need more code
> --
> View this message in context: http://old.nabble.com/AttributeError-%3A-
> System.Drawing.Graphics-is-%22read-only%22-tp31419737p31423875.html
> Sent from the IronPython mailing list archive at Nabble.com.
> 
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] AttributeError : System.Drawing.Graphics is"read-only"

2011-04-18 Thread Markus Schaber
Hi, Doug,

We get the same misleading error message with IPy 2.6 on microsoft .NET 2.0.

Grüße,
Markus


> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Doug Blank
> Gesendet: Montag, 18. April 2011 14:17
> An: Discussion of IronPython
> Cc: NikoVFR
> Betreff: Re: [IronPython] AttributeError : System.Drawing.Graphics
> is"read-only"
> 
> On Mon, Apr 18, 2011 at 7:56 AM, NikoVFR  wrote:
> >
> > Hello everybody...
> >
> > first i apologize for my bad english... i did not practice for a very
> > long time...
> >
> > A strange problem in a ironpython app, done with Sharpdevelop...
> >
> > I created a form, without borders, captions, icon, just a simple
> > square to draw...
> >
> > When I try to draw from my OnPaint Function, IronPy answers me :
> > Exception.AttributeError :
> > attribute 'Graphics' of 'namespace#' object is read-only
> 
> That usually means that you have misspelled an attribute. For example, if
> you say Gtk.Wibbow instead of Gtk.Window, you'll get that error.
> (It is actually a bad error message in that you are only looking up a
> value, not creating one; is that only a Mono-only issue I wonder?)
> 
> As Jimmy says, we'd need to see the code to say more.
> 
> -Doug
> 
> > Thanks for helping me, i really can't find any solution here...
> > --
> > View this message in context:
> > http://old.nabble.com/AttributeError-%3A-System.Drawing.Graphics-is-%2
> > 2read-only%22-tp31419737p31419737.html
> > Sent from the IronPython mailing list archive at Nabble.com.
> >
> > ___
> > Users mailing list
> > Users@lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] WPF module in IronPython scripting?

2011-04-17 Thread Markus Schaber
Hi, Lukáš,

It may be a problem related to the .NET assembly search path, or it may be the 
host application blocking/filtering the loading of arbitrary assemblies.

Did you try clr.AddReference() with the Assemblies being in the GAC?

Did you try clr.AddReferencetoFileAndPath()?

Could you try to catch the exception, and explore it for more details (e. G. an 
inner exception)?

Regards,
Markus
> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Lukáš Dubeda
> Gesendet: Freitag, 15. April 2011 19:41
> An: Discussion of IronPython
> Betreff: Re: [IronPython] WPF module in IronPython scripting?
> 
> Unfortunately loading the Assembly didn't work, it threw an error:
> 
> dotNet runtime exception: Could not add reference to assembly
> IronPython.Wpf.dll
> 
> Nothing else. :(
> 
> Unfortunately we don't have access to the Host app's source at all, we're
> only writing a .NET plugin that enables us to run IronPython inside the
> host app's native scripting language.
> 
> But I'll talk to the programmer who wrote the actual IPy plugin for me and
> see what the problem might be.
> 
> I just thought it's something related to .NET and IPy only.
> 
> Thank you!
> 
> Lukáš Duběda
> Director
> [T] +420 602 444 164
> 
> duber studio(tm)
> [M] i...@duber.cz
> [W] http://www.duber.cz
> 
> [A] R.A.Dvorského 601, Praha 10
> [A] 10900, Czech Republic, Europe
> 
> On 15.4.2011 18:38, Dino Viehland wrote:
> > Lukáš wrote:
> >> Hi there everyone,
> >>
> >> I just bumped into a problem where when I run the IPy.exe console and
> >> execute a script that contains:
> >>
> >> import wpf
> >>
> >> all works well. However, when I want to import the wpf namespace into
> >> the same script, but run outside the IPy.exe (i.e. as an embedded
> >> engine) I get an error saying that the module wpf doesn't exist!
> >>
> >> I even tried to add the IronPython.Wpf.dll into the PATH, I tried
> >> referencing it in my script via clr.AddReferenceToFile, nothing works
> >> and I don't have access to the wpf methods etc...
> >>
> >> Is there anything I can do about it?
> >
> > I would have expected AddReferenceToFile to work but what about doing
> > a scriptRuntime.LoadAssembly(typeof(Wpf).Assembly);  where the host
> > app has a reference to IronPython.Wpf.dll?
> >
> > I think the code for loading from the DLLs directory is ipy.exe
> > specific - you could also look at replicating that for your host app
> > so there's a general way to add additional Python built-in modules.
> >
> >
> > ___
> > Users mailing list
> > Users@lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] VS 2010 Integrated Shell question

2011-04-13 Thread Markus Schaber
Hi, Lukáš,

Yes. I did not try it with VS 2010 myself, but it is documented that way, and 
it was the same with the 2008 version where I tried the Express edition at home 
and the professional at work.

Grüße,
Markus


> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Lukáš Dubeda
> Gesendet: Mittwoch, 13. April 2011 18:59
> An: Discussion of IronPython
> Betreff: Re: [IronPython] VS 2010 Integrated Shell question
> 
> Thanks Markus, for the explanation.
> 
> So, basically, if I buy the VS 2010 Professional, I'll get both, the
> IronPython tools support as well as the ability to design WPF or WinForms
> applications?
> 
> Thanks again, much appretiated,
> 
> Lukáš Duběda
> Director
> [T] +420 602 444 164
> 
> duber studio(tm)
> [M] i...@duber.cz
> [W] http://www.duber.cz
> 
> [A] R.A.Dvorského 601, Praha 10
> [A] 10900, Czech Republic, Europe
> 
> On 13.4.2011 9:41, Markus Schaber wrote:
> > Hi, Lukáš,
> >
> > The restriction here is not within IronPython tools, but within Visual
> Studio Express.
> >
> > Microsoft released the free (as in "free beer") express editions with
> artificial restrictions. (My personal guess is that one reason is to
> prevent other free IDEs from gaining enough momentum that they can start
> rivaling the commercial editions, and another one is that their marketers
> can argument "there are powerful free development tools for .NET", so
> students etc. don't go to Java (Eclipse, Netbeans), or Linux.).
> >
> > One of those restrictions is that they only support one language (one
> cannot edit C# and VB projects in the same running instance, even when
> both editions are installed), another one is that no plugins are allowed.
> >
> > Those restrictions are meant to motivate "power users" (or any serious
> user) to buy the commercial versions.
> >
> > The "integrated Shell" is the unrestricted, but barebone framework /
> environment without any languages and plugins, they release it for free to
> 3rd party vendors (like IronPython tools, or Delphi Prism), to bind them
> to their framework and platform.
> >
> > Regards,
> > Markus
> >> -Ursprüngliche Nachricht-
> >> Von: users-boun...@lists.ironpython.com [mailto:users-
> >> boun...@lists.ironpython.com] Im Auftrag von Lukáš Dubeda
> >> Gesendet: Dienstag, 12. April 2011 19:28
> >> An: Discussion of IronPython
> >> Betreff: [IronPython] VS 2010 Integrated Shell question
> >>
> >> Hi there everyone,
> >>
> >> I have a, perhaps lame, question.
> >>
> >> I downloaded the VS 2010 Integrated Shell and installed the
> >> IronPython tools for it.
> >>
> >> However, does the VS 2010 IS have a WPF and WinForms designer? I
> >> can't seem to get it working. :(
> >>
> >> Also, the IPy tools are available only for the Integrated Shell and
> >> actual commercial versions of Visual Studio, is that right?
> >>
> >> I'm asking because I get both WPF and WinForms designers in the
> >> Visual Studio 2010 C# Express, but it's a pain to design my GUI in
> >> one package and write IPy code for it in another.
> >>
> >> Is there any solution for this?
> >>
> >> Thank you very much in advance, cheers,
> >>
> >> --
> >> Lukáš Duběda
> >> Director
> >> [T] +420 602 444 164
> >>
> >> duber studio(tm)
> >> [M] i...@duber.cz
> >> [W] http://www.duber.cz
> >>
> >> [A] R.A.Dvorského 601, Praha 10
> >> [A] 10900, Czech Republic, Europe
> >> ___
> >> Users mailing list
> >> Users@lists.ironpython.com
> >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> > ___
> > Users mailing list
> > Users@lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] VS 2010 Integrated Shell question

2011-04-13 Thread Markus Schaber
Hi, Lukáš,

The restriction here is not within IronPython tools, but within Visual Studio 
Express.

Microsoft released the free (as in "free beer") express editions with 
artificial restrictions. (My personal guess is that one reason is to prevent 
other free IDEs from gaining enough momentum that they can start rivaling the 
commercial editions, and another one is that their marketers can argument 
"there are powerful free development tools for .NET", so students etc. don't go 
to Java (Eclipse, Netbeans), or Linux.).

One of those restrictions is that they only support one language (one cannot 
edit C# and VB projects in the same running instance, even when both editions 
are installed), another one is that no plugins are allowed.

Those restrictions are meant to motivate "power users" (or any serious user) to 
buy the commercial versions.

The "integrated Shell" is the unrestricted, but barebone framework / 
environment without any languages and plugins, they release it for free to 3rd 
party vendors (like IronPython tools, or Delphi Prism), to bind them to their 
framework and platform.

Regards,
Markus
> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Lukáš Dubeda
> Gesendet: Dienstag, 12. April 2011 19:28
> An: Discussion of IronPython
> Betreff: [IronPython] VS 2010 Integrated Shell question
> 
> Hi there everyone,
> 
> I have a, perhaps lame, question.
> 
> I downloaded the VS 2010 Integrated Shell and installed the IronPython
> tools for it.
> 
> However, does the VS 2010 IS have a WPF and WinForms designer? I can't
> seem to get it working. :(
> 
> Also, the IPy tools are available only for the Integrated Shell and actual
> commercial versions of Visual Studio, is that right?
> 
> I'm asking because I get both WPF and WinForms designers in the Visual
> Studio 2010 C# Express, but it's a pain to design my GUI in one package
> and write IPy code for it in another.
> 
> Is there any solution for this?
> 
> Thank you very much in advance, cheers,
> 
> --
> Lukáš Duběda
> Director
> [T] +420 602 444 164
> 
> duber studio(tm)
> [M] i...@duber.cz
> [W] http://www.duber.cz
> 
> [A] R.A.Dvorského 601, Praha 10
> [A] 10900, Czech Republic, Europe
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Old print syntax as option on IronPython 3

2011-04-12 Thread Markus Schaber
Hi,

 

I just saw that Boo supports both print as a function and as a
statement. 

 

So I had the Idea of adding an language option to IronPython which
allows both syntaxes (and probably emitting a warning when using the old
one). This could help in the transition of old scripts to IronPython 3.

 

I know that the cPython parser does not allow that (using the same word
as keyword and identifier), but maybe the IronPython parser is flexible
enough to allow both usages?

 

Just a weird, heretical suggestion, feel free to ignore my mail. J

 

Regards,

Markus

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] IronPython and XML Parsing

2011-04-06 Thread Markus Schaber
Hi,

Currently, none of the XML parsers of the Python standard library seem
to work with IronPython, as they all depend on expat.

According to
http://devhawk.net/2008/05/06/Stream+Processing+XML+In+IronPython.aspx,
the FePy project contains a drop in replacement based on System.XML:
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/lib/pyexpat.py.

Has anyone successfully tried this implementation? What about including
it into the IronPython distribution?

PS: Is FePy still alive at all? The last commit seems to be from July
2009...

Regards,
Markus


___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Writing cross-language libraries that appear native

2011-04-05 Thread Markus Schaber
Hi, Doug,

I it won't be possible to make it "feel naturally" with every language, simply 
because the languages have very different naming conventions (C# mandates 
CamelCase, Python prefers words_with_underscores, ...) and programming 
paradigms.

But on the other hand, you should keep in mind that .NET was designed as a 
multi-paradigm environment, and that all those Languages were implemented with 
this in mind.

Most of the dynamic languages have very clever parameter resolution and 
automatic casting mechanisms implemented, as they offer easy access to the 
whole .NET standard library - this will automatically apply to your interface, 
too. E. G. any python list and tuple can be passed to a function taking a 
IEnumerable, python will create an auto-casting enumerator, and will throw 
when the sequence contains elements not compatible to Foo.

Nevertheless, my concrete points of advice are:

- I think the most important thing is that you make a simple, clearly 
structured API. 

- Be generous but exact in what you accept. For example if you need a sequence 
of Foo as parameter, accept IEnumerable.
  * No need to use IEnumerable and cast yourself - more Code to type, the 
dynamic language binding will auto-cast for you, and the statically typed 
languages like C# and F# profit from the stricter declaration. 
  * Accepting IList or ICollection is too strict for the main method, 
but if your algorithm can profit from indexing or knowing the size, you may 
provide them as optimized overloads.

- Adhere to the coding standards / naming conventions in the language you use 
to implement.

- Take care that all your functionality is exposed in CLS conformant ways. 
(IMHO, it is okay to provide optimized non-CLS conformant alternative ways of 
access. One example is that you should provide access methods for all 
overloaded operators. Browse the Web and MSDN for CLS conformance, you'll find 
lots of guidelines.)

- After drafting your interface (or implementing the first alpha), ask users of 
the target languages for their advice, or implement a test application in all 
of the languages.

(I personally don't have any experience with IronRuby, and simply assumed that 
they use similar mechanisms like IronPython, so take my advice with a grain of 
salt.)
Regards,
Markus


> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Doug Blank
> Gesendet: Montag, 4. April 2011 17:25
> An: Discussion of IronPython
> Betreff: [IronPython] Writing cross-language libraries that appear native
> 
> I'm working on writing C# libraries which can be imported by a variety of
> .NET languages, DLR and otherwise, which appear native to the language
> importing them.
> 
> For example, writing a C# function that can be used naturally in
> IronPython as if it were written in Python, IronRuby as if it were written
> in Ruby, and F# as if it were written in F#, etc.
> 
> I've encountered some gotchas that I thought I'd share, and looking for
> any other points of advice in writing cross-language libraries.
> 
> 1. IronRuby strings aren't really strings, so you need to pass them in as
> an object, and call .ToString().
> 
> public static string expects_string(object val) {
> return val.ToString();
> }
> 
> 2. F# 2.0 doesn't seem to automatically convert a type to the associated
> nullable type, so avoid nullable types as parameters.
> 
> // AVOID:
> public static double? expects_nullable(double? var1=null) {
> return var1;
> }
> 
> // BETTER:
> public static double? expects_nullable() {
> return null;
> }
> public static double expects_nullable(double var1) {
> return var1;
> }
> 
> 3. IronPython and IronRuby lists and dictionaries implement IList and
> IDictionary, so no problem with those.
> 
> public static IDictionary make_dict(object val) {
> if (val as IDictionary != null) {
> return ((IDictionary)val);
> } else
> throw new System.ArgumentException("object is not a
> dictionary");
> }
> 
> public static IList make_list(object val) {
> if (val as IList != null) {
> return ((IList)val);
> } else
> throw new System.ArgumentException("object is not a list");
> }
> 
> Any other suggestions?
> 
> -Doug
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Migration warnings to python 3

2011-04-04 Thread Markus Schaber
Hi,

It seems that the default behaviour of printing them to sys.stderr may fit our 
needs.

Regards,
Markus
> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Markus Schaber
> Gesendet: Montag, 4. April 2011 08:17
> An: Discussion of IronPython
> Betreff: Re: [IronPython] Migration warnings to python 3
> 
> Hi, Dino,
> 
> I guess this is okay, some things like string / Unicode semantics are
> actually already like in Python 3.
> 
> I'll skim the hosting API to find out how I can get those warnings in
> hosted environment.
> 
> Regards,
> Markus
> 
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Dino Viehland
> 
> > We do support the -3 option which turns those warnings on but I don't
> think we have as many warnings as CPython did.
> 
> >> From: users-boun...@lists.ironpython.com
> >> [mailto:users-boun...@lists.ironpython.com] On Behalf Of Markus
> >> Schaber Hello, The current estimate for IronPython to implement python
> 3 was "not before fall". So applications hosting IronPython must think
> about paving a good migration path for their users.
> >> AFAIR, the cPython implementation can spit out a bunch of warnings for
> Code incompatible with cPython 3.
> >> Is this mechanism supported by hosted IronPython?
> 
> Grüße,
> Markus
> 
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Migration warnings to python 3

2011-04-03 Thread Markus Schaber
Hi, Dino,

I guess this is okay, some things like string / Unicode semantics are actually 
already like in Python 3.

I'll skim the hosting API to find out how I can get those warnings in hosted 
environment.

Regards,
Markus

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Dino Viehland

> We do support the -3 option which turns those warnings on but I don't think 
> we have as many warnings as CPython did.
 
>> From: users-boun...@lists.ironpython.com 
>> [mailto:users-boun...@lists.ironpython.com] On Behalf Of Markus Schaber
>> Hello,
>> The current estimate for IronPython to implement python 3 was "not before 
>> fall". So applications hosting IronPython must think about paving a good 
>> migration path for their users.
>> AFAIR, the cPython implementation can spit out a bunch of warnings for Code 
>> incompatible with cPython 3.
>> Is this mechanism supported by hosted IronPython?
 
Grüße,
Markus
 
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] [Code Review] Custom PAL fixes

2011-04-01 Thread Markus Schaber
Hi, Jimmy,

> Von: Jeff Hardy
> On Thu, Mar 31, 2011 at 7:05 PM, Jimmy Schementi 
> wrote:
> > Just checked in some small fixes to make the Importer use a custom
> > Platform Adaptation Layer. I also started to tweak
clr.CompileModules
> > a bit, but backed those changes out, so just ignore those.
> > Take a look at the recent commits to
> > https://github.com/jschementi/iron. If there are no objections, I'll
> push them to main.
> 
> If Dino's happy, that's good enough for me.
> 
> Should these changes be in the 2.7 branch as well, or just master
(3.0)?
> It doesn't look like there are any API changes, so applying it to 2.7
> should be fine.

I'd like to see those changes and fixes in version 2.7, for all those
people who cannot yet migrate to .NET 4.0.

Thanks,
Markus
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Migration warnings to python 3

2011-04-01 Thread Markus Schaber
Hello,

 

The current estimate for IronPython to implement python 3 was "not before 
fall". So applications hosting IronPython must think about paving a good 
migration path for their users.

 

AFAIR, the cPython implementation can spit out a bunch of warnings for Code 
incompatible with cPython 3.

 

Is this mechanism supported by hosted IronPython?

 

Grüße,

Markus

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] IronPython use case: CoDeSys

2011-04-01 Thread Markus Schaber
Hi,

 

For all those collecting information about usages of IronPython:

 

The "Controller Development System" CoDeSys is the industry leading
development tool (IDE and runtime system) for programming PLCs using the
standardized IEC 61131-3 language.

 

The current release V3.4 SP3 includes an IronPython 2.6.2 based
scripting plugin that allows to automate and control established CoDeSys
functionality like importing applications written in the PLCOpenXML
standard, compiling and downloading applications to the device, or
runtime monitoring of variables, both from within the IDE and from
command line. The script writers can also utilize the power of the
python standard library which is included, this allows for advanced task
like sending monitored variable values via E-Mail.

 

Best regards

Markus Schaber

___

We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.scha...@3s-software.com <mailto:m.scha...@3s-software.com>  |
Web: http://www.3s-software.com <http://www.3s-software.com> 
CoDeSys internet forum: http://forum.3s-software.com
<http://forum-en.3s-software.com> 
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects
<http://www.3s-software.com/index.shtml?sample_projects> 

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Creating Symbolic Links via IronPython

2011-03-31 Thread Markus Schaber
Hi,

Either you create a c# wrapper dll that exposes this function, and reference 
that DLL from Ironpython.

Or you use the clrtype class (which can be found at 
http://ironpython.codeplex.com/wikipage?title=Samples) - this allows you to 
assign c# Attributes to python methods, so you can define the DLLImport method.)

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax 
+49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: 
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Lukáš Dubeda
> Gesendet: Donnerstag, 31. März 2011 21:43
> An: Discussion of IronPython
> Betreff: [IronPython] Creating Symbolic Links via IronPython
> 
> Hi there everyone,
> 
> I've been trying to find a solution for creating Symbolic Links via
> IronPython scripting, but it seems there is not a direct way of doing this
> via .NET and since I don't know C#, I have hard times "translating" C#
> snippets I've found on the net to IronPython. For example:
> 
> [Interop.DllImport("kernel32.dll", EntryPoint="CreateSymbolicLinkW",
> CharSet=Interop.CharSet.Unicode)] public static extern int
> CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, int
> dwFlags);
> 
> So, I thought asking here would probably be the best place for the best
> advice (i.e. what to avoid using etc...).
> 
> Any advice on this topic would be much appretiated!
> 
> Thanks a lot in advance, cheers,
> 
> Lukáš Duběda
> Director
> [T] +420 602 444 164
> 
> duber studio(tm)
> [M] i...@duber.cz
> [W] http://www.duber.cz
> 
> [A] R.A.Dvorského 601, Praha 10
> [A] 10900, Czech Republic, Europe
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debugging hosted python scripts

2011-03-31 Thread Markus Schaber
Hi,

 

Another remark I forgot to write:

 

Visual Studio Debugger attaches to an external process, so they don't have the 
problem of VS freezing the app is frozen.

 

You could also go the way of using an external debugger process (and 
communicate e. G. via COM, or have the debugger using the .NET debugging APIs.)

 

Regards,

Markus

 

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Markus Schaber
Gesendet: Donnerstag, 31. März 2011 09:49
An: Discussion of IronPython
Betreff: Re: [IronPython] Debugging hosted python scripts

 

Hi,

 

If you are sure that you can control the potentially arising reentrancy 
problems (best by avoiding reentrancy completely, e. G. by disabling the parent 
windows), then Application.DoEvents inside the trace handler may help.

 

Grüße,

Markus

 

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Keith Rome
Gesendet: Donnerstag, 31. März 2011 04:52
An: users@lists.ironpython.com
Betreff: [IronPython] Debugging hosted python scripts

 

I am hoping someone can point me in the right direction here. If there are no 
examples out there to review, then perhaps a hint or two about where I can look 
in the IronPython hosting API to achieve what I want...

 

We currently have a line of business application, written entirely in C#, that 
embeds the IronPython runtime. We offer a GUI script editing environment (using 
the SyntaxEditor control from Actipro Software, which works great for this). 
This script editor exists as just another dialog window in our application 
where the user can extend the business objects behind the application in 
various ways. The scripts are stored in a database, not in files on the local 
file system. We have great support for syntax highlighting, compiler error 
"squiggles", even Intelliprompt functionality. I am now building live debugging 
support into our script editor GUI, which is where I have run into some 
difficulty.

 

I have been going down the path of using ScriptEngine.SetTrace() and inspecting 
frames in the callback. This works fine if I am not doing anything interactive. 
For example, dumping some information to Debug.WriteLine(). However what I 
really need (I think?) is to be able to suspend the script execution during a 
trace callback. I don't see a clear way to do this though. The script runtime 
simply continues execution when my callback returns. I have done some work 
around running the debugged script on a background thread, and then blocking it 
during "breakpoint" callbacks - but these scripts are normally run within the 
UI thread because they interact with data structures that are often databound 
to UI controls, and running them from a background thread is becoming a 
minefield of cross-thread violations. I cannot simply run the script in the UI 
thread, because blocking in the trace callback would make the application 
unresponsive.

 

It seems like there should be some way to suspend/stop the script while in a 
trace callback (preserving all python stack and scope information), and then 
(optionally) later resume that execution frame by frame as the user "steps" 
through code. The only thing I see that might do what I want is possibly get an 
AST first and kick it through CallTracing() after hooking my trace callback? Is 
that what I should be doing?

 

I have spent some time digging through the IronPython Tools assemblies to see 
how this kind of thing was achieved when integrating with Visual Studio's 
debugger experience. I don't see it using SetTrace(), and so I assume this is 
taking an entirely different approach and not sure there is anything there that 
really provides what I need.

 

One last thing to mention is that our application is compiled against both WPF 
and Silverlight targets, so any solution needs to work in both environments.

 

Not looking for hand-holding here - just a nudge in the right direction. Even 
some examples of something along these lines as implemented in pure Python 
might be enough for me to figure out the rest.

 

Many thanks in advance,

Keith

 

 

 

Keith Rome

Senior Consultant and Architect

MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS

Wintellect | 770.617.4016 | kr...@wintellect.com <mailto:r...@wintellect.com> 

www.wintellect.com <http://www.wintellect.com/> 

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Debugging hosted python scripts

2011-03-31 Thread Markus Schaber
Hi,

 

If you are sure that you can control the potentially arising reentrancy 
problems (best by avoiding reentrancy completely, e. G. by disabling the parent 
windows), then Application.DoEvents inside the trace handler may help.

 

Grüße,

Markus

 

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Keith Rome
Gesendet: Donnerstag, 31. März 2011 04:52
An: users@lists.ironpython.com
Betreff: [IronPython] Debugging hosted python scripts

 

I am hoping someone can point me in the right direction here. If there are no 
examples out there to review, then perhaps a hint or two about where I can look 
in the IronPython hosting API to achieve what I want...

 

We currently have a line of business application, written entirely in C#, that 
embeds the IronPython runtime. We offer a GUI script editing environment (using 
the SyntaxEditor control from Actipro Software, which works great for this). 
This script editor exists as just another dialog window in our application 
where the user can extend the business objects behind the application in 
various ways. The scripts are stored in a database, not in files on the local 
file system. We have great support for syntax highlighting, compiler error 
"squiggles", even Intelliprompt functionality. I am now building live debugging 
support into our script editor GUI, which is where I have run into some 
difficulty.

 

I have been going down the path of using ScriptEngine.SetTrace() and inspecting 
frames in the callback. This works fine if I am not doing anything interactive. 
For example, dumping some information to Debug.WriteLine(). However what I 
really need (I think?) is to be able to suspend the script execution during a 
trace callback. I don't see a clear way to do this though. The script runtime 
simply continues execution when my callback returns. I have done some work 
around running the debugged script on a background thread, and then blocking it 
during "breakpoint" callbacks - but these scripts are normally run within the 
UI thread because they interact with data structures that are often databound 
to UI controls, and running them from a background thread is becoming a 
minefield of cross-thread violations. I cannot simply run the script in the UI 
thread, because blocking in the trace callback would make the application 
unresponsive.

 

It seems like there should be some way to suspend/stop the script while in a 
trace callback (preserving all python stack and scope information), and then 
(optionally) later resume that execution frame by frame as the user "steps" 
through code. The only thing I see that might do what I want is possibly get an 
AST first and kick it through CallTracing() after hooking my trace callback? Is 
that what I should be doing?

 

I have spent some time digging through the IronPython Tools assemblies to see 
how this kind of thing was achieved when integrating with Visual Studio's 
debugger experience. I don't see it using SetTrace(), and so I assume this is 
taking an entirely different approach and not sure there is anything there that 
really provides what I need.

 

One last thing to mention is that our application is compiled against both WPF 
and Silverlight targets, so any solution needs to work in both environments.

 

Not looking for hand-holding here - just a nudge in the right direction. Even 
some examples of something along these lines as implemented in pure Python 
might be enough for me to figure out the rest.

 

Many thanks in advance,

Keith

 

 

 

Keith Rome

Senior Consultant and Architect

MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS

Wintellect | 770.617.4016 | kr...@wintellect.com  

www.wintellect.com  

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IPy 2.7 successfully built for .NET 3.5, but problem w. indirect v4 dependencies

2011-03-30 Thread Markus Schaber
Hi, Jaromir,

 

We had very strange problems with 2.6.2 when we had both the .NET 2 and .NET 4 
versions installed in the GAC. (The same DLL, the same key, the same version…)

 

To prevent those problems from happening with our customers, we ship 
custom-built IronPython dlls, renamed and signed with our own key.

 

Best regards

Markus Schaber

___

We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax 
+49-831-54031-50

Email: m.scha...@3s-software.com <mailto:m.scha...@3s-software.com>  | Web: 
http://www.3s-software.com <http://www.3s-software.com> 
CoDeSys internet forum: http://forum.3s-software.com 
<http://forum-en.3s-software.com> 
Download CoDeSys sample projects: 
http://www.3s-software.com/index.shtml?sample_projects 
<http://www.3s-software.com/index.shtml?sample_projects> 

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

 

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Jaromír Matýšek
Gesendet: Mittwoch, 30. März 2011 12:45
An: iro...@googlegroups.com
Cc: Discussion of IronPython
Betreff: Re: [IronPython] IPy 2.7 successfully built for .NET 3.5, but problem 
w. indirect v4 dependencies

 

I wish it was so easy. My dlls build against 3.5, there's no reference to v4 
dlls in the project, and when I open the final dll with Reflector and go 
through the references (and their references, and theirs...) there's still no 
v4 reference. If it was compiled against .NET 4.0, it wouldn't even run in 
SharePoint - and it does.

And the culprit is really somewhere among 2.7's Microsoft.Dynamic, 
Microsoft.Scripting, Microsoft.Scripting.Core and IronPython - when I go back 
to  2.6.1 versions, my dll can be referenced OK. 

Again, according to Reflector, there is no v4 reference anywhere in the dlls I 
compiled, nor in their references. There are some instances of people solving 
similar problem, but none of the suggestions worked for me.

Maybe I did something wrong when building 2.7 for v2. Could maybe someone post 
binaries of 2.7 for v2 please?

Well, I'll just continue using 2.6.1 for the time being.

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Newbie InterOp-related question

2011-03-29 Thread Markus Schaber
Hi, Paul,

 

it's documented at 
http://ironpython.net/documentation/dotnet/dotnet.html#ref-and-out-parameters. 

 

The out parameter will be mapped as an additional return value.

 

So if myComObj.foo returns void, a simple call like

 

blah = myComObj.Foo()

 

should do the trick.

 

Grüße,

Markus

 

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Tilley, Paul
Gesendet: Mittwoch, 30. März 2011 01:10
An: users@lists.ironpython.com
Betreff: [IronPython] Newbie InterOp-related question

 

Hi,

 

I've just started using IronPython but have hit a bit of a roadblock. This may 
also be caused by inadequate .Net knowledge.

 

In C# I can call a COM object (where the COM method is going to fill in the 
parameter) like so:

object blah;

myComObj.Foo(out blah);

 

If for example the COM method returns an array of strings ( with the parameter 
VARIANT* in COM method signature) then in C# I get an object[] back which with 
appropriate massaging I can process.

 

How would I declare the variable in Python if I want access the returned 
contents correctly? Knowing I was to get an array back I naively tried:

blah = []

myComObj.Foo(blah)

 

The call is made correctly - I can see the COM object is filling out the return 
parameter OK but blah remains an empty list.

Any insights on what I should be doing more than welcome,

 

Thanks,

 

Paul

 

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Transparent import of dlls?

2011-03-29 Thread Markus Schaber
Hi, Jeff,

Von: Jeff Hardy [mailto:jdha...@gmail.com]:

> > We're currently using IronPython 2.6 in a hosted .NET 2 environment.
> 
> For ipy.exe, there's a special directory called 'DLLs' that it reads
on
> startup and does the hosting equivalent of clr.AddReference for each
.dll
> in the folder. That's about the best you can do right now.

That DLLs directory seems to be a way which we can follow in our own
product.

The disadvantage is that all DLLs are read, whether they're imported, or
not.

> I've been thinking of adding support for .ipyd files (similar to
Python
> .pyd files), which could handle this case, but haven't thought it
through
> yet.

My suggestion is: "import foo" searches for a foo.ipyd (which basically
is a renamed foo.dll) in the search path, and can use both pyc-compiled
and handcrafted dlls.

Our use-case is to re-implement the API of 3rd-party native cPython
modules (like pysvn in my case) in C#. This should work as a drop-in
solution - drop the .dll in some appropriate place, and "import pysvn"
works without any changes in the actual application.

Regards,
Markus


___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Transparent import of dlls?

2011-03-29 Thread Markus Schaber
Hi,

 

I have some questions that may seem stupid, but I did not find the right
answers yet. So simple pointers to the correct google query are as
welcome as elaborate Howtos. J

 

For cPython, it is possible to compile a module into a .pyc file. If
this file resides in sys.path, it is transparently used instead of the
.py source file. (We can ignore the exact details of lookup and version
dependency here.)

 

For IronPython, there is the pyc.py compiler script. This allows a
python module to be precompiled into a .NET dll. However, it seems that
it is not used transparently when placed in a directory in sys.path, one
has to explicitly add a Reference to the dll (via clr.AddReference or
hosting API).

 

Now my questions:

 

Is there any way to make this work transparently? (e. G. via a Flag to
the interpreter, or a modified import() function, or renaming the .dll
to .pyc?)

 

Is there a way to extend this mechanism to python modules created in C#?
(Creating a "foo.dll" that contains a "foo" module created via
PythonModuleAttribute, similar to the way the modules in
Ironpython.Modules.dll are created).

 

We're currently using IronPytho 2.6 in a hosted .NET 2 environment.

 

Thanks a lot,

 

Regards,

Markus

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] multiprocessing in 2.7

2011-03-24 Thread Markus Schaber
Hi, Romain,

Romain Gilles wrote:
> from multiprocessing import Process

A small remark: 
The main usage of the multiprocessing module is to work around the global 
interpreter lock (GIL) in cPython.

As IronPython does not have that GIL, maybe you can create a scalable 
application just fine without the multiprocessing module, maybe using the .NET 
ThreadPools

Grüße,
Markus
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!

2011-03-23 Thread Markus Schaber
Hi, Jeff,

If you manage to compile it with .NET 2.0, I would be very pleased to see your 
success story posted here. :-)

Thanks!

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax 
+49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: 
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915 


> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Doug Blank
> Gesendet: Mittwoch, 23. März 2011 14:14
> An: Jeff Hardy
> Cc: Discussion of IronPython
> Betreff: Re: [IronPython] Building IronPython/IronRuby for Mono? Yes!
> 
> On Tue, Mar 22, 2011 at 1:30 PM, Jeff Hardy  wrote:
> > On Tue, Mar 22, 2011 at 11:03 AM, Doug Blank 
> wrote:
> >> I'm not too concerned about ipy.exe itself, but about being about to
> >> use the dlls.
> >>
> >> I'm trying to verify that the IronPython 2.7 dlls absolutely need
> >> Mono
> >> 2.8 or later. If that is true, I'll have to stay with IronPython 2.6
> >> until the rest of the Linux distros catch up (or I make my own
> >> version of Mono to download). Perhaps Miguel or someone from SuSE can
> >> add more details to the dependencies for building and running
> IronPython 2.7?
> >
> > IronPython 2.7 *should* build for .NET 2.0, although it's not the
> > default (I don't remember the name of the MSBuild configuration to do
> > so, though). However, I don't think that was consistently tested, so I
> > don't know if it works. I would consider it not working a bug, though.
> 
> I have successfully built IronPython 2.7 on Mono 2.10 on Ubuntu 10.10 for
> .NET 4.0. Details below.
> 
> But I'd like to try for .NET 2.0, to see if it will run under Mono 2.6.7,
> so if someone could send me a hint on the "MSBuild configuration" magic,
> that would be helpful. Of course, I will be using xbuild.
> 
> To build IronPython under Mono 2.10:
> 
> 0) Prereqs (I started from a clean Ubuntu 10.10):
> sudo apt-get install git subversion gcc emacs libmono-corlib2.0-cil
> libmono-system2.0-cil libmono-i18n2.0-cil libmono-system-runtime2.0-cil
> libmono-winforms2.0-cil libmono-microsoft-visualbasic8.0-cil nant mono-
> xbuild automake libtool gettext gnome-common g++ bison
> 
> 1) Get Mono 2.10 as per:
> http://mono-project.com/Compiling_Mono_From_Git
> 
> a) Switched to 2.10
> b) Installed in /opt (--prefix=/opt)
> 
> 2) Allow multiple versions of Mono:
> http://apebox.org/wordpress/linux/370/
> 
> 3) Download IronPython:
> https://download.github.com/IronLanguages-main-ipy-2.7-0-g4fb2552.zip
> or
> https://download.github.com/IronLanguages-main-ipy-2.7-7-g4e7a828.zip
> or
> git clone https://github.com/IronLanguages/main.git
> 
> into ./IronPython/
> 
> 4) Edit IronPython/Solutions/Dlr.sln
> Removed anything that said "test" and other parts that aren't needed.
> (One test had a file that Mono wouldn't read the .il code correctly
> (./Test/ClrAssembly/Src/typeforwarder2.il) and some filenames in csproj
> files that had the wrong case, which doesn't work too well on a case-
> sensitive file system. I started to fix those, but left that for now).
> 
> 5) Delete IronPython/bin/Debug/*.dll
> 
> 6) Build it:
> cd IronPython/Solutions/
> xbuild Dlr.sln
> xbuild IronPython.sln
> 
> 7) Test:
> $cd ../bin/Debug/
> $ mono ipy.exe
> IronPython 2.7 DEBUG (2.7.0.40) on .NET 4.0.30319.1 Type "help",
> "copyright", "credits" or "license" for more information.
> >>> 1 + 1
> 2
> >>> ^d
> 
> It is still in gray colors, but that works.
> 
> Questions:
> 
> 1) How to build a Release version rather than Debug?
> 2) How to set the framework to use 2.0 rather than 4.0?
> 
> > We won't provide binaries for 2.7/.NET2, but we don't want to prevent
> > someone building their own either. 3.0, however, will drop support for
> > .NET 2 entirely.
> 
> I will add this information to the wiki so that people can do exactly
> that.
> 
> -Doug
> 
> > - Jeff
> >
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono?

2011-03-22 Thread Markus Schaber
Doug Blank wrote:

> > IronPython 2.7 and newer seem to need at least .NET 4.0, which needs
> > at least Mono 2.8.
> 
> Is that you need Mono 2.8 to build IronPython, or to run it?
> IronPython2.6 beta 2 is running fine under Mono 2.6.7.

As far as I can see, you need .NET 4 / Mono 2.8 for both compiling and
running.

IronPython 2.6.2 is delivered in two versions, one for .NET 4 and the
other one for .NET 2 (but using some C# 3 language features).

The main difference seems to be in the DLR libraries used, parts of it
have been integrated into the core libraries in .NET 4, so they are not
compatible between versions.

Best regards

Markus Schaber
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Building IronPython/IronRuby for Mono?

2011-03-22 Thread Markus Schaber
Hi, Doug,

Doug Blank wrote:

> 2) I tried the zipped binaries on Mono 2.6.7 under Ubuntu 10.10, but
that
> doesn't look like it is supported:

IronPython 2.7 and newer seem to need at least .NET 4.0, which needs at
least Mono 2.8.

Best regards

Markus Schaber
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Typecasting in ironPython

2011-03-18 Thread Markus Schaber
Hi, Saurabh,

Sorry for sending that borked message. Outlook 2010 is driving me nuts!

Saurabh Rawat wrote:

> NoisePath np = (NoisePath)255

This is C syntax which obviously doesn't work in (Iron)Python. Python is
a dynamically typed language, so type casts do not exist "by design".

But the enum class has a toobject method:
http://msdn.microsoft.com/de-de/library/system.enum.toobject.aspx

So (with the appropriate import statements), the following should do:

Np = Enum.ToObject(NoisePath, 255)

 Regards,

 Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Typecasting in ironPython

2011-03-18 Thread Markus Schaber
 

 

Best regards

Markus Schaber

___

We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax 
+49-831-54031-50

Email: m.scha...@3s-software.com <mailto:m.scha...@3s-software.com>  | Web: 
http://www.3s-software.com <http://www.3s-software.com> 
CoDeSys internet forum: http://forum.3s-software.com 
<http://forum-en.3s-software.com> 
Download CoDeSys sample projects: 
http://www.3s-software.com/index.shtml?sample_projects 
<http://www.3s-software.com/index.shtml?sample_projects> 

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

 

Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von saurabh rawat
Gesendet: Freitag, 18. März 2011 08:24
An: users@lists.ironpython.com
Betreff: [IronPython] Typecasting in ironPython

 

HI , i am facing this problem of typecasting a given integer to a enum value.


following is the enum class

NoisePath np = (NoisePath)255 


public enum NoisePath
{
NOISE_PATH_NONE = 0,
NOISE_PATH_UPLINK = 1,
NOISE_PATH_DOWNLINK = 2,
NOISE_PATH_MIX = 3,
NOISE_PATH_UPLINK_KODIAK_POC = 4,
NOISE_PATH_FM_RADIO = 5,
}

i tried  the following in Ipy code and got the following errors :

np = (NoisePath)255 

-->ERROR: Invalid Syntax , this comes at the time of script format checking , 
not even the function body gets executed


np = Convert.ToByte(255)
function(no) , hre function accepts the argument of type NoisePath 

-->ERROR: expected NoisePath, got Byte,this comes at the time of script 
execution ,at least some function body gets executed

Plz assist me on this.!!

Rgds and Thansk in advance !!

Saurabh






 

   " The ultimate test of a relationship is to disagree but to hold 
hands..." 

   

 

[> ] 

 

 

 

 

 

 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] ArenaNet's Use of IronPython

2011-03-17 Thread Markus Schaber
Sender: users-boun...@lists.ironpython.com
On-Behalf-Of: m.scha...@3s-software.com
Subject: Re: [IronPython] ArenaNet's Use of IronPython
Message-Id: 

Recipient: david.jo...@barclayscapital.com

___

This e-mail may contain information that is confidential, privileged or 
otherwise protected from disclosure. If you are not an intended recipient of 
this e-mail, do not duplicate or redistribute it by any means. Please delete it 
and any attachments and notify the sender that you have received it in error. 
Unless specifically indicated, this e-mail is not an offer to buy or sell or a 
solicitation to buy or sell any securities, investment products or other 
financial product or service, an official confirmation of any transaction, or 
an official statement of Barclays. Any views or opinions presented are solely 
those of the author and do not necessarily represent those of Barclays. This 
e-mail is subject to terms available at the following link: 
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the 
foregoing.  Barclays Capital is the investment banking division of Barclays 
Bank PLC, a company registered in England (number 1026167) with its registered 
offic
 e at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent 
from other members of the Barclays Group.
___
--- Begin Message ---
Hi,

Is there a wiki page or (semi-)official web page collecting all this usages?

Grüße,
Markus

> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Steve Baer
> Gesendet: Mittwoch, 16. März 2011 17:47
> An: Discussion of IronPython
> Betreff: Re: [IronPython] ArenaNet's Use of IronPython
> 
> Just in case anyone is interested in "who's using IronPython", we're using
> it on both our Windows and Mac versions of Rhino
> http://python.rhino3d.com/forums/1-RhinoPython
> http://www.rhino3d.com/
> http://mac.rhino3d.com/
> 
> We are currently using 2.6.2, but will be switching over to 2.7 hopefully
> within a month (our automated build process is undergoing some major
> changes right now...)
> 
> I've been extremely happy with how IronPython has been working for our
> customers and the continued progress.  The availability of numpy is great
> news since we have gotten a lot of questions about this specific package
> from our user community.
> 
> Thanks for all of the hard work.
> -Steve
> 
> 
> -Original Message-
> From: Jeff Hardy
> Sent: Monday, March 14, 2011 6:22 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] ArenaNet's Use of IronPython
> 
> That's awesome. I think it might be time to start a "Who's using
> IronPython" page somewhere.
> 
> The upgrade to 2.7 should be pretty seamless, BTW. Is there anything that
> you're missing? Anything that would make your use case easier?
> 
> - Jeff
> 
> 
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
--- End Message ---
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] ArenaNet's Use of IronPython

2011-03-17 Thread Markus Schaber
Hi,

Is there a wiki page or (semi-)official web page collecting all this usages?

Grüße,
Markus

> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Steve Baer
> Gesendet: Mittwoch, 16. März 2011 17:47
> An: Discussion of IronPython
> Betreff: Re: [IronPython] ArenaNet's Use of IronPython
> 
> Just in case anyone is interested in "who's using IronPython", we're using
> it on both our Windows and Mac versions of Rhino
> http://python.rhino3d.com/forums/1-RhinoPython
> http://www.rhino3d.com/
> http://mac.rhino3d.com/
> 
> We are currently using 2.6.2, but will be switching over to 2.7 hopefully
> within a month (our automated build process is undergoing some major
> changes right now...)
> 
> I've been extremely happy with how IronPython has been working for our
> customers and the continued progress.  The availability of numpy is great
> news since we have gotten a lot of questions about this specific package
> from our user community.
> 
> Thanks for all of the hard work.
> -Steve
> 
> 
> -Original Message-
> From: Jeff Hardy
> Sent: Monday, March 14, 2011 6:22 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] ArenaNet's Use of IronPython
> 
> That's awesome. I think it might be time to start a "Who's using
> IronPython" page somewhere.
> 
> The upgrade to 2.7 should be pretty seamless, BTW. Is there anything that
> you're missing? Anything that would make your use case easier?
> 
> - Jeff
> 
> 
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.7.1 & 3.x Development

2011-03-17 Thread Markus Schaber
Hi, Thomas,

I did know about the assembly version being part of the name, but I did not 
know yet about the extern aliases. I'm learning something new every day...

Thanks a lot! 

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax 
+49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: 
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915 
> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] Im Auftrag von Tomas Matousek
> Gesendet: Mittwoch, 16. März 2011 17:41
> An: Discussion of IronPython
> Betreff: Re: [IronPython] IronPython 2.7.1 & 3.x Development
> 
> Yes, you can do it and w/o any glue - the version of the assembly is a
> part of the name, so the assemblies are in fact not named identically.
> Only the files are and they can be either in GAC or in a different
> subdirectory of your app. Your App.config can specify subdirectories used
> to look for assemblies [1].
> 
> To choose the namespace/class from one assembly or the other use extern
> aliases [2] in your code.
> 
> Tomas
> 
> [1] http://msdn.microsoft.com/en-us/library/823z9h8w(VS.80).aspx
> [2] http://www.davidarno.org/c-howtos/aliases-overcoming-name-conflicts-
> part-2-extern-alias/
> 
> 
> -Original Message-
> From: users-boun...@lists.ironpython.com [mailto:users-
> boun...@lists.ironpython.com] On Behalf Of Markus Schaber
> Sent: Wednesday, March 16, 2011 12:24 AM
> To: Discussion of IronPython
> Subject: Re: [IronPython] IronPython 2.7.1 & 3.x Development
> 
> Hi,
> 
> Von Tomas Matousek
> 
> >>> As I wrote, we host IronPython inside our application, so shebang
> and
> >>> file name suffixes are irrelevant - but we could use the shebang as
> a
> >>> marker for python 3 (given that we can host both versions
> >>> side-by-side) and parse the source manually to find out which
> version
> >>> to use - at least for a specific grace period.
> >>
> >> I think we can support this - it would be no different than using
> >> IronPython and IronRuby side by side, if we do it right. We'd
> probably
> >> have to rename IronPython.dll to IronPython3.dll as well, but that's
> not a
> >> big deal.
> > The assemblies are strongly named so I don't think that the name
> change
> > would be necessary.
> 
> Maybe we will need some tricks to solve the reference problems - I don't
> know whether you can reference two identically named assemblies containing
> identically named classes from the same C# dll, even if they are signed
> differently. But I think some kind of glue layer dlls could easily solve
> that.
> 
> Thanks,
> Markus
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> 
> 
> 
> 
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.7.1 & 3.x Development

2011-03-16 Thread Markus Schaber
Hi,

Von Tomas Matousek

>>> As I wrote, we host IronPython inside our application, so shebang
and
>>> file name suffixes are irrelevant - but we could use the shebang as
a
>>> marker for python 3 (given that we can host both versions
>>> side-by-side) and parse the source manually to find out which
version
>>> to use - at least for a specific grace period.
>> 
>> I think we can support this - it would be no different than using
>> IronPython and IronRuby side by side, if we do it right. We'd
probably
>> have to rename IronPython.dll to IronPython3.dll as well, but that's
not a
>> big deal.
> The assemblies are strongly named so I don't think that the name
change
> would be necessary.

Maybe we will need some tricks to solve the reference problems - I don't
know whether you can reference two identically named assemblies
containing identically named classes from the same C# dll, even if they
are signed differently. But I think some kind of glue layer dlls could
easily solve that.

Thanks,
Markus
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.7.1 & 3.x Development

2011-03-15 Thread Markus Schaber
Hi, Vernon,

Von: Vernon Cole
> #!/usr/bin/ipy3
> A shebang on the first line is the usual way of specifying which
scripting engine to use on a posix system.

As I wrote, we host IronPython inside our application, so shebang and
file name suffixes are irrelevant - but we could use the shebang as a
marker for python 3 (given that we can host both versions side-by-side)
and parse the source manually to find out which version to use - at
least for a specific grace period.

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.7.1 & 3.x Development

2011-03-15 Thread Markus Schaber
Hi, Jeff,

Von: Jeff Hardy

> With the 2.7 out the door, it's time to start thinking about 3.x. I've
> created a ipy-2.7-maint branch for continued 2.7 work (and it needs
some),
> and any 3.x work will go on master. Any 2.7 fixes that also go into
3.x
> (and really, most of them should) go into the 2.7 branch *first*, and
then
> be cherry-picked into master (yes, I'll write some docs on that). This
is
> to (hopefully) prevent any 3.x features from being inadvertently
> backported to 2.7.

Your plans sound good for us. 

But we're just releasing a product hosting IronPython 2.6.2, as we're
still bound to .NET 2.0 for some months, but our plans to upgrade to
.NET 4.0 are on the way. So we are interested in smooth migration paths
for our customers.

Will it be possible to integrate / host both python 2.x (2.7.x) and 3.x
in the same application?

And is there some mechanism to auto-recognize whether a Script is python
2.x or 3.x syntax? Maybe some "from __future__ import Python3" or
something?

If there's work needed in that area, maybe I can convince my seniors
that we contribute.

(I used to work a lot with Python and contribute to free projects in
some of my former working places...)

Best regards

Markus Schaber

-- 
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Ironpython and Berkeley License

2011-03-04 Thread Markus Schaber
Hi, Jimmy,

Thanks for the pointer, I'll ask the cPython people.

Our Lawyer specifically dislikes paragraph 3 of the Berkeley DB license, which 
states: "[...] information how to obtain complete source code for the DB 
software _and_any_accompanying_software_ that uses the DB software.[...]".

So if we manage to exclude all parts which are covered by the Berkeley DB 
license (and thus the BDB license itself), we are fine with both cPython and 
IronPython licenses, as well as all other licenses in LICENSE.txt.

Besides that, our Software is nearly 100% .NET, so IronPython is the much 
better choice than cPython from an integration aspect.

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax 
+49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: 
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915 
-Ursprüngliche Nachricht-
Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Jimmy Schementi
Gesendet: Donnerstag, 3. März 2011 17:46
An: Discussion of IronPython
Betreff: Re: [IronPython] Ironpython and Berkeley License

On Thu, Mar 3, 2011 at 11:27 AM, Markus Schaber  
wrote:
> Hi, Jimmy,
>
> We use IronPython 2.6 which is not covered by the Apache license, but still 
> by some Microsoftish license.

The Microsoftish-license is the Microsoft Public License:
http://www.opensource.org/licenses/ms-pl

> However, we want to redistribute the python part of the python standard 
> library (which is distributed with the IronPython 2.6.2 binary installer for 
> windows as well), so our users can use the full power of all those nice .py 
> modules, and those are covered by a LICENSE.txt file which contains a 
> concatenation of several licenses that also cover the 3rd party libraries 
> implemented in C delivered with cPython.
>
> As it seems, however, the packager of the IronPython installer simply copied 
> the LICENSE.txt without removing those licenses that don't apply to the pure 
> python part of the license.

Because IronPython redistributes the Python standard library, it is kept 
in-tact, including any license files. If the Python standard library's 
LICENSE.txt is unclear as to what parts of Python are under what license (which 
IMO it is), then that's feedback we can take to the CPython team. Looks like 
they have more informative license information here: 
http://docs.python.org/license.html

But it sounds like if you wanted to embed CPython in your application you would 
not be OK with doing that because of the license?

> Best regards
>
> Markus Schaber
>
> ___________
> We software Automation.
>
> 3S-Smart Software Solutions GmbH
> Markus Schaber | Developer
> Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | 
> Fax +49-831-54031-50
>
> Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
> CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys 
> sample projects: 
> http://www.3s-software.com/index.shtml?sample_projects
>
> Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | 
> Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
>
>
> -Ursprüngliche Nachricht-
> Von: users-boun...@lists.ironpython.com 
> [mailto:users-boun...@lists.ironpython.com] Im Auftrag von Jimmy 
> Schementi
> Gesendet: Donnerstag, 3. März 2011 17:08
> An: Discussion of IronPython
> Betreff: Re: [IronPython] Ironpython and Berkeley License
>
> That license applies to the CPython standard library. The Apache 2 License 
> covers everything in IronPython*.dll.
>
> ~Jimmy
>
> On Thu, Mar 3, 2011 at 10:23 AM, Markus Schaber  
> wrote:
>> Hi,
>>
>> The binary installer of IronPython 2.6 contains the lib subdirectory, 
>> which seems to be a rather 1:1 copy of the cPython standard library.
>>
>> This standard library contains a LICENSE.txt file that, besides 
>> others, contains the Berkeley Database License:
>>
>> --- snip ---
>> This copy of Python includes a copy of Berkeley DB, which is licensed 
>> under the following terms:
>> [...]
>>
>>  * 3. Redistributions in any form must be accompanied by information 
>> on
>>  *    how to obtain complete source code for the DB software and any
>>  *    accompanying software that uses the DB software.  The source 
>> code
>>  *    mus

Re: [IronPython] Ironpython and Berkeley License

2011-03-03 Thread Markus Schaber
Hi, Jimmy,

We use IronPython 2.6 which is not covered by the Apache license, but still by 
some Microsoftish license.

However, we want to redistribute the python part of the python standard library 
(which is distributed with the IronPython 2.6.2 binary installer for windows as 
well), so our users can use the full power of all those nice .py modules, and 
those are covered by a LICENSE.txt file which contains a concatenation of 
several licenses that also cover the 3rd party libraries implemented in C 
delivered with cPython.

As it seems, however, the packager of the IronPython installer simply copied 
the LICENSE.txt without removing those licenses that don't apply to the pure 
python part of the license.

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax 
+49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: 
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade 
register: Kempten HRB 6186 | Tax ID No.: DE 167014915 


-Ursprüngliche Nachricht-
Von: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] Im Auftrag von Jimmy Schementi
Gesendet: Donnerstag, 3. März 2011 17:08
An: Discussion of IronPython
Betreff: Re: [IronPython] Ironpython and Berkeley License

That license applies to the CPython standard library. The Apache 2 License 
covers everything in IronPython*.dll.

~Jimmy

On Thu, Mar 3, 2011 at 10:23 AM, Markus Schaber  
wrote:
> Hi,
>
> The binary installer of IronPython 2.6 contains the lib subdirectory, 
> which seems to be a rather 1:1 copy of the cPython standard library.
>
> This standard library contains a LICENSE.txt file that, besides 
> others, contains the Berkeley Database License:
>
> --- snip ---
> This copy of Python includes a copy of Berkeley DB, which is licensed 
> under the following terms:
> [...]
>
>  * 3. Redistributions in any form must be accompanied by information 
> on
>  *    how to obtain complete source code for the DB software and any
>  *    accompanying software that uses the DB software.  The source 
> code
>  *    must either be included in the distribution or be available for 
> no
>  *    more than the cost of distribution plus a nominal fee, and must 
> be
>  *    freely redistributable under reasonable conditions. [...]
> --- snap ---
>
> This seems to be a GPL-like viral license, which would be somewhat 
> harassing for our current project.
>
> However, it seems that the bsddb module is not included in IronPython 
> (because it is not compatible with IronPython at the moment).
>
> Is there someone who can confirm that the Berkeley DB and the code 
> covered by that license is currently not part of IronPython?
>
> Best regards
>
> Markus Schaber
>
> ___
> We software Automation.
>
> 3S-Smart Software Solutions GmbH
> Markus Schaber | Developer
> Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | 
> Fax +49-831-54031-50
>
> Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
> CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys 
> sample projects:
> http://www.3s-software.com/index.shtml?sample_projects
>
> Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | 
> Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
>
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Ironpython and Berkeley License

2011-03-03 Thread Markus Schaber
Hi,

The binary installer of IronPython 2.6 contains the lib subdirectory,
which seems to be a rather 1:1 copy of the cPython standard library.

This standard library contains a LICENSE.txt file that, besides others,
contains the Berkeley Database License:

--- snip ---
This copy of Python includes a copy of Berkeley DB, which is licensed
under the following terms:
[...]

 * 3. Redistributions in any form must be accompanied by information on
 *how to obtain complete source code for the DB software and any
 *accompanying software that uses the DB software.  The source code
 *must either be included in the distribution or be available for no
 *more than the cost of distribution plus a nominal fee, and must be
 *freely redistributable under reasonable conditions. [...]
--- snap ---

This seems to be a GPL-like viral license, which would be somewhat
harassing for our current project.

However, it seems that the bsddb module is not included in IronPython
(because it is not compatible with IronPython at the moment).

Is there someone who can confirm that the Berkeley DB and the code
covered by that license is currently not part of IronPython?

Best regards

Markus Schaber

___
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.scha...@3s-software.com | Web: http://www.3s-software.com 
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com