mailr3059 - /branches/error_import/io.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on March 02, 2007 - 05:07:
Author: bugman
Date: Fri Mar  2 05:07:20 2007
New Revision: 3059

URL: http://svn.gna.org/viewcvs/relax?rev=3059&view=rev
Log:
Removed the unneccessary usage of __builtin__.

See the thread starting at 
https://mail.gna.org/public/relax-devel/2007-02/msg00003.html
(Message-id: <45DACFEA.7020108@xxxxxxxxxxxxxxx>) for a discussion of the 
issue.

The following varibles have been shifted from __builtin__ to the global 
namespace of the 'io' module
as only this module was accessing them:
    bz2_module
    bz2_module_message
    devnull_import
    devnull_import_message


Modified:
    branches/error_import/io.py

Modified: branches/error_import/io.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/error_import/io.py?rev=3059&r1=3058&r2=3059&view=diff
==============================================================================
--- branches/error_import/io.py (original)
+++ branches/error_import/io.py Fri Mar  2 05:07:20 2007
@@ -20,15 +20,13 @@
 #                                                                            
 #
 
###############################################################################
 
-import __builtin__
-
 # BZ2 compression module.
 try:
     from bz2 import BZ2File
-    __builtin__.bz2_module = 1
+    bz2_module = 1
 except ImportError, message:
-    __builtin__.bz2_module = 0
-    __builtin__.bz2_module_message = message.args[0]
+    bz2_module = 0
+    bz2_module_message = message.args[0]
 
 # Gzip compression module.
 from gzip import GzipFile
@@ -36,10 +34,10 @@
 # Devnull.
 try:
     from os import devnull
-    __builtin__.devnull_import = 1
+    devnull_import = 1
 except ImportError, message:
-    __builtin__.devnull_import = 0
-    __builtin__.devnull_import_message = message.args[0]
+    devnull_import = 0
+    devnull_import_message = message.args[0]
 
 from os import F_OK, X_OK, access, altsep, getenv, makedirs, pathsep, 
remove, sep, stat
 from os.path import expanduser, basename, splitext




Related Messages


Powered by MHonArc, Updated Fri Mar 02 05:20:05 2007