[Pypt-offline-general] SF.net SVN: pypt-offline: [180] trunk
Status: Beta
Brought to you by:
riteshsarraf
|
From: <rit...@us...> - 2007-08-10 22:05:05
|
Revision: 180
http://pypt-offline.svn.sourceforge.net/pypt-offline/?rev=180&view=rev
Author: riteshsarraf
Date: 2007-08-10 15:04:27 -0700 (Fri, 10 Aug 2007)
Log Message:
-----------
C:\Eclipse\Workspace\pypt-offline>hg log -l 3 -v
changeset: 148:2ce875b21899
branch: trunk
tag: tip
user: Ritesh Raj Sarraf <rr...@re...>
date: Sat Aug 11 03:31:00 2007 +0530
files: TODO pypt_core.py
description:
* I don't understand why import under __init__() aren't allowed. I mean, they make perfect sense to me. Anyway, for now, live with the common ugly (IMO) way.
* Updates in the TODO
changeset: 147:581b615c5324
branch: trunk
user: Ritesh Raj Sarraf <rr...@re...>
date: Sat Aug 11 03:03:00 2007 +0530
files: pypt_core.py
description:
* We should only be checking for 'microsoft' here.
* stderr also need to be color changed
Modified Paths:
--------------
trunk/TODO
trunk/pypt_core.py
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2007-08-10 12:18:13 UTC (rev 179)
+++ trunk/TODO 2007-08-10 22:04:27 UTC (rev 180)
@@ -6,10 +6,10 @@
* Proxy Authentication
* Implement a function which will keep track of the failed uris and print them at last. It'll keep the uri and it's failure reason as a dictionary <done>
* Implement Threads - When we implement threads multiple files will be downloaded at the same time. <done>
- At that point, say we execute with 5 threads, the progressbar for all 5 threads should be displayed together.
+ At that point, say we execute with 5 threads, the progressbar for all 5 threads should be displayed together. <done>
* Implement Curses and GUI interfaces. For these UIs it will be interactive. For all the options, only one will be selectable and once that option
is selected the others will be deactivated. That's design, only one option allowed a time. :-)
* Use Python's logging module to better handle messages, warnings and errors <done>
* Implement apt's newly added feature (> 0.6.4) of Package Diff
-* Add functionality for Offline Bug Reports
+* Add functionality for Offline Bug Reports <done>
* Handle KeyboardInterrupt exception in threads so that if the user sends an interrupt signal, the program should exit
\ No newline at end of file
Modified: trunk/pypt_core.py
===================================================================
--- trunk/pypt_core.py 2007-08-10 12:18:13 UTC (rev 179)
+++ trunk/pypt_core.py 2007-08-10 22:04:27 UTC (rev 180)
@@ -43,11 +43,11 @@
except ImportError:
pass
-#WindowColor = True
-#try:
-# import WConio
-#except ImportError:
-# WindowColor = False
+WindowColor = True
+try:
+ import WConio
+except ImportError:
+ WindowColor = False
'''This is the core module. It does the main job of downloading packages/update packages,\nfiguring out if the packages are in the local cache, handling exceptions and many more stuff'''
@@ -236,7 +236,15 @@
'Blink': '5m', 'SwitchOffAttributes': '0m'}
elif os.name in ['nt', 'dos']:
- self.platform = 'microsoft'
+ self.platform = None
+
+ #try:
+ # import WConio
+ #except ImportError:
+ # self.platform = None
+ if WindowColor is True:
+ self.platform = 'microsoft'
+
self.color = {'Red': 4, 'Black': 0,
'Green': 2, 'White': 15,
'LightRed': 12, 'LightCyan': 11,
@@ -250,7 +258,8 @@
if self.platform == 'posix':
sys.stdout.write(self.color_syntax + self.color[color])
- elif self.platform in ['n', 'dos']:
+ sys.stderr.write(self.color_syntax + self.color(color))
+ elif self.platform == 'microsoft':
WConio.textcolor(self.color[color])
def msg(self, msg):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|