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/2001-June/015336.html below:

[Python-Dev] sys.modules["__main__"] in Jython

[Python-Dev] sys.modules["__main__"] in Jython [Python-Dev] sys.modules["__main__"] in JythonFinn Bock bckfnn@worldonline.dk
Fri, 08 Jun 2001 19:15:14 GMT
[Skip]

>Would someone with Jython experience check to see if it interprets
>sys.modules["__main__"] in the same manner as Python?

To me it seems like Jython defines sys.modules["__main__"] in the same
way as CPython. 

>I'm wondering if this works for Jython as well as Python:
>
>    def _test():
>	import doctest, sys
>	return doctest.testmod(sys.modules["__main__"])
>
>    if __name__ == "__main__":
>	_test()

It works for Jython.

regards,
finn



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