[IronPython] Who's who in IronPython world

2008-08-08 Thread Sanghyeon Seo
I've started a wiki page on IronPython Cookbook to collect info
regarding who's who in IronPython world.
http://www.ironpython.info/index.php/People

It would be awesome if some Microsoft people can clarify the team's
organizational structures, job titles, current list of team members,
etc.

Other people on the list, feel free to list your name there.

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


Re: [IronPython] Standard Library Inclusion - C Extension Modules

2008-08-07 Thread Sanghyeon Seo
2008/8/7 Michael Foord <[EMAIL PROTECTED]>:
> For example, could sqlite be ported with a compatibility shim and
> System.Data.SQLite?
> http://sqlite.phxsoftware.com/

I must mention pyexpat here, which a lot of Python XML tools rely on,
and which has been available as a compatibility shim around System.Xml
since 2005 from FePy.

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


Re: [IronPython] NWSGI 0.4 released

2008-08-05 Thread Sanghyeon Seo
2008/8/6 Jeff Hardy <[EMAIL PROTECTED]>:
>  I'm going to start testing against some other applications as well,
> and post the results on my blog - jdhardy.blogspot.com - as well as
> the compatibilty pages on ironpython.info.

Once Django is working, I think you should try Pinax as well. Pinax is
a collection of applications built on Django.

http://pinaxproject.com/

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


Re: [IronPython] Using a c library as a dll or assembly

2008-08-05 Thread Sanghyeon Seo
2008/8/5 Anders Elfgren <[EMAIL PROTECTED]>:
> Another (unrelated) question: What's the best way to debug IronPython
> programs? "print-debugging" is not very effective. (maybe this deserves a
> mail thread of its own)

I believe you can debug IronPython programs with standard CLR
debuggers, since IronPython generates all necessary debug symbols. For
example, you should be able to use Visual Studio to debug IronPython
programs.

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


Re: [IronPython] Security of DLR host

2008-08-05 Thread Sanghyeon Seo
2008/8/6 Pavel Ĺ avara <[EMAIL PROTECTED]>:
> 3) Could be IL generated by DLR somehow intercepted (for security reasons) ?

This is definitely possible but probably outside of the scope of DLR.
(Therefore you may be required to edit the source code yourself.)

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


Re: [IronPython] Performance issue when calling a function with **kw

2008-08-05 Thread Sanghyeon Seo
2008/8/6 Dino Viehland <[EMAIL PROTECTED]>:
> On my machine it is about 40% faster in 2.0 than 1.1.1 but still about 2x 
> slower than CPython

I don't see this speedup on Mono. I should file a Mono perf bug.

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


Re: [IronPython] Performance issue when calling a function with **kw

2008-08-03 Thread Sanghyeon Seo
2008/8/3 Asaf Kleinbort <[EMAIL PROTECTED]>:
> Calling a function with **kw takes about 10 times more time than calling a
> function with a simple dictionary.  The difference exists also in cpython
> but there the differences is hardly noticed.
>
> Does anyone know if this is going to improve in version 2.0?

As far as I can tell IronPython 2 does not improve this case.

However, IronPython 2 does improve *seq case, more than a factor of
two, compared to IronPython 1. I have a plan to do a comprehensive
benchmark of call sequences for CPython, IronPython 1, and IronPython
2, based on callbench developed in PyPy. Ah, procrastination...

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


Re: [IronPython] Switching Mailing List to CodePlex

2008-07-24 Thread Sanghyeon Seo
> If you've got a strong opinion about CodePlex mailing lists one way or
> another, please let me know.

I am okay with it provided that all previous links to Mailman archive
transparently redirects, forever, to the correct place.

Otherwise I am strongly against. (I probably made hundreds of links to
the archive of this mailing list, and it's only me.)

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


Re: [IronPython] os.system

2008-07-24 Thread Sanghyeon Seo
2008/7/24 John Case (Excell Data Corporation) <[EMAIL PROTECTED]>:
> With IronPython, what do I use instead of os.system('dir'), or
> os.popen('dir') to achieve the same result?

Other people replied with good answers for os.popen/os.system matters,
but you can achieve the same result with os.listdir, if what you want
to run is just dir.

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


Re: [IronPython] IronPython Post 2.0 Roadmap

2008-07-20 Thread Sanghyeon Seo
2008/7/20 Dody Gunawinata <[EMAIL PROTECTED]>:
> I was thinking more in the line of being able to use Python classes directly
> from C#. But again, this has nothing to do with the Python language in the
> first place.

I think that would be the feature of C#.

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


Re: [IronPython] IronPython Post 2.0 Roadmap

2008-07-19 Thread Sanghyeon Seo
2008/7/20 Harry Pierson <[EMAIL PROTECTED]>:
> Hosting features are all done via the DLR, so that's a separate team. As for
> "ability to interact with the rest of the .Net framework", can you be more
> specific about what you're looking for in that space? What *isn't* IPy doing
> that you want it to?

.NET attributes?

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


Re: [IronPython] IronPython and Paramiko?

2008-07-02 Thread Sanghyeon Seo
2008/7/2 Curt Hagenlocher <[EMAIL PROTECTED]>:
> The requirement for PyCrypto means that this won't work as-is under
> IronPython.  Although Paramiko itself is pure Python, PyCrypto is a C
> extension.  It's possible that you could get something going with the
> IronClad project (http://code.google.com/p/ironclad/) which aims to allow
> you to use C extensions with IronPython.

Or FePy project has a reimplementation of PyCrypto for IronPython.

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


Re: [IronPython] restrict scripting access

2008-06-30 Thread Sanghyeon Seo
2008/6/30 Rainer Worbis <[EMAIL PROTECTED]>:
> is there a way to restrict access to objects or namespaces within a script?
> We use IronPython for providing scripting functionality within our .NET
> Application but would like to restrict access to certain functions. Has
> anybody information or a sample how to do that?

Proper sandboxing is a difficult problem. Take a look at the following
post for a good overview.

http://radix.twistedmatrix.com/2008/05/requirements-for-restricted-execution.html

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


Re: [IronPython] Using pyc.py to make stand-alone executables

2008-06-18 Thread Sanghyeon Seo
Can't answer other questions, but...

2008/6/19 joeymcjoejoe <[EMAIL PROTECTED]>:
> Some I can't even find in the Lib directory, e.g.: sys, time, datetime. What
> do I do in that case?

Nothing. These modules are implemented in IronPython.dll.

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


Re: [IronPython] _ast Module

2008-06-14 Thread Sanghyeon Seo
2008/6/14 Dan Eloff <[EMAIL PROTECTED]>:
> Since Jinja appears to be non-trivial to run in Silverlight, I'm also
> looking into Mako. Unfortunately, it looks like I hit another brick
> wall. Mako uses the _ast module, which is not available in IronPython
> as far as I'm aware. Is the ast module in fepy related to this at all?
> I'm out of options here too, aren't I?

No, FePy's ast module creates AST nodes defined in compiler.ast
module, not _ast module.

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


Re: [IronPython] static compilation of Python scripts

2008-05-30 Thread Sanghyeon Seo
2008/5/30 Ben Aurel <[EMAIL PROTECTED]>:
> Is it possible to build an assembly that exposes the contents
> (types,...) when imported into a C# class the same way if it would
> have be written in plain C#?

No. Not currently.

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


Re: [IronPython] Hosting IP2 Beta2 in Mono?

2008-05-27 Thread Sanghyeon Seo
2008/5/20 Douglas S. Blank <[EMAIL PROTECTED]>:
> Seo at al.,
>
> If you want to grab the patches for an IPCEr8 which will build and run IP2B2:
>
> svn export
> http://svn.cs.brynmawr.edu/Myro/trunk/fepy/IPCE/fepy/patches/2.0b2/

Sorry for a long delay. This is a great work! Thank you. These changes
are now incorporated in FePy SVN:
http://fepy.svn.sourceforge.net/viewvc/fepy?view=rev&revision=588

However, your patch-builtin-mapsite is incorrect. A function to map
can be null (Python None) in valid Python code. Try "map(None, [])"
for an example.

My workaround involves moving local DynamicSite varaibles to static
and using EnsureInitialized to initialize them. See:
http://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/latest/patch-builtin-mapsite

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


Re: [IronPython] RPyC and IronPython

2008-05-22 Thread Sanghyeon Seo
2008/5/22 Ronnie Maor <[EMAIL PROTECTED]>:
> 2) id(obj) in IPy returns System.Int64, which unfortunately doesn't pickle
> out of the box, since it's not a python native type.

This is clearly a bug. Actually, there already is a CodePlex issue,
but it is mistitled.
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=16000

1. Can people on the list please vote for this?
2. Can IronPython people please retitle this to something like "id
shoud not return Int64"?

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


Re: [IronPython] ZipImport

2008-05-20 Thread Sanghyeon Seo
2008/5/21 McClure, Timothy J (GE EntSol, Security) <[EMAIL PROTECTED]>:
> Does anyone know how to get around the zipimport module not found issue?

None I know of. This is on my TODO list.

If you want to solve this yourself, you may want to look at this pure
Python implementation of zipimport and whether it can be used on
IronPython:
http://svn.python.org/projects/sandbox/trunk/import_in_py/

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


[IronPython] Regular expression option using (?...) syntax is not applied

2008-05-18 Thread Sanghyeon Seo
IronPython 2.0 Beta 2.

>>> import re
>>> re.compile(r'^bar', re.M).search('foo\nbar') is not None
True
>>> re.compile(r'^bar(?m)').search('foo\nbar') is not None
False

Two expressions should produce the same result. This blocks Jinja, a
Python template engine.

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


Re: [IronPython] 2 Basic question about IronPython and dyn. langs in general

2008-05-14 Thread Sanghyeon Seo
2008/5/15 Ben Aurel <[EMAIL PROTECTED]>:
> 2. I've read about, that it is possible to compile Python Code to msil with
> IronPython. Unfortunately I'm not yet at the point where this run on my
> machine (macosx). So I do have to ask you: Is such a dll/exe the same as I
> would compile it from c#? Does similar language constructs (eg. for loop,
> class object creation) the same performance?

You can run IronPython on Mac OS X with Mono.

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


Re: [IronPython] Updating WebServices samples

2008-05-09 Thread Sanghyeon Seo
2008/5/9 Christian Muirhead <[EMAIL PROTECTED]>:
> Is there any chance that someone has updated these to work with the IP2
> architecture? If not, how much work would people expect it to be? The errors
> I saw when I quickly tried to compile the C# were primarily about not being
> able to find the IAttributesInjector and ICallable interfaces - do these
> exist in the same form in the new architecture?

I think IAttributesInjector -- which was hacky, IMO -- has been
replaced by defining GetBoundMember method and marking the method with
SpecialNameAttribute.

Details are here:
http://blogs.msdn.com/srivatsn/archive/2008/04/12/turning-your-net-object-models-dynamic-for-ironpython.aspx

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


Re: [IronPython] IronPython and nose

2008-04-28 Thread Sanghyeon Seo
2008/4/29 Sakesun Roykiattisak <[EMAIL PROTECTED]>:
>  are you sure the patch is right ?
>
>  @@ -146,7 +146,7 @@
> self.exclude = None
> self.getTestCaseNamesCompat = False
> self.includeExe = env.get('NOSE_INCLUDE_EXE',
>  -sys.platform == 'win32')
>  +sys.platform == ('win32', 'cli'))
>
>
>
>  Isn't it should be "sys.platform in ('win32', 'cli'))" ?

Oops, you are absolutely right. (Die in shame.)

For my defence, this is a documentation, not a code. (It is a
documentation including the copy of code to explain how exactly config
is set...) I did run full tests before submitting the patch, so
executable part is correct...

/me dies in shame anyway.

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


[IronPython] IronPython and nose

2008-04-28 Thread Sanghyeon Seo
nose is a popular testing framework for Python.
http://code.google.com/p/python-nose/

Current SVN trunk *almost* works with IronPython 1.1.1. I filed an
issue to nose project's issue tracker for remaining problems.
http://code.google.com/p/python-nose/issues/detail?id=183

Then I realized that it is using os.access implemented in FePy patch,
not in official IronPython. Too bad! So if any of you want to use nose
with IronPython, please go vote CodePlex #8073.
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=8073

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


[IronPython] Traceback regression

2008-04-27 Thread Sanghyeon Seo
Traceback has regressed.

import sys
def f(): 1/0
try: f()
except: tb = sys.exc_info()[2]
while tb:
print tb.tb_lineno
tb = tb.tb_next

CPython: 3 2
IronPython 1.1.1: 3 2
IronPython 2.0a5: 2
IronPython 2.0b1: (nothing)

This is not 1.x->2.x regression. This is regression between 2.x series.

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


Re: [IronPython] Using ipy to "control" a form

2008-04-09 Thread Sanghyeon Seo
2008/4/10, Greg Akins <[EMAIL PROTECTED]>:
>  As I initially investigate IronPython, I assumed it would be possible
>  to control a form from ipy

If what you are trying to do is to play with WinForms from the
interactive console, then you may want to study Tutorial/winforms.py
carefully. (Or just use it.)

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


Re: [IronPython] Question about serialization

2008-03-26 Thread Sanghyeon Seo
2008/3/26, Paul Turbett <[EMAIL PROTECTED]>:
>  It seems that whilst serializing .NET classes is trivial, and serializing
> python classes is trivial, serializing something that touches both is
> proving quite difficult.
>
>  Any further suggestions gratefully received!

I suggest using copy_reg to register .NET class to Python pickle mechanism.
See: http://docs.python.org/lib/module-copyreg.html

I actually implemented this back in the last year.
http://lists.ironpython.com/pipermail/users-ironpython.com/2007-February/004509.html
http://fepy.svn.sourceforge.net/svnroot/fepy/trunk/fepy/pickle.py

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


Re: [IronPython] SetSocketOption error on OSX

2008-03-26 Thread Sanghyeon Seo
2008/3/26, Duncan Foster <[EMAIL PROTECTED]>:
>  Traceback (most recent call last):
>   File httplib, line unknown, in getreply
>   File httplib, line unknown, in getresponse
>   File httplib, line unknown, in __init__
>   File System, line unknown, in set_ReceiveBufferSize
>   File System, line unknown, in SetSocketOption
>  WindowsError: Invalid arguments

This is likely to be a Mono bug, probably specific to Mac OS X.

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


Re: [IronPython] CherryPy and IronPython 2.0b1

2008-03-24 Thread Sanghyeon Seo
2008/3/24, Jeff Hardy <[EMAIL PROTECTED]>:
> Hi all,
>  After applying the attached patch to cherrypy trunk (r1932), CherryPy
>  will run a simple Hello World program (also attached) using IronPython
>  2.0b1 and NWSGI. It should work with the 0.1 release of NWSGI. I
>  haven't tested the standalone CherryPy server yet.

A small remark:
+ d = dict(child.__class__.__dict__).copy()

Since you are already copying, I think copy method call would be
unnecessary. So:
+ d = dict(child.__class__.__dict__)

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


Re: [IronPython] IPCE: getting started

2008-03-21 Thread Sanghyeon Seo
2008/3/21, Douglas S. Blank <[EMAIL PROTECTED]>:
>  1) I can't seem to import random:
>
>  This works with IPCE-r7/ipy/ipy.exe. Do I need a more modern mono? Or is
>  there another issue?

Yes. You need Mono version at least 1.2.6 to run IronPython 2.x.

>  2) I'd use 1.1, but it doesn't seem to load Windows.Forms:

This works for me.

>  3. I tried to build from svn sources, but the build.sh looks unmaintained:
>   a. it stopped due to missing ../website/license.html (I made one)
>   b. python-irclib-0.4.6.tar.gz was missing (I downloaded it)

0. Build stuffs inside IPCE were not really for public consumptions. :(
a. Yes. You need to run "make" inside website directory.
b. The idea is that you run ./download.sh and then ./build.sh.

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


Re: [IronPython] [IronPython 1.1] Scoping Advice(?)

2008-03-15 Thread Sanghyeon Seo
2008/3/14, Leo Carbajal <[EMAIL PROTECTED]>:
> What I'm looking for is some advice as to how to tighten the scope of a
> module so that only the exposed hooks of my API are available. What I mean
> to say is, those API hooks are already visible, what bothers me is that I
> can type a couple of import statements into a script and do things like
> inspect the file system and manipulate those files, etc. After poking at the
> source I did something really inelegant, I made it so the parser did not
> recognize the import keyword, but I can't help but think there has to be a
> better way (as well as unseen consequences I haven't run into yet).

What you are describing is usually called "sandboxing", not "scoping".
Searching for "sandboxing Python" should give you some useful results.
Unfortunately, there is no simple and complete solution yet, as far as
I know.

Can you use .NET's application domain to isolate IronPython codes?

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


Re: [IronPython] DLR group?

2008-03-15 Thread Sanghyeon Seo
2008/3/15, IMFD <[EMAIL PROTECTED]>:
> Thanks Nick and Bill.  I have been looking into the CLR internals for
>  a while now.  I will take a look at the documentation links as well.
>  I assume that any of the classic compiler texts (Aho, Appel) would be
>  sufficient for taking apart the ToyScript language?  Or does the DLR
>  have a framework for interpreting built in?  I know the VS SDK has
>  tools like MPLEX and the DSL tools for languages.  Does the DLR have
>  something similar or is it worth a homegrown implementation?

Classic compiler texts should be sufficient. DLR does not dictate you
to use any specific parsing technology. IronPython uses homegrown
lexer and parser, for example.

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


Re: [IronPython] How to import python folders as modules

2008-02-27 Thread Sanghyeon Seo
2008/2/27, Jose Ignacio Gisbert <[EMAIL PROTECTED]>:
>  What I do is to create a folder named "xmpp" under App_Script folder (so
>  xmpp path it's no necessary I think), and after I attach xmpp files to it
>  (including __init__.py).
>
>  Then, I import module as I did in Python, "import xmpp", and what I receive
>  is an error message with "No module named xmpp"

What is App_Script folder?

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


Re: [IronPython] Exporting Python code as an assembly

2008-02-26 Thread Sanghyeon Seo
2008/2/27, Dino Viehland <[EMAIL PROTECTED]>:
> What's MakeModule.py?

Curt Hagenlocher's work-in-progress tool which was discussed on this list.
http://hagenlocher.org/software/ClrWrapper.zip

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


[IronPython] PyYAML on IronPython

2008-02-02 Thread Sanghyeon Seo
Hello the IronPython list and yaml-core list,

Some of you may want to investigate PyYAML on IronPython test
failures, performance, etc.

$ svn co http://svn.pyyaml.org/pyyaml/trunk pyyaml
$ cd pyyaml

$ PYTHONPATH=lib python tests/test_yaml.py # Python 2.4
Ran 1210 tests in 4.638s
OK
$ IRONPYTHONPATH=lib ipy tests/test_yaml.py # IronPython 1
Ran 1210 tests in 36.698s
FAILED (failures=8, errors=57)
$ IRONPYTHONPATH=lib ipy2 tests/test_yaml.py # IronPython 2
Ran 1210 tests in 61.871s
FAILED (failures=7, errors=57)

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


[IronPython] Tracing imports

2008-01-25 Thread Sanghyeon Seo
This patch implements import tracing enabled by -v option to Python.
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/2.0a7/patch-option-v

Very simplistic but enough to be useful.

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


Re: [IronPython] dictproxy.get

2008-01-23 Thread Sanghyeon Seo
2008/1/24, Sanghyeon Seo <[EMAIL PROTECTED]>:
> IronPython 2 reports: AttributeError: 'dictproxy' object has no attribute 
> 'get'
> Note: works fine on IronPython 1.

Here is a simple and working fix.
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/2.0a7/patch-dictproxy

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


[IronPython] dictproxy.get

2008-01-23 Thread Sanghyeon Seo
IronPython 2 reports: AttributeError: 'dictproxy' object has no attribute 'get'
Note: works fine on IronPython 1.

class Singleton(object):
def __new__(cls):
obj = Singleton.__dict__.get(cls.__name__)
if obj is None:
obj = object()
setattr(Singleton, cls.__name__, obj)
return obj

class X(Singleton):
pass

a = X()
b = X()
c = Singleton.X
assert a is b
assert a is c

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


Re: [IronPython] [python] Re: The __hello__ Module

2008-01-21 Thread Sanghyeon Seo
2008/1/22, Dino Viehland <[EMAIL PROTECTED]>:
> Actually, on 2nd thought, I'm not going to do __hello__ right now.  It's 
> interesting because it's the top of the frozen module iceberg.

Indeed, and I'm not sure whether the frozen module makes any sense in
IronPython world. It's hardly used in CPython these days.

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


[IronPython] Priting with comma

2008-01-20 Thread Sanghyeon Seo
The following program produces different output on CPython and
IronPython 1 and 2.

print 1,

A strange corner case indeed.

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


Re: [IronPython] No import this?

2008-01-14 Thread Sanghyeon Seo
David Seruyange wrote:
> Does IronPython strip the easter egg?

2008/1/15, Dino Viehland <[EMAIL PROTECTED]>:
> We just don't include the standard library by default (which is where this
> comes from).  If you set IRONPYTHONPATH=C:\Python25\Lib (or wherever your
> Python lib dir is) or you start IronPython from the lib dir it'll work.

If we are to discuss the easter egg... How about this?
>>> from __future__ import braces

Hehe.

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


Re: [IronPython] wxPython and Ironpython

2008-01-09 Thread Sanghyeon Seo
2008/1/9, jane janet <[EMAIL PROTECTED]>:
>  The important reason is my big old application was written in Python using
> wxPython to create GUI.
>  But I have to use IronPython because my new application must use .NET
> library.
>  How can I integrate these stuff.
>  Please tell me what is the best way for me.

This sounds like a good fit for Python.NET. Python.NET allows you to
use .NET libraries with vanilla Python (so you can use wxPython too).

http://pythonnet.sourceforge.net/

Or you can write .NET part in IronPython (or anything, really) and use
IPC to communicate with GUI.

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


Re: [IronPython] Encoding Issue with Hex

2008-01-06 Thread Sanghyeon Seo
2008/1/7, Davy Mitchell <[EMAIL PROTECTED]>:
> There's a few encoding issues on CodePlex. Does this fall under one of them?
>
> IronPython console: IronPython 2.0A6 (2.0.11102.00) on .NET 2.0.50727.1433
> Copyright (c) Microsoft Corporation. All rights reserved.
> >>> _BYTES = '7FF87FF0'.decode('hex')
> Traceback (most recent call last):
>   File , line 0, in ##233
> LookupError: unknown encoding: hex

Yes. But "import encodings" should make hex encoding available.

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


Re: [IronPython] [python] IronPython Community Edition - FeedParser Weirdness

2007-12-27 Thread Sanghyeon Seo
2007/12/28, Tim Riley <[EMAIL PROTECTED]>:
> Yeah something isn't right.

Can you try again after updating pyexpat.py from SVN?
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/lib/pyexpat.py

I fixed a bug with CDATA handling. That might be it.

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


[IronPython] File as TextReader

2007-12-17 Thread Sanghyeon Seo
I wrote a short howto on passing Python's file-like objects to .NET
API expecting TextReader.

http://www.ironpython.info/index.php/File_as_TextReader

1. Does this look okay? It does work.

2. It would be nice if IronPython can provide conversions like these.
Another example would be Python datetime and .NET DateTime. Already
implemented example is constructing Python file from .NET Stream. What
do you think?

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


[IronPython] Slice assignment in array

2007-12-17 Thread Sanghyeon Seo
>>> import clr
>>> abc = 'abc'.ToCharArray()
>>> cd = 'cd'.ToCharArray()
>>> abc[1:] = cd
Traceback (most recent call last):
ValueError: cannot do slice assignment w/ no step

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


Re: [IronPython] raw_input seems to hang (for winXP ipy 2.0a6)

2007-12-17 Thread Sanghyeon Seo
2007/12/18, Vizcayno <[EMAIL PROTECTED]>:
> >>> test_save = raw_input('[T]est [S]ave?: ')
> [T]est [S]ave?: S
>
> No answer is received, it hangs until you repeat typing the Enter key
> (9 or more times).

This works fine for me on Mono/Linux.

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


Re: [IronPython] Question about Web FrameWorks

2007-12-16 Thread Sanghyeon Seo
2007/12/17, Vizcayno <[EMAIL PROTECTED]>:
> Jimmy: Thanks for your attention. I have the first library where I
> have troubles when trying to test Django: the module pyexpat
> Regards.

IronPython port of CPython pyexpat is available here:
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/lib/pyexpat.py

In general, many issues you will meet is often resolved in FePy.
http://fepy.sourceforge.net/

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


Re: [IronPython] Libraries: python and iron python

2007-12-10 Thread Sanghyeon Seo
2007/12/10, Kaveripakam, Sathish <[EMAIL PROTECTED]>:
> I am trying to port some of the python scripts to Iron python. In this
> regard, I found that some of the libraries in python: traceback, pprint,
> string, types etc., are not present with the same name in Iron python. I was
> wondering, is there any URL, which tells about the names given to them in
> Iron Python.

You can simply copy these libraries from Python.

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


Re: [IronPython] problem accessing/import System.IO.Packaging using IronPython

2007-11-28 Thread Sanghyeon Seo
2007/11/29, Raymond Yee <[EMAIL PROTECTED]>:
> # I can't figure out how to load System.IO.Packaging -- which is part of
> .NET 3.0
> #
> http://msdn2.microsoft.com/en-us/library/system.io.packaging.package.aspx
> is part of .NET 3.0

The MSDN page you linked says:

Package Class
Namespace: System.IO.Packaging
Assembly: WindowsBase

This should work:

import clr
clr.AddReference('WindowsBase')
from System.IO.Packaging import Package

So, when you read MSDN, pay attention to which assembly the class is from.

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


Re: [IronPython] [Bulk] IronPython.sln and .NET 3.5/Visual Studio2008

2007-11-28 Thread Sanghyeon Seo
2007/11/29, Keith J. Farmer <[EMAIL PROTECTED]>:
> The only impediment I can think of would be whether Mono's tools can handle 
> it.  I haven't touched Mono in ages, so I don't know one way or the other.

This is okay, since I use NAnt to build on Mono, not xbuild (Mono's
counterpart to msbuild).

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


Re: [IronPython] DLR Hosting Spec

2007-11-19 Thread Sanghyeon Seo
2007/11/20, Dino Viehland <[EMAIL PROTECTED]>:
> We look forward to any feedback you might have!
> You can grab the spec here: http://www.iunknown.com/files/dlr-spec-hosting.pdf

I think there are a lot of things to learn from Java. Java 6
introduced javax.script hosting API.
http://java.sun.com/javase/6/docs/api/javax/script/package-summary.html

For example, ScriptRuntime corresponds to Java's ScriptEngineManager.
We can compare API to get scripting engine for the given language.

DLR
ScriptEngine GetEngine(string languageId)
ScriptEngine GetEngineByFileExtension(string extension)

javax.script
ScriptEngine getEngineByName(String shortName)
ScriptEngine getEngineByExtension(String extension)
ScriptEngine getEngineByMimeType(String mimeType)

Is getEngineByMimeType a good idea? Similar comparisons can be made
for all other APIs too.

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


Re: [IronPython] Announcing NWSGI

2007-11-13 Thread Sanghyeon Seo
2007/11/14, Jeff Hardy <[EMAIL PROTECTED]>:
> I'm also aware of Seo's and others' work on a similar setup for
> IronPython 1.0 (included with FePy). The two major differences are
> that this is a 2.0-targeted version, and that NWSGI is a pure C#
> implementation (the old one uses a Python file for most of the work).

I don't understand why "written in pure C#" is an advantage (given
that you need Python engine to implement WSGI anyway), or why using
Python is an disadvantage (after all Python is a better language than
C#, isn't it? If it isn't why are you using WSGI?), but I guess it's a
matter of opinion.

Also note that writing most codes in Python neatly avoids any hosting
API issues.

I hope you best luck, but I strongly believe writing most codes in
Python is the right implementation choice.

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


Re: [IronPython] Invoking delegate to abstract method

2007-11-12 Thread Sanghyeon Seo
2007/11/9, Sanghyeon Seo <[EMAIL PROTECTED]>:
> For whatever reasons, IronPython 2.0 Alpha 6 started to invoke
> delegate to abstract method. (Previous versions didn't.) This
> triggered Mono bug 317488 which is apparently hard to fix.
> https://bugzilla.novell.com/show_bug.cgi?id=317488

Thankfully, Mono developers resolved this bug as of SVN r89500.

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


[IronPython] Another trivial bug

2007-11-12 Thread Sanghyeon Seo
Is trivial bugs week over yet?

Please fix
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=5814

This came to my attention thanks to a patch by Hajime Nakagami. The
bug is nearly a year old, and can only be explained by sloppiness.
Well, we all make mistakes...

Please fix it in both 1.x and 2.x. Thanks.

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


[IronPython] Pet peeve

2007-11-09 Thread Sanghyeon Seo
Okay, I will be blunt. Please fix
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=6805

It's not like it's difficult! It can be fixed in exact same way it was
fixed in 1.1!

IronPython/Runtime/calls/FunctionCode.cs
ArgCount property
If ArgumentList flag is set, decrease by one
If KeywordDictionary flag is set, decrease by one

Thanks.

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


[IronPython] Invoking delegate to abstract method

2007-11-08 Thread Sanghyeon Seo
For whatever reasons, IronPython 2.0 Alpha 6 started to invoke
delegate to abstract method. (Previous versions didn't.) This
triggered Mono bug 317488 which is apparently hard to fix.
https://bugzilla.novell.com/show_bug.cgi?id=317488

I developed completely insane workarounds to avoid this problem. Now
you can laugh (or weep).
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/latest/patch-317488

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


Re: [IronPython] Anyone know what DLLs is called on Unix?

2007-11-05 Thread Sanghyeon Seo
2007/11/6, Dino Viehland <[EMAIL PROTECTED]>:
> Seo proposed this feature a while ago:
> http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=3730
> and I'm (finally) adding it and wondering what (if anything) we should do if
> the platform is Unix.   Unfortunately I don't have a Unix box handy but I'm
> just guessing it's not called DLLs there J.

I think it's good as-is. For example, Jython is known to use CPython
Windows layout even on non-Windows platforms.

FYI,
C:\Python24\python.exe = /usr/bin/python2.4
C:\Python24\Lib = /usr/lib/python2.4
C:\Python24\DLLs = /usr/lib/python2.4/lib-dynload

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


Re: [IronPython] [Mono-dev] Size of Microsoft.Scripting.dll

2007-11-04 Thread Sanghyeon Seo
2007/11/4, Marek Safar <[EMAIL PROTECTED]>:
> 4% is really small difference. Is binary compiled with /o+ switch ?

I believe /o is on by default in mcs.

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


[IronPython] Size of Microsoft.Scripting.dll

2007-11-04 Thread Sanghyeon Seo
I thought this statistics may be of interest to you.

Size of Microsoft.Scripting.dll in IronPython 2.0 Alpha 2, 3, 4, 5, as
included in the binary release and compiled by Mono 1.2.5 and Mono SVN
r88800.

=== == == == ===
Compiler2.0a2  2.0a3  2.0a4  2.0a5
Binary  836960 857440 906592  959512
Mono 1.2.5  870400 892928 943104 1004032
Mono r88800 869376 891904 942592 1003008
=== == == == ===

Some observations can be made.

1. In all cases, its size is less than 1 MB.
2. It is getting bigger every release. Alpha 5 is about 15% bigger than Alpha 2.
3. Binaries compiled by Microsoft compiler is about 4% smaller than
those by Mono.
4. Differences between Mono 1.2.5 and SVN (soon to be 1.2.6) are negligible.

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


[IronPython] setattr and module

2007-11-02 Thread Sanghyeon Seo
# x.py
# empty

# test.py
import x
setattr(x, 'a', 1)
print x.a

AttributeError: 'module' object has no attribute 'a'

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


[IronPython] Importing package with imp

2007-11-01 Thread Sanghyeon Seo
Importing package with imp module is tested in test_imp_package()
function of test_imp.py. But sys.modules is incorrectly modified by
imp which this test misses...

Okay, if I was not working on some obscure importing hack, I guess no
one would have found this. :(

How to reproduce:

# x/__init__.py
a = 1

# test.py
import imp
imp.load_module('x', None, 'x', ('', '', imp.PKG_DIRECTORY))
import sys
print sys.modules['x'].a

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


[IronPython] sys.argv in the interactive console

2007-10-31 Thread Sanghyeon Seo
Using the interactive console,

$ python
>>> import sys
>>> sys.argv
['']

$ ipy # Both 1.1 and 2.0a5
>>> import sys
>>> sys.argv
[]

Believe it or not, some code depends on sys.argv[0] to be always available.

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


Re: [IronPython] Linux Support

2007-10-31 Thread Sanghyeon Seo
2007/10/31, Evan Klitzke <[EMAIL PROTECTED]>:
> Then I had problems using modules in the standard library. This post
> 
> indicates that I should be able to import most modules from CPython.
> So I set my IRONPYTHONPATH using Unix path convention and nothing
> works. Eventually I figure out that I need to use the Windows
> convention and use semicolons as the path separator (which is
> inconvenient because semicolons need to be escaped in bash). After I
> running ipy.exe hangs and I get an IOError (I think it tried to import
> too many

This is definitely a bug. I reported it on the issue tracker.
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=13618

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


Re: [IronPython] Good example of with statement usage in IronPython/COM

2007-10-27 Thread Sanghyeon Seo
2007/10/28, Shri Borde <[EMAIL PROTECTED]>:
> There was a leak in IronPython where we were keeping COM objects alive once 
> the IPy code manipulated the COM object. The code in the blog seems to be 
> dealing with this bug with the use of the auto method which calls 
> Marshal.ReleaseComObject in the finally. The bug is fixed in the 2.0 tree and 
> so it should be possible to shorten the code a lot and end up with just a few 
> levels of nesting.

Oops, it was a bug then.

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


[IronPython] Good example of with statement usage in IronPython/COM

2007-10-27 Thread Sanghyeon Seo
I found this interesting blog post which has a good example of with
statement (Python 2.5 feature) usage in IronPython/COM.

http://d.hatena.ne.jp/akiramei/20071026/1193419839

It's written in Japanese, but the code speaks for itself. The last
line would translate to something like "It's getting shorter, but
nesting is a bit too deep..."

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


Re: [IronPython] list of python built-in modules that are NOT supported by IronPython available?

2007-10-24 Thread Sanghyeon Seo
2007/10/25, Dino Viehland <[EMAIL PROTECTED]>:
> And the only one of these that we currently implement is select.  Note this 
> is on ipy v2.0 but I believe currently v1.1 and v2.0 have the same set of 
> built-in modules.

They do, with the addition of array module in 2.0 Alpha 5.

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


Re: [IronPython] dynamic languages and .net 1.0

2007-10-24 Thread Sanghyeon Seo
2007/10/25, Dino Viehland <[EMAIL PROTECTED]>:
> While reflection was there one thing that was missing is good dynamic code
> generation support.  We got that in v2.0 in the form of DynamicMethods.
> That lets us spin up little snippets of code that are fully collectible by
> the GC so it really enables a lot of scenarios that were difficult or
> painful before.

To appreciate the importance of LCG(Lightweight Code Generation) in
.NET 2.0, you may want to read this piece by a JRuby developer:

Lessons learned from JRuby compiler work
http://groups.google.com/group/jvm-languages/browse_thread/thread/dbc3a4a382868904

His first agenda is "We need lightweight method objects". His
explanation gives an idea of "that were difficult or painful before".

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


Re: [IronPython] Experimental C Extensions from IronPython with Python.NET - code and article

2007-10-23 Thread Sanghyeon Seo
2007/10/24, Michael Foord <[EMAIL PROTECTED]>:
> I've just posted the experimental code for accessing CPython extensions
> from IronPython.
>
> Article: http://www.voidspace.org.uk/ironpython/cpython_extensions.shtml
>
> Comments, bugfixes and improvements welcomed!

* Strings from .NET come in as unicode on the CPython type

An evil workaround is to define PyStringConvert as:
def PyStringConvert(obj):
# evil
return PyString(obj).GetAttr('encode').Invoke()

This could be improved on Python.NET side. Any idea?

* Can't yet pass in keyword args to function calls.

This is related to the previous item, because:
>>> def f(a): pass
>>> f(**{u'a': 1})
TypeError: f() keywords must be strings

With the previous workaround in place, replace PythonObject.__call__ with:
def __call__(self, *args, **kw):
args = ConvertToPy(args)
kw = ConvertToPy(kw)
return ConvertToIpy(self.real.Invoke(args, kw))

This is more straightforward than creating PyObject[].

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


Re: [IronPython] A help with an Active Directory object please.

2007-10-21 Thread Sanghyeon Seo
2007/10/22, Vizcayno <[EMAIL PROTECTED]>:
> I especially have difficult to represent  the line:
> IADsLargeInteger largeInteger = new LargeInteger();

I think
largeInteger = ActivedsNET.LargeInteger()

In IronPython instances are constructed by calling types.

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


Re: [IronPython] A help with an Active Directory object please.

2007-10-20 Thread Sanghyeon Seo
2007/10/20, Vizcayno Tamparantan <[EMAIL PROTECTED]>:
> >>> import clr
> >>> clr.AddReferenceToFile("activedsNET.dll")  #Seems not be problem here
> >>> dir(activedsNET)
> Traceback (most recent call last):
>   File , line 0, in ##245
> NameError: name 'activedsNET' is not defined
>
> >>> dir()
> ['__builtins__', '__doc__', '__name__', 'clr', 'sys']  #ActivedsNET is not
> showed

Adding the reference and importing the namespace are separate steps.
Therefore, to use System.Xml namespace contained in System.Xml.dll,
you do:

import clr
clr.AddReference('System.Xml')
import System.Xml

Referenced assemblies may contain multiple namespaces.

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


Re: [IronPython] My takes on C Extensions for IronPython

2007-10-18 Thread Sanghyeon Seo
2007/10/18, Paolo Molaro <[EMAIL PROTECTED]>:
> My point still stands: interoperating with the C code is not an issue.

Agreed.

> Also the gcc CLI backend
> is not really complete and even if it were it doesn't mean that C++/CLI
> would be any easier to implement on top of it.

I'm not interested in C++/CLI, and I don't think it's needed for CPython anyway.

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


Re: [IronPython] Compilation error

2007-10-17 Thread Sanghyeon Seo
2007/10/6, Dino Viehland <[EMAIL PROTECTED]>:
> BTW my simple repro is bogus - it contains no members and section 5.3 of the 
> C# spec defines value types as being definitely assigned when all their 
> members are assigned.  The real issue seems to be when the value-type is 
> defined in another assembly and all the members are private.  Once those 
> conditions are met csc then doesn't require the assignment.
>
> I'm still waiting for a response on that last bit.

Gert Driesen from Mono project reported this as Feedback 304489 at
Microsoft Connect.
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=304489

After 3 days, it was marked "Resolved (By Design)", without any
explanation. I'm still curious.

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


[IronPython] [ANN] IronPython Community Edition r7

2007-10-15 Thread Sanghyeon Seo
This is the seventh release of IronPython Community Edition (IPCE).

Download from SourceForge:
http://sourceforge.net/projects/fepy

FePy project aims to provide enhancements and add-ons for IronPython.
http://fepy.sourceforge.net/

This work was in part supported by Mozilla Corporation.

FePy project got a blog!
http://fepy.blogspot.com/

FePy blog documents two developments not included in this release.
Files under trunk/pyprof/, which tries to implement sys.setprofile
with Mono profiler API. (Thanks to Miguel de Icaza and Paolo Molaro
for help.) Files under bench/, which benchmarks simple IronPython
programs to measure progress of Mono runtime.

This release comes with both IronPython 1.1 and IronPython 2.0 Alpha
5. IronPython 1.x is stable on Mono. IronPython 2.x isn't. For
example, importing string module will crash runtime for Mono 1.2.5.
(But os module works fine, which is much more complex. It's a bit of
hit and miss.)

This release is built with Mono 1.2.5.1. The minimum Mono version
needed to compile and run for IronPython 1.x is 1.2.3. For IronPython
2.x it's 1.2.5. Mono 1.2.5 and 1.2.5.1 are same except for ASP.NET
bugfixes. DLR-based languages won't work with Mono versions before
1.2.5. Please check your Mono version before reporting any problems.

Changes in this release follow. Contributions are credited in parentheses.

IronPython

IronPython 2.0 Alpha 5.

Libraries

dbapi module handles DBNull correctly. (Carsten Haese)
pyexpat module handles DTD. (Shozo Arai)

Bundles

Following modules are now included: decimal, modulefinder, pkgutil, smtplib.
pystone benchmark. (It's under Lib/test.)

irclib, which works great. Try this example as a sanity test.
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/example/irc_test.py

Patches

Patches are documented here.
http://fepy.sourceforge.net/patches.html

New in this release:

For 1.x
patch-ironpython-option-s

For 2.x
patch-{325478,328022,333647} # Numbers refer to Mono bugs
patch-console
patch-cs0177
patch-debug-define
patch-initialize-builtins

Build system

Use NAnt to build IronPython 2.x.
Use quilt to manage patches.
Patches to build all IronPython 2 Alpha releases.
- AssemblyVersion.cs was missing in Alpha 3. (Miguel de Icaza)
Include both IronPython 1.x and 2.x, but share the library using site.py.

Misc

Ms-PL is now included in licenses.

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


[IronPython] Setting builtin_module_names

2007-10-14 Thread Sanghyeon Seo
Currently, sys.builtin_module_names is set in
IronPython.Runtime.SystemState.LoadBuiltins. But this method is called
multiple times with assemblies, by default IronPython.dll and
IronPython.Modules.dll.

Doesn't this belog to InitializeBuiltins method, after Builtins
dictionary is complete?

Especially, renaming nt to posix happens after builtin_module_names is
set, so this change isn't reflected there. And since os.py in the
standard library uses builtin_module_names to detect platform, os.py
is broken on Unix.

Here's my suggested fix:
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/latest/patch-initialize-builtins

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


[IronPython] Compilation warnings on Mono

2007-10-13 Thread Sanghyeon Seo
Attached are compilation warnings on Mono for IronPython 2.0 Alpha 5.

Many of them are noises but most of IronPython.Modules warnings
(except for socket.cs) are valid.

-- 
Seo Sanghyeon
Microsoft.Scripting/Actions/InvokeBinderHelper.cs(41,29): warning CS0219: The 
variable `getAction' is assigned but its value is never used
Microsoft.Scripting/Ast/TryStatement.cs(238,19): warning CS0219: The variable 
`endCatchBlock' is assigned but its value is never used
Microsoft.Scripting/Hosting/ScriptEngine.cs(563,29): warning CS0219: The 
variable `options' is assigned but its value is never used
Microsoft.Scripting/Math/BigInteger.cs(257,13): warning CS0642: Possible 
mistaken empty statement
Microsoft.Scripting/Types/ReflectedTypeBuilder.cs(103,24): warning CS0219: The 
variable `name' is assigned but its value is never used
Microsoft.Scripting/Types/ReflectedTypeBuilder.cs(102,22): warning CS0219: The 
variable `impersonate' is assigned but its value is never used
Microsoft.Scripting/Tuple.cs(210,21): warning CS0219: The variable `argCnt' is 
assigned but its value is never used
Microsoft.Scripting/Actions/NamespaceTracker.cs(158,22): warning CS0169: The 
private method `Microsoft.Scripting.Actions.NamespaceTracker.LoadAllTypes()' is 
never used
Microsoft.Scripting/Actions/TopNamespaceTracker.cs(35,22): warning CS0414: The 
private field `Microsoft.Scripting.Actions.TopNamespaceTracker._isolated' is 
assigned but its value is never used
Microsoft.Scripting/Generation/ByRefReturnBuilder.cs(94,35): warning CS0169: 
The private method 
`Microsoft.Scripting.Generation.ByRefReturnBuilder.GetValue(Microsoft.Scripting.Ast.Expression[],
 Microsoft.Scripting.Ast.Expression, int)' is never used
Microsoft.Scripting/Generation/CodeGen.cs(2021,22): warning CS0169: The private 
method `Microsoft.Scripting.Generation.CodeGen.WriteIL(string, object, object, 
object, object, object)' is never used
Microsoft.Scripting/Generation/DefaultArgBuilder.cs(84,29): warning CS0169: The 
private method 
`Microsoft.Scripting.Generation.DefaultArgBuilder.EmitDefaultValue(Microsoft.Scripting.Generation.CodeGen,
 object, System.Type)' is never used
Microsoft.Scripting/Generation/GlobalAllocator.cs(23,31): warning CS0414: The 
private field `Microsoft.Scripting.Generation.GlobalNamedStorage._type' is 
assigned but its value is never used
Microsoft.Scripting/Generation/StubGenerator.cs(115,31): warning CS0169: The 
private method 
`Microsoft.Scripting.Generation.StubGenerator.CreateSignatureWithContext(int)' 
is never used
Microsoft.Scripting/Shell/CommandLine.cs(119,33): warning CS0169: The private 
method 
`Microsoft.Scripting.Shell.CommandLine.CreateConsole(Microsoft.Scripting.Shell.CommandLine,
 Microsoft.Scripting.Hosting.ScriptEngine, bool, bool)' is never used
Microsoft.Scripting/Types/ReflectedTypeBuilder.cs(426,29): warning CS0169: The 
private method 
`Microsoft.Scripting.Types.ReflectedTypeBuilder.ShouldInclude(System.Type)' is 
never used
Microsoft.Scripting/Types/ReflectedTypeBuilder.cs(682,46): warning CS0169: The 
private method 
`Microsoft.Scripting.Types.ReflectedTypeBuilder.EmptyTransformer()' is never 
used
IronPython/Compiler/Ast/CallExpression.cs(72,32): warning CS0168: The variable 
`arg' is declared but never used
IronPython/Compiler/Generation/NewTypeMaker.cs(473,45): warning CS0219: The 
variable `dtb' is assigned but its value is never used
IronPython/Runtime/Operations/PythonOps.cs(1976,36): warning CS0168: The 
variable `targetWithContext' is declared but never used
IronPython/Runtime/Operations/UserTypeOps.cs(199,21): warning CS0219: The 
variable `slotLocation' is assigned but its value is never used
IronPython/Runtime/Operations/UserTypeOps.cs(338,22): warning CS0219: The 
variable `tmp' is assigned but its value is never used
IronPython/Runtime/Operations/UserTypeOps.cs(356,22): warning CS0219: The 
variable `tmp' is assigned but its value is never used
IronPython/Runtime/Types/ComObject.cs(144,25): warning CS0219: The variable 
`dt' is assigned but its value is never used
IronPython/Runtime/Types/Mro.cs(112,21): warning CS0219: The variable 
`lastRemove' is assigned but its value is never used
IronPython/Runtime/Types/PythonExtensionTypeAttribute.cs(161,41): warning 
CS0219: The variable `om' is assigned but its value is never used
IronPython/Runtime/Types/PythonTypeCustomizer.cs(366,28): warning CS0219: The 
variable `repr' is assigned but its value is never used
IronPython/Runtime/Types/UserType.cs(176,18): warning CS0219: The variable 
`mixedOldNew' is assigned but its value is never used
IronPython/Runtime/Types/UserType.cs(687,25): warning CS0219: The variable `dt' 
is assigned but its value is never used
IronPython/Runtime/calls/DoOperationBinderHelper.cs(206,25): warning CS0219: 
The variable `yType' is assigned but its value is never used
IronPython/Runtime/calls/DoOperationBinderHelper.cs(205,25): warning CS0219: 
The variable `xType' is assigned but its value is never used
IronPython/Runtime/Builtin.cs

[IronPython] FePy patches

2007-10-05 Thread Sanghyeon Seo
I overhauled FePy patches list.
http://fepy.sourceforge.net/patches.html

There are now separate pages for IronPython 1.x branch and 2.x branch.
I cleaned up all patches I wrote for 2.x branch, added some more, and
documented them. The simple result is that Mono 1.2.5 should compile
and run all 2.x Alpha releases with these patches.

Many of them are workarounds for Mono bugs, which aren't very interesting.

I hope equivalent of patch-flags-argcount to be applied in 2.0 Alpha 5
to fix #6805, which is already fixed in 1.1.

Is there any chance you can take patch-nant-build, that is, include
IronPython.build under Src directory? Since that is in patch form, the
copy I am using is here:
http://sparcs.kaist.ac.kr/~tinuviel/download/IronPython/IronPython.build

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


Re: [IronPython] Japanese contact

2007-10-05 Thread Sanghyeon Seo
2007/10/5, Hernan M Foffani <[EMAIL PROTECTED]>:
> Has been an IronPython book published in Japan?

Yes. Search for IronPython on Amazon.co.jp.

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


[IronPython] Japanese contact

2007-10-04 Thread Sanghyeon Seo
Today while surfing the web I found this blog:
http://kazamachi.blogspot.com/

The author, Akira Kazamachi, seems to have some useful changes to FePy
libraries, which I have never heard of until now. I am always
interested in feedbacks and contributions from more people.

Does anyone on this list (I believe some of you are Japanese) know who
ey is and how to contact em?

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


Re: [IronPython] Compilation error

2007-10-04 Thread Sanghyeon Seo
2007/10/5, Dino Viehland <[EMAIL PROTECTED]>:
> It looks like csc doesn't require out params to be assigned if they're value 
> types:

I searched Mono bugzilla, and found that apparently this was mcs behaviour too.

Bug 311892 - mcs incorrect CS0177 with out structs
https://bugzilla.novell.com/show_bug.cgi?id=311892

I smell something wrong... But it would still be interesting to hear
what csc people think.

Thanks!

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


Re: [IronPython] Compilation error

2007-10-04 Thread Sanghyeon Seo
2007/10/5, Dino Viehland <[EMAIL PROTECTED]>:
> But it properly enforces it if it's an int, a DateTime, or a decimal.  I'll 
> let them
> know.

It would be great if you can fix this in IronPython too.

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


[IronPython] Compilation error

2007-10-04 Thread Sanghyeon Seo
With latest Mono with some local changes (sorry that means you won't
be able to reproduce this) I get compilation error with latest
IronPython from CodePlex.

IronPython/Runtime/Types/ComDispatch/DispCallable.cs(42,21): error
CS0177: The out parameter `parameterModifiers' must be assigned to
before control leaves the current method

Indeed, in IronPython.Runtime.Types.ComDispatch.GetArgsForCall, the
out parameter is never assigned if it returns early because
countOfArgs is zero.

Doesn't csc catch this? If so that would be a csc bug I think.

A trivial fix is available from FePy SVN has patch-cs0177.
https://fepy.svn.sourceforge.net/svnroot/fepy/trunk/patches/latest/

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


Re: [IronPython] 3rd party module: ldap

2007-10-03 Thread Sanghyeon Seo
2007/10/3, Joanna Chopard (jchopard) <[EMAIL PROTECTED]>:
> Do you have any specific .NET library that I could use for accessing
> functions similar to ldap?

As someone else already mentioned, Novell's LDAP library is a good bet.

Novell.Directory.Ldap documentation
http://www.go-mono.com/docs/index.aspx?link=N:Novell.Directory.Ldap

If you want to see the library used in real programs, try LAT(LDAP
Administration Tool) with Gtk# user interface.
http://dev.mmgsecurity.com/projects/lat/

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


Re: [IronPython] -X:PreferComDispatch

2007-10-03 Thread Sanghyeon Seo
2007/10/3, Martin <[EMAIL PROTECTED]>:
> Reason I'm asking if IronPython doesn't require interop assemblies to
> access COM objects then the issue of supporting pythong standard
> libraries become atleast less of an issue?

I can't see how two are related, given that Python standard library
doesn't use COM.

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


Re: [IronPython] Installing 3rd-party modules

2007-10-03 Thread Sanghyeon Seo
2007/10/3, Howland-Rose, Kyle <[EMAIL PROTECTED]>:
> I am attempting to install simpleparse and egenix mx-base with no luck.

eGenix mxTextTools, a part of eGenix mxBase used by SimpleParse, is a
C extension and won't work with IronPython unmodified.

mxTextTools certainly is a fine piece of code that would be worth
porting to .NET, but it isn't yet.

For alternatives, I refer you to Python parsing tools list maintained
by Ned Batchelder.
http://nedbatchelder.com/text/python-parsers.html

I believe Resolver Systems have used PLY with IronPython for parsing
with good success.

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


Re: [IronPython] word wrap problem with posts from this newsgroup

2007-10-02 Thread Sanghyeon Seo
2007/10/3, Kelie <[EMAIL PROTECTED]>:
> why many posts in this newsgroup don't wrap properly in browser? tried
> both ie and firefox and had the same problem. so i had to drag the
> horizontal scroll bar when viewing posts. is it just me?

No it isn't. I see the same problem.

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


Re: [IronPython] Any news about the next release?

2007-10-02 Thread Sanghyeon Seo
2007/10/3, Sylvain Hellegouarch <[EMAIL PROTECTED]>:
> /me hopes he'll manage to get it compiled with mono this time.

I forgot to mention this, but there is a Mono bug to track IronPython
2.0 Alpha x>1 (Alpha 1 compiles fine) compilation problem.

https://bugzilla.novell.com/show_bug.cgi?id=325478

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


Re: [IronPython] DLR and Iron* language types

2007-09-25 Thread Sanghyeon Seo
2007/9/26, Dino Viehland <[EMAIL PROTECTED]>:
> The .keys call is unlikely to ever
> work though.  You'll need to call whatever the Ruby equivalent of .keys is.
> If it happens to be .keys then it'll work.

It happens to be .keys. :-)

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


Re: [IronPython] What templating modules are usable?

2007-09-23 Thread Sanghyeon Seo
2007/9/24, Leslie Ferguson <[EMAIL PROTECTED]>:
> and would like to know what is available in the area of
> template processors, such as Kid or Cheetah.

Kid will need some serious love to run on IronPython. It currently doesn't.

Cheetah already runs fine, but I think you would want to port
Cheetah's optional C-coded template accelerator if you are serious.

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


[IronPython] IronPython 2.0 Alpha 4 and Mono

2007-09-18 Thread Sanghyeon Seo
This is a call for help.

Have anyone managed to compile IronPython 2.0 Alpha 4 from source with
Mono tools? I haven't yet.

The relevant Mono bug is:
https://bugzilla.novell.com/show_bug.cgi?id=MONO82811

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


Re: [IronPython] Mono classes will not import

2007-09-17 Thread Sanghyeon Seo
2007/9/18, Newell Jensen <[EMAIL PROTECTED]>:
> Thanks...I can't believe I missed that.
> While I am writing this email, does anyone know a good site that has lots of
> examples of IronPython code?

There is IronPython Cookbook. Your contribution is welcome!
http://www.ironpython.info/

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


Re: [IronPython] Mono classes will not import

2007-09-17 Thread Sanghyeon Seo
2007/9/18, Newell Jensen <[EMAIL PROTECTED]>:
> I just installed mono (version 1.2.5) and IPCE (IronPython version 1.1 (1.1)
> on .NET 2.0.50727.42.  I am having troubles import the Mono classes. That is
> something like this,
>
> $ mono ipy.exe
> >>> import Mono
>
> give me the error that their is no module Mono.  I also tried mono etc.  It
> works when I do to import .NET classes such as System etc.  I made sure that
> all my dependencies were taken care of.  Is there something that I am
> missing?  Thanks for your help.

You need to add reference to appropriate assemblies. For example, this
works for me:

$ mono ipy.exe
>>> import clr
>>> clr.AddReference('Mono.Posix')
>>> import Mono

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


Re: [IronPython] ironpython as a scripting language for ms office

2007-09-06 Thread Sanghyeon Seo
2007/9/7, Carl Trachte <[EMAIL PROTECTED]>:
> What little I know about the Dot Net framework suggests that you use a
> wrapper type class to COM provided within the framework (I forget the exact
> MS terminology).  I don't know if anyone's been doing this from IronPython,
> but I would be surprised if someone hadn't at least tried.
>
> I'm using win32com for now, but I'd like to hear more about this too.

I think the exact terminology is RCW(Runtime Callable Wrapper).

COM interoperation is well supported on IronPython, and IronPython
Cookbook wiki has some good pages on the topic:
http://www.ironpython.info/index.php/Contents#Interop

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


Re: [IronPython] Compatibility of cPython Pickled Objects w/IronPython

2007-09-06 Thread Sanghyeon Seo
2007/9/6, nico rauhut <[EMAIL PROTECTED]>:
> Protocol-version 1 doesn't work properly. Especially float-values make some
> trouble. When I unpickle my list in IronPython these values seemed to be
> adulterated (...hmm don't know if this is the right word :)

I don't see this. Can you give a specific example?

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


[IronPython] Unused files

2007-09-06 Thread Sanghyeon Seo
Please consider removing following unused files from the repository so
that they don't appear in the source code download.

Microsoft.Scripting/Ast/TryFinallyStatement.cs
Microsoft.Scripting/CheckedDictionaryEnumerator.cs
Microsoft.Scripting/DictionaryUnionEnumerator.cs
Microsoft.Scripting/Publisher.cs
Microsoft.Scripting/Utils.cs
Microsoft.Scripting/WeakHash.cs

I know, they are already removed from the project file, but some
people (including myself) prefer to use filesystem rather than XML
file for the view of the project.

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


Re: [IronPython] IronPython with libgmail gives trouble with HTTPSHandler

2007-08-30 Thread Sanghyeon Seo
2007/8/30, Trond Andersen <[EMAIL PROTECTED]>:
> With this error message:
> AttributeError: 'module' object has no attribute 'HTTPSHandler'

IronPython currently lacks SSL support.

FePy includes SSL support. I tested libgmail and it works on FePy.
http://fepy.sourceforge.net/

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


Re: [IronPython] IronPython and Oracle

2007-08-29 Thread Sanghyeon Seo
2007/8/30, jane janet <[EMAIL PROTECTED]>:
> I got EnvironmentError: ORA-12560: TNS:protocol adapter error
> I don't know how to solve this problem.

Can you run SQL*Plus on the client side? If you can't, it's most
likely Oracle configuration problem, unrelated to IronPython.

Oracle configuration problems are not on-topic on this list, but take a look at:
http://www.orafaq.com/forum/t/85568/0/

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


[IronPython] Microsoft Permissive License's asymmetry of binary and source distribution

2007-08-28 Thread Sanghyeon Seo
Hi,

I hope this post is on topic on this list, since IronPython 2.0 is
licensed under Microsoft Permissive License (Ms-PL), currently v1.1.

As you may have heard, Microsoft Permissive License was submitted to
Open Source Initiative for its license approval process.

During the process, many people pointed out an asymmetry in Ms-PL's
permission for binary and source distribution.

Namely the cluase "If you distribute any portion of the software in
source code form, you may do so only under this license by including a
complete copy of this license with your distribution. If you
distribute any portion of the software in compiled or object code
form, you may only do so under a license that complies with this
license". In other words,

Source distribution: only under Ms-PL
Binary distribution: under a license that compiles with Ms-PL

I haven't given my due attention to this clause in the past, but given
the extremely clear wording, this is obviously intentional.

Now, suppose a collective work composed of Ms-PL-licensed sources and
GPL-licensed sources. My understanding is that it is undistributable
in source code form since both licenses want it to be licensed "under
this license". I think GPL would "comply with Ms-PL", but GPL requires
distributing in binary form to be accompanied with the complete
machine-readable source code, so the source code needs to be
distributable too.

That would be rather unfortunate, since I like both Ms-PL and GPL. But
I guess that's what Microsoft intended after all.

I'm not a lawyer, this not legal advice, corrections welcome, etc.

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


Re: [IronPython] Using blocks separators instead of indentation

2007-08-12 Thread Sanghyeon Seo
2007/8/13, Ori <[EMAIL PROTECTED]>:
> Is there a way to use code blocks (like { and } in other languages) instead
> of indentation?

>>> from __future__ import braces
SyntaxError: not a chance

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


Re: [IronPython] TypeError: integer expected occurs when __getitem__ is called

2007-08-10 Thread Sanghyeon Seo
2007/8/11, Tianyong Tang <[EMAIL PROTECTED]>:
> I am a newbie with  IronPython,  and want to test pysnmp eggs of CPython in
> IronPython.
>
> It works in CPython, but when I try it in IronPython, error occurred with
> the import of libraries at the beginning: (snip)
>
> File C:\Python25\lib\site-packages\pyasn1\v1\type\tag.py,
> line 84, in tagImplicitly
> File C:\Python25\lib\site-packages\pyasn1\v1\type\tag.py,
> line 89, in __getitem__
> TypeError: integer expected

This is IronPython issue #2728, reported last year.
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=2728

For the IronPython team: here's the relevant lines in the traceback:

# A method of TagSet old-style class
def tagImplicitly(self, superTag):
  # some lines omitted
  return self[:-1] + superTag

So the index type is slice(None, -1, None), and the index should be
converted by calling __len__ (which IronPython doesn't do). And then
__getitem__ tries to index by None and TypeError is raised.

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


  1   2   3   4   5   6   >