how to import subprocess into my 'subprocess.py' file

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Wed May 5 08:32:48 EDT 2010


On Wed, 05 May 2010 03:34:06 -0700, hiral wrote:

> So how can I create a python file (with the same name as standard module
> name) with custom methods?

Don't do this. It will lead to nothing but trouble.

Python doesn't support multiple modules with the same name. Unless you 
create a custom importer, a module called subprocess will shadow (hide) 
the original subprocess module.



-- 
Steven



More information about the Python-list mailing list