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/2008-January/076415.html below:

[Python-Dev] why is mmap a builtin module on windows?

[Python-Dev] why is mmap a builtin module on windows? [Python-Dev] why is mmap a builtin module on windows?Christian Heimes lists at cheimes.de
Wed Jan 23 09:35:50 CET 2008
Ralf Schmitt wrote:
>> Why do you want to overwrite the existing module instead of using a
>> different name like ralfmmap?
>>
>> import ralfmmap as mmap
>> sys.modules]'mmap'] = mmap
>>
> 
> I thought about that (ugly hack) too. I would have to change the imports at
> a lot of places (and revert the changes when we switch to python 2.6).
> (whereas on Unix I would only have to do install the new mmap module).

It's not an ugly hack, it's a well known feature. Add you don't have to
change a lot of places, too. It's sufficient to add the alias at the
entry point of your application (the script that starts your app). Once
the alias sys.modules]'mmap'] = ralfmmap is set, every import mmap gets
your ralfmmap.

Christian
More information about the Python-Dev mailing list

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