Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19603 > unrolled thread

IDLE not setting current directory in its path

Started bygujax <rjngrj2010@gmail.com>
First post2012-01-30 07:06 -0800
Last post2012-02-03 07:23 -0800
Articles 7 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  IDLE not setting current directory in its path gujax <rjngrj2010@gmail.com> - 2012-01-30 07:06 -0800
    Re: IDLE not setting current directory in its path Terry Reedy <tjreedy@udel.edu> - 2012-01-30 15:15 -0500
    Re: IDLE not setting current directory in its path Terry Reedy <tjreedy@udel.edu> - 2012-01-30 22:55 -0500
      Re: IDLE not setting current directory in its path gujax <rjngrj2010@gmail.com> - 2012-01-31 08:27 -0800
        Re: IDLE not setting current directory in its path Terry Reedy <tjreedy@udel.edu> - 2012-01-31 18:12 -0500
          Re: IDLE not setting current directory in its path gujax <rjngrj2010@gmail.com> - 2012-02-03 07:31 -0800
          Re: IDLE not setting current directory in its path gujax <rjngrj2010@gmail.com> - 2012-02-03 07:23 -0800

#19603 — IDLE not setting current directory in its path

Fromgujax <rjngrj2010@gmail.com>
Date2012-01-30 07:06 -0800
SubjectIDLE not setting current directory in its path
Message-ID<fbd1a7b1-0e49-4116-8ea5-79d6aa8062d4@t15g2000yqi.googlegroups.com>
Hi,
When I open python shell and change to any directory, the sys.path
always shows ' '. This means it has temporarily added the current
directory to its path i.e., sys.path shows [' ', other paths....]

I can then load any module from the current directory even though the
current directory is not listed in the PYTHONPATH..

When I do the same with IDLE, it shows the name of the current
directory i.e.,  ['name1', other paths...] instead of showing [' ',
other paths..].

Therefore, when I change the directory to some other directory say
'name2' and type sys.path, I get the same name as the original
directory which I started with (i.e., name1, while name2 is not added
to the path automatically as done by ' ').

Therefore, I am unable to load any modules from this current changed
directory.

In short how to configure IDLE to automatically add current directory
to its path without typing every time
sys.path.append..
Any help is appreciated.
Thanks

[toc] | [next] | [standalone]


#19611

FromTerry Reedy <tjreedy@udel.edu>
Date2012-01-30 15:15 -0500
Message-ID<mailman.5222.1327954550.27778.python-list@python.org>
In reply to#19603
On 1/30/2012 10:06 AM, gujax wrote:
> Hi,
> When I open python shell and change to any directory, the sys.path
> always shows ' '.

It actually shows '' (without a space).

> When I do the same with IDLE, it shows the name of the current
> directory i.e.,  ['name1', other paths...] instead of showing [' ',
> other paths..].

This issue is under consideration at
http://bugs.python.org/issue13506
I will be looking at the patch soon.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#19622

FromTerry Reedy <tjreedy@udel.edu>
Date2012-01-30 22:55 -0500
Message-ID<mailman.5228.1327982152.27778.python-list@python.org>
In reply to#19603
On 1/30/2012 3:15 PM, Terry Reedy wrote:

> This issue is under consideration at
> http://bugs.python.org/issue13506

It should be fixed before the next Python releases.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#19647

Fromgujax <rjngrj2010@gmail.com>
Date2012-01-31 08:27 -0800
Message-ID<fb86d355-2b58-41c0-9bef-7dc7115d8f21@r12g2000yqh.googlegroups.com>
In reply to#19622
Thanks Terry,
I see that the issue has been closed by you.
However, I do not know how to run the patch on my Windows. Do I
reinstall IDLE?
Please suggest. I am using Python2.7
gujax

