library reorganization python reorganizes and changes the names of several parts of the standard librarymost notably modules related to networking and internet data formats in additiona wide variety of legacy modules have been dropped from the library ( gopherlibrfc and so onit is now standard practice to use lowercase names for modules several modules such as configparserqueueand socketserver have been renamed to configparserqueueand socketserverrespectively you should try to follow similar conventions in your own code packages have been created to reorganize code that was formerly contained in disparate modules--for examplethe http package containing all the module used to write http serversthe html package has modules for parsing htmlthe xmlrpc package has modules for xml-rpcand so forth as for deprecated modulesthis book has been careful to only document modules that are in current use with python and python if you are working with existing python code and see it using module not documented herethere is good chance that the module has been deprecated in favor of something more modern just as an examplepython doesn' have the popen module commonly used in python to launch subprocesses insteadyou should use the subprocess module absolute imports related to library reorganizationall import statements appearing in submodules of package use absolute names this is covered in more detailed in "modulespackagesand distribution,but suppose you have package organized like thisfoo_ _init_ py spam py bar py if the file spam py uses the statement import baryou get an importerror exception even though bar py is located in the same directory to load this submodulespam py either needs to use import foo bar or package relative import such as from import bar this differs from python where import always checks the current directory for match before moving onto checking other directories in sys path code migration and to converting code from python to python is delicate topic just to be absolutely clearthere are no magic importsflagsenvironment variablesor tools that will enable python to run an arbitrary python program howeverthere are some very specific steps that can be taken to migrate codeeach of which is now described porting code to python it is recommended that anyone porting code to python first port to python python is not only backwards-compatible with python but it also supports subset of new features found in python examples include advanced string formattingthe new exception syntaxbyte literalsi/ libraryand abstract base classes thusa lib fl ff