This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients
Date 2007-08-03.21:42:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Hrm.  Well then we can either add something like __source_file__ to modules, put 'reload' into the imp module (or on module objects as a method), or have a function in imp (or as a method on modules) that returns the source path (if it exists).

But having to do::

  M.__file__.rsplit('.', 1) + filter((lambda x : x[2] == imp.PY_SOURCE), imp.get_suffixes())[0]

seems like a lot to memorize (let alone type in), especially since there is even no error checking that the path is even to a source or bytecode file to start with or that you end up with.
History
Date User Action Args
2007-08-23 14:58:53adminlinkissue1762972 messages
2007-08-23 14:58:53admincreate