On Jan 30, 10:55 pm, Terry Reedy <tjre...@udel.edu> wrote:
> On 1/30/2012 3:15 PM, Terry Reedy wrote:
>
> > This issue is under consideration at
> >http://bugs.python.org/issue13506
>
> It should be fixed before the next Python releases.
>
> --
> Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#19662

FromTerry Reedy <tjreedy@udel.edu>
Date2012-01-31 18:12 -0500
Message-ID<mailman.5262.1328051590.27778.python-list@python.org>
In reply to#19647
On 1/31/2012 11:27 AM, gujax wrote:
> Thanks Terry,
> I see that the issue has been closed by you.
> However, I do not know how to run the patch on my Windows. Do I
> reinstall IDLE?
> Please suggest. I am using Python2.7

Choices:
1. Wait for the next 2.7 release, which should be within a month.
Easiest ;-). Will get you all other patches too.
2. Edit the files by hand, deleting lines marked - in the patch and 
adding lines marked +. Or change lines so they match the + lines. 
Harder, but you get the one change now instead of later.
3. Download and install TortoiseHG, turn your python installation (or 
just the idlelib directory) into a repository, apply the patch (or an 
edited version thereof), and perhaps delete the repository stuff. I 
would only do this if you want to learn to use (Tortoise)HG anyway, 
perhaps so you can apply other patches too, without waiting.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#19918

Fromgujax <rjngrj2010@gmail.com>
Date2012-02-03 07:31 -0800
Message-ID<64b8a37e-bcba-4812-a819-d90f2e02e2e0@q8g2000pbb.googlegroups.com>
In reply to#19662
On Jan 31, 6:12 pm, Terry Reedy <tjre...@udel.edu> wrote:
> On 1/31/2012 11:27 AM, gujax wrote:
>
> > Thanks Terry,
> > I see that the issue has been closed by you.
> > However, I do not know how to run the patch on my Windows. Do I
> > reinstall IDLE?
> > Please suggest. I am using Python2.7
>
Thank you Terry,
The patch suggested by you has worked for me,
gujax

> Choices:
> 1. Wait for the next 2.7 release, which should be within a month.
> Easiest ;-). Will get you all other patches too.
> 2. Edit the files by hand, deleting lines marked - in the patch and
> adding lines marked +. Or change lines so they match the + lines.
> Harder, but you get the one change now instead of later.
> 3. Download and install TortoiseHG, turn your python installation (or
> just the idlelib directory) into a repository, apply the patch (or an
> edited version thereof), and perhaps delete the repository stuff. I
> would only do this if you want to learn to use (Tortoise)HG anyway,
> perhaps so you can apply other patches too, without waiting.
>
> --
> Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#19920

Fromgujax <rjngrj2010@gmail.com>
Date2012-02-03 07:23 -0800
Message-ID<c9de59b3-21ad-491f-83ab-5e04fd47f53a@y5g2000pbk.googlegroups.com>
In reply to#19662
On Jan 31, 6:12 pm, Terry Reedy <tjre...@udel.edu> wrote:
> On 1/31/2012 11:27 AM,gujaxwrote:
>
> > Thanks Terry,
> > I see that the issue has been closed by you.
> > However, I do not know how to run the patch on my Windows. Do I
> > reinstall IDLE?
> > Please suggest. I am using Python2.7
>
Hi Terry,
I changed the two files as suggested in your patch and it worked.
Thank you,
gujax


> Choices:
> 1. Wait for the next 2.7 release, which should be within a month.
> Easiest ;-). Will get you all other patches too.
> 2. Edit the files by hand, deleting lines marked - in the patch and
> adding lines marked +. Or change lines so they match the + lines.
> Harder, but you get the one change now instead of later.
> 3. Download and install TortoiseHG, turn your python installation (or
> just the idlelib directory) into a repository, apply the patch (or an
> edited version thereof), and perhaps delete the repository stuff. I
> would only do this if you want to learn to use (Tortoise)HG anyway,
> perhaps so you can apply other patches too, without waiting.
>
> --
> Terry Jan Reedy

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web