mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Cleaned up imports to work with Python2.6 and Python 3.3
This commit is contained in:
parent
40c2bc13b5
commit
d35502423a
7 changed files with 19 additions and 27 deletions
|
@ -4,6 +4,7 @@ Changelog
|
||||||
|
|
||||||
### 1.7 (December 22, 2013)
|
### 1.7 (December 22, 2013)
|
||||||
|
|
||||||
|
* __1.7.7__ Cleaned up imporrts
|
||||||
* __1.7.6__ Python 3 port for slugify
|
* __1.7.6__ Python 3 port for slugify
|
||||||
* __1.7.5__ Colorama is only needed on windows. Smaller fixes
|
* __1.7.5__ Colorama is only needed on windows. Smaller fixes
|
||||||
* __1.7.3__ Touches temporary files before opening them to allow more external editors.
|
* __1.7.3__ Touches temporary files before opening them to allow more external editors.
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
try: from . import Entry
|
from __future__ import absolute_import
|
||||||
except (SystemError, ValueError): import Entry
|
from . import Entry
|
||||||
try: from . import util
|
from . import util
|
||||||
except (SystemError, ValueError): import util
|
|
||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
try: import parsedatetime.parsedatetime_consts as pdt
|
try: import parsedatetime.parsedatetime_consts as pdt
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
"""
|
"""
|
||||||
jrnl is a simple journal application for your command line.
|
jrnl is a simple journal application for your command line.
|
||||||
"""
|
"""
|
||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
__title__ = 'jrnl'
|
__title__ = 'jrnl'
|
||||||
__version__ = '1.7.6'
|
__version__ = '1.7.7'
|
||||||
__author__ = 'Manuel Ebert'
|
__author__ = 'Manuel Ebert'
|
||||||
__license__ = 'MIT License'
|
__license__ = 'MIT License'
|
||||||
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'
|
__copyright__ = 'Copyright 2013 - 2014 Manuel Ebert'
|
||||||
|
|
17
jrnl/cli.py
17
jrnl/cli.py
|
@ -7,17 +7,12 @@
|
||||||
license: MIT, see LICENSE for more details.
|
license: MIT, see LICENSE for more details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
try:
|
from __future__ import absolute_import
|
||||||
from . import Journal
|
from . import Journal
|
||||||
from . import util
|
from . import util
|
||||||
from . import exporters
|
from . import exporters
|
||||||
from . import install
|
from . import install
|
||||||
from . import __version__
|
from . import __version__
|
||||||
except (SystemError, ValueError):
|
|
||||||
import Journal
|
|
||||||
import util
|
|
||||||
import exporters
|
|
||||||
import install
|
|
||||||
import jrnl
|
import jrnl
|
||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
import os
|
import os
|
||||||
import string
|
import json
|
||||||
try: import simplejson as json
|
from .util import u, slugify
|
||||||
except ImportError: import json
|
|
||||||
try: from .util import u, slugify
|
|
||||||
except (SystemError, ValueError): from util import u, slugify
|
|
||||||
|
|
||||||
|
|
||||||
def get_tags_count(journal):
|
def get_tags_count(journal):
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
import readline
|
import readline
|
||||||
import glob
|
import glob
|
||||||
import getpass
|
import getpass
|
||||||
try: import simplejson as json
|
import json
|
||||||
except ImportError: import json
|
|
||||||
import os
|
import os
|
||||||
try: from . import util
|
from . import util
|
||||||
except (SystemError, ValueError): import util
|
|
||||||
|
|
||||||
|
|
||||||
def module_exists(module_name):
|
def module_exists(module_name):
|
||||||
|
|
|
@ -6,8 +6,7 @@ from tzlocal import get_localzone
|
||||||
import getpass as gp
|
import getpass as gp
|
||||||
import keyring
|
import keyring
|
||||||
import pytz
|
import pytz
|
||||||
try: import simplejson as json
|
import json
|
||||||
except ImportError: import json
|
|
||||||
if "win32" in sys.platform:
|
if "win32" in sys.platform:
|
||||||
import colorama
|
import colorama
|
||||||
colorama.init()
|
colorama.init()
|
||||||
|
|
Loading…
Add table
Reference in a new issue