home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __license__ = 'GPL v3'
- __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
- __docformat__ = 'restructuredtext en'
- import sys
- import os
- from calibre import prints as prints_, preferred_encoding, isbytestring
- from calibre.utils.config import Config, ConfigProxy, JSONConfig
- from calibre.utils.ipc.launch import Worker
- from calibre.constants import __appname__, __version__, iswindows
- from calibre.gui2 import error_dialog
- POLL_TIMEOUT = 0.01
- (preferred_encoding, isbytestring, __appname__, __version__, error_dialog, iswindows)
-
- def console_config():
- desc = 'Settings to control the calibre console'
- c = Config('console', desc)
- c.add_opt('theme', default = 'native', help = 'The color theme')
- c.add_opt('scrollback', default = 10000, help = 'Max number of lines to keep in the scrollback buffer')
- return c
-
- prefs = ConfigProxy(console_config())
- dynamic = JSONConfig('console')
-
- def prints(*args, **kwargs):
- kwargs['file'] = sys.__stdout__
- prints_(*args, **kwargs)
-
-
- class Process(Worker):
-
- def env(self):
- env = dict(os.environ)
- env.update(self._env)
- return env
-
- env = property(env)
-
-