#!/usr/bin/env python
#

"""
gvi: graphterm-aware visual editor
"""

from __future__ import absolute_import, print_function

import os
import sys

from optparse import OptionParser

try:
    import gterm
except ImportError:
    import graphterm.bin.gterm as gterm

Work_dir = os.getenv("PWD", "") or os.getcwd()

usage = "usage: %prog [-e ace/ckeditor] filename"
parser = OptionParser(usage=usage)
parser.add_option("-e", "--editor", dest="editor", default="ace",
                  help="Editor: ace/ckeditor")

(options, args) = parser.parse_args()

if len(args) != 1:
    print(parser.get_usage(), file=sys.stderr)
    sys.exit(1)

if gterm.Export_host:
    assert sys.stdin.isatty()

gterm.edit_file(args[0], dir=Work_dir, create=True, editor=options.editor)

0f6ab2e6a728b0c48336fe2ef0ef682db2b6f7d3
<mask token>

<mask token>
try:
    import gterm
except ImportError:
    import graphterm.bin.gterm as gterm
<mask token>
parser.add_option('-e', '--editor', dest='editor', default='ace', help=
    'Editor: ace/ckeditor')
<mask token>
if len(args) != 1:
    print(parser.get_usage(), file=sys.stderr)
    sys.exit(1)
if gterm.Export_host:
    assert sys.stdin.isatty()
gterm.edit_file(args[0], dir=Work_dir, create=True, editor=options.editor)

<mask token>
try:
    import gterm
except ImportError:
    import graphterm.bin.gterm as gterm
Work_dir = os.getenv('PWD', '') or os.getcwd()
usage = 'usage: %prog [-e ace/ckeditor] filename'
parser = OptionParser(usage=usage)
parser.add_option('-e', '--editor', dest='editor', default='ace', help=
    'Editor: ace/ckeditor')
options, args = parser.parse_args()
if len(args) != 1:
    print(parser.get_usage(), file=sys.stderr)
    sys.exit(1)
if gterm.Export_host:
    assert sys.stdin.isatty()
gterm.edit_file(args[0], dir=Work_dir, create=True, editor=options.editor)

<mask token>
from __future__ import absolute_import, print_function
import os
import sys
from optparse import OptionParser
try:
    import gterm
except ImportError:
    import graphterm.bin.gterm as gterm
Work_dir = os.getenv('PWD', '') or os.getcwd()
usage = 'usage: %prog [-e ace/ckeditor] filename'
parser = OptionParser(usage=usage)
parser.add_option('-e', '--editor', dest='editor', default='ace', help=
    'Editor: ace/ckeditor')
options, args = parser.parse_args()
if len(args) != 1:
    print(parser.get_usage(), file=sys.stderr)
    sys.exit(1)
if gterm.Export_host:
    assert sys.stdin.isatty()
gterm.edit_file(args[0], dir=Work_dir, create=True, editor=options.editor)

#!/usr/bin/env python
#

"""
gvi: graphterm-aware visual editor
"""

from __future__ import absolute_import, print_function

import os
import sys

from optparse import OptionParser

try:
    import gterm
except ImportError:
    import graphterm.bin.gterm as gterm

Work_dir = os.getenv("PWD", "") or os.getcwd()

usage = "usage: %prog [-e ace/ckeditor] filename"
parser = OptionParser(usage=usage)
parser.add_option("-e", "--editor", dest="editor", default="ace",
                  help="Editor: ace/ckeditor")

(options, args) = parser.parse_args()

if len(args) != 1:
    print(parser.get_usage(), file=sys.stderr)
    sys.exit(1)

if gterm.Export_host:
    assert sys.stdin.isatty()

gterm.edit_file(args[0], dir=Work_dir, create=True, editor=options.editor)
