A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026997.html below:

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/email/test test_email_codecs.py,1.1,1.2

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/email/test test_email_codecs.py,1.1,1.2Barry A. Warsaw barry@zope.com
Sun, 28 Jul 2002 19:51:38 -0400
>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    >> It's a bit uglier than that because since Lib/test gets
    >> magically added to sys.path during regrtest by virtue of
    >> running "python Lib/test/regrtest.py".

    GvR> Perhaps regrtest.py can specifically remove its own directory
    GvR> from sys.path?  (Please don't just remove sys.path[0] or '';
    GvR> look in sys.argv[0] and deduce from there.)

Good idea:

-------------------- snip snip --------------------
mydir = os.path.dirname(sys.argv[0])
sys.path.remove(mydir)
-------------------- snip snip --------------------

I also followed up to Guido privately, re: the motivation for this
change.  Also, Neal's right, I missed some of the relative imports of
test_support and I'm ready to commit those fixes once Guido gives the
go ahead.

-Barry



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4