J.A. Roberts Tunney avatar J.A. Roberts Tunney committed 195100e

some cleanup

Comments (0)

Files changed (3)

fabulous/debug.py

 
+import sys
 import itertools
 
 from fabulous import image
             else:
                 need_reset = True
                 line += '<' + (self.pad * len(list(items)))[1:]
+
+
+if __name__ == '__main__':
+    for imgpath in sys.argv[1:]:
+        for line in DebugImage(imgpath):
+            print line
 
     def write(self, data):
         if self.need_cr:
-            width = max(min(utils.term_width(), len(self.last)), len(data))
+            width = max(min(utils.term.width, len(self.last)), len(data))
             fmt = "\r%-" + str(width) + "s\n" + self.last
         else:
             fmt = "%s\n"
             self.stream.write('\r')
         else:
             self.need_cr = True
-        width = utils.term_width()
+        width = utils.term.width
         for line in data.rstrip().split('\n'):
             if line:
                 if len(line) > width:

fabulous/test_transientlogging.py

 from fabulous.color import *
 
 
+logger = logging.getLogger('fabulous')
+
+
 def luv():
     msg = "hello there how are you?  i love you!  sincerely compy <3 <3"
     while True:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.