[IronPython] Ref to "." to be omitted from sys.path. Objections?

Daniel D. dvdotsenko at gmail.com
Sun Jan 23 20:36:24 CET 2011


> I committed the patch using '.' as  the current directory; if anyone
> (Dino?) needs the fully resolved path ...

The "." (rather "") in cPy is a neat trick. It's added only in
"interactive" (console, "-c") cases and allows you to change the CWD
to the dir you want and have your custom modules picked up as local
wherever dir you change to from within the console. Do that all the
time when deving. Setting fully-resolved path to CWD feels limiting in
that context.

Daniel

On Sun, Jan 23, 2011 at 11:12, Jeff Hardy <jdhardy at gmail.com> wrote:
> On Sun, Jan 23, 2011 at 1:32 AM, Daniel D. <dvdotsenko at gmail.com> wrote:
>> Hi.
>>
>> http://ironpython.codeplex.com/workitem/28235
>>
>> A example / proposed patch attached to the bug.
>
> Patch applied as 0cdaaaa.
>
> I think matching the CPython behaviour here is pretty critical,
> especially since it is also a security issue.
>
> I committed the patch using '.' as  the current directory; if anyone
> (Dino?) needs the fully resolved path as well, it's easy enough to add
> back, but as CPython doesn't add it I'd prefer not to. I do wonder why
> CPython uses '' as the current directory though; maybe it's
> special-cased somewhere in the import system? IronPython should
> probably match that behaviour as well.
>
> - Jeff
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>



More information about the Ironpython-users mailing list