• R/O
  • SSH

Joypy: Commit

This repo is not current. Development has moved from Hg to Git. For the latest code use the "Source Code" tab above to go to the "Thun" git repo or navigate to:
https://osdn.net/projects/joypy/scm/git/Thun


Commit MetaInfo

Révision1b4d236c34434b07c3bde841197dc59c45daa5f3 (tree)
l'heure2020-05-28 01:14:21
AuteurSimon Forman <sforman@hush...>
CommiterSimon Forman

Message de Log

Remove logging.

Change Summary

Modification

diff -r 52e2ea9f5874 -r 1b4d236c3443 xerblin/gui/main.py
--- a/xerblin/gui/main.py Mon May 25 21:45:27 2020 -0700
+++ b/xerblin/gui/main.py Wed May 27 09:14:21 2020 -0700
@@ -16,18 +16,20 @@
1616 ' right-click "sharing" for details.'
1717 ' Right-click on these commands to see docs on UI commands: key_bindings mouse_bindings')
1818
19-from __future__ import print_function
20-from future import standard_library
21-standard_library.install_aliases()
2219 import logging, os, pickle, sys
2320 from datetime import datetime
2421 from textwrap import dedent
2522 from configparser import RawConfigParser
2623
2724 from xerblin.gui.utils import init_home, argparser, FileFaker
25+from xerblin.gui.textwidget import TextViewerWidget, tk, get_font
26+from xerblin.gui.world import StackWorld
27+from xerblin.gui.controllerlistbox import StackListbox
28+from joy.library import initialize, DefinitionWrapper
29+from joy.utils.stack import stack_to_string
2830
2931
30-DATETIME_FORMAT = "Thun • %B %d %a • %I:%M %p"
32+DATETIME_FORMAT = 'Thun • %B %d %a • %I:%M %p'
3133 VIEWER_DEFAULTS = dict(width=80, height=25)
3234
3335
@@ -36,24 +38,6 @@
3638 repo = init_home(JOY_HOME)
3739 homed = lambda fn: os.path.join(JOY_HOME, fn)
3840
39-# Set up logging before doing anything else.
40-
41-_log = logging.getLogger(__name__)
42-logging.basicConfig(
43- format='%(asctime)-15s %(levelname)s %(name)s %(message)s',
44- filename=os.path.join(JOY_HOME, 'thun.log'),
45- level=logging.INFO,
46- )
47-_log.info('Starting with JOY_HOME=%s', JOY_HOME)
48-
49-# Now that logging is set up, continue loading the system.
50-
51-from xerblin.gui.textwidget import TextViewerWidget, tk, get_font
52-from xerblin.gui.world import StackWorld
53-from xerblin.gui.controllerlistbox import StackListbox
54-from joy.library import initialize, DefinitionWrapper
55-from joy.utils.stack import stack_to_string
56-
5741
5842 cp = RawConfigParser()
5943 # Don't mess with uppercase. We need it for Tk event binding.
diff -r 52e2ea9f5874 -r 1b4d236c3443 xerblin/gui/world.py
--- a/xerblin/gui/world.py Mon May 25 21:45:27 2020 -0700
+++ b/xerblin/gui/world.py Wed May 27 09:14:21 2020 -0700
@@ -17,12 +17,6 @@
1717 # You should have received a copy of the GNU General Public License
1818 # along with joy.py. If not see <http://www.gnu.org/licenses/>.
1919 #
20-from __future__ import print_function
21-from builtins import object
22-from logging import getLogger
23-
24-_log = getLogger(__name__)
25-
2620 import os, pickle, sys
2721 from inspect import getdoc
2822
@@ -37,7 +31,7 @@
3731 return # None indicating "I dunno."
3832
3933
40-class World(object):
34+class World:
4135
4236 def __init__(self, stack=(), dictionary=None, text_widget=None):
4337 self.stack = stack
@@ -149,11 +143,10 @@
149143 f.flush()
150144 os.fsync(f.fileno())
151145 self.repo.stage([self.relative_STACK_FN])
152- commit_id = self.repo.do_commit(
146+ self.repo.do_commit(
153147 b'auto-save',
154148 committer=b'thun-auto-save <nobody@example.com>',
155149 )
156- _log.info('commit %s', commit_id)
157150
158151 def load_stack(self):
159152 if os.path.exists(self.filename):
Afficher sur ancien navigateur de dépôt.