[Eric] Three small path Eric4

Tonal tonal at promsoft.ru
Sat Mar 31 19:31:55 BST 2007


eric4.diff - for correct open profiler info for win32.
eric4_2.diff - for correct create PyLint config file
eric4_3.diff - for correct open eric4 if os PATH variable contains dir 
names in OEM codepage.

Version Numbers:
   Python 2.4.4
   Qt 4.2.3
   PyQt4 4-snapshot-20070318
   sip snapshot-20070310
   QScintilla 2-snapshot-20070318
   Eric4 4.0-snapshot-20070325
   Bicycle Repair Man CVS-20041120

Platform: win32
2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)]
-------------- next part --------------
diff U3 D:/Download/eric4-snapshot-20070325/eric/Checks/PyLint/PyLintConfigDialog.py D:/dump/eric4-snapshot-20070325/eric/Checks/PyLint/PyLintConfigDialog.py
--- D:/Download/eric4-snapshot-20070325/eric/Checks/PyLint/PyLintConfigDialog.py	Thu Mar 22 22:36:54 2007
+++ D:/dump/eric4-snapshot-20070325/eric/Checks/PyLint/PyLintConfigDialog.py	Sat Mar 31 14:33:56 2007
@@ -280,10 +280,7 @@
         self.pylintProc = QProcess()
         args = QStringList()
         
-        if sys.platform == "win32":
-            program = os.path.join(sys.exec_prefix, "Scripts", self.lint + '.bat')
-        else:
-            program = self.lint
+        program = self.lint
         args.append('--generate-rcfile')
         
         self.connect(self.pylintProc, SIGNAL('readyReadStandardOutput()'),
@@ -330,7 +327,9 @@
         self.pylintProc.setReadChannel(QProcess.StandardOutput)
         
         while self.pylintProc and self.pylintProc.canReadLine():
-            self.buf.append(self.pylintProc.readLine())
+            line = unicode(self.pylintProc.readLine()).rstrip()
+            self.buf.append(line)
+            self.buf.append(os.linesep)
         
     def __readStderr(self):
         """
-------------- next part --------------
diff U3 C:/Lang/Python/24/Lib/site-packages/eric4/DataViews/PyProfileDialog.py D:/dump/eric4-snapshot-20070325/eric/DataViews/PyProfileDialog.py
--- C:/Lang/Python/24/Lib/site-packages/eric4/DataViews/PyProfileDialog.py	Sat Mar 31 15:25:01 2007
+++ D:/dump/eric4-snapshot-20070325/eric/DataViews/PyProfileDialog.py	Sun Feb 11 03:34:10 2007
@@ -204,7 +204,7 @@
             self.close()
             return
         try:
-            f = open(fname)
+            f = open(fname, 'rb')
             self.stats = marshal.load(f)
             f.close()
         except:
-------------- next part --------------
diff U3 D:/dump/eric4-snapshot-20070325/eric/Utilities/__init__.py C:/Lang/Python/24/Lib/site-packages/eric4/Utilities/__init__.py
--- D:/dump/eric4-snapshot-20070325/eric/Utilities/__init__.py	Sun Feb 18 19:12:10 2007
+++ C:/Lang/Python/24/Lib/site-packages/eric4/Utilities/__init__.py	Sun Apr 01 01:25:22 2007
@@ -303,16 +303,20 @@
     if os.path.isabs(file):
         return os.access(file, os.X_OK)
         
-    path = os.getenv('PATH')
+    #path = os.getenv('PATH')
     
     # environment variable not defined
-    if path is None:
-        return 0
+    #if path is None:
+    #    return 0
         
-    dirs = string.split(path, os.pathsep)
-    for dir in dirs:
-        if os.access(os.path.join(dir, file), os.X_OK):
+    for env in QProcess.systemEnvironment():
+      ename, val = unicode(env).split('=', 1)
+      if ename == 'PATH':
+      	dirs = val.split(os.pathsep)
+      	for dir in dirs:
+          if os.access(os.path.join(dir, file), os.X_OK):
             return 1
+        return 0
             
     return 0
     


More information about the Eric mailing list