jo.py - jEdit Open

jEdit Open is a Python script for opening files in jEdit. If jEdit is already running jo.py will use the running instance to open the files, otherwise it will open jEdit. jEdit itself will do the same thing, but because of the overhead of launching the JVM, jo.py can open files in a running instance much more quickly than jEdit can.

jo.py is similar to both the jEdit Launcher on Windows (R) and jeo (the jEdit Opener). Unlike the jEdit launcher, jo.py is cross-platform and supports opening files using wild-cards. jo.py is essentially a Python version of jeo, which is written in Perl. However, I did not use jeo as a base for jo.py and the configuration options are different.

Configuration

If jo.py is unable to open files in a running instance of jEdit, it will attempt to open jEdit. To open jEdit jo.py uses settings from a configuration file, jo.conf, located in your jEdit settings directory.

When jo.py is run, if it doesn't find it's config file, it will create one:

C:\tmp>jo jo.py

ERROR: Can't start jEdit - jedit.jar not specified in jo.conf.

You can find the settings file here:

    C:\Documents and Settings\orutherfurd\.jedit\jo.conf

Please supply the missing value and try again.

Here's what the default configuration looks like:

##
## configuration settings for jo.py (jEdit Open)
##
## Comments start with '#' and blank lines are ignored.
##

# Location of java executable.  If ``java``  is not
# specified, then ``jo.py`` will look for java by
# looking at JAVA_HOME and PATH environment variables.
#java=/usr/bin/java

# options for java executable
#java.opts=-Xmx32m

# Location of jEdit jar file.
# ** THIS IS REQUIRED **
#jedit.jar=/home/jEdit/jedit.jar

# options for jEdit
#jedit.opts=-noserver -nosettings

# :mode=properties:

Note that you must specify the location for jedit.jar for jo.py to be able to launch jEdit, if it's not running.

Usage

jo.py FILENAME [FILENAME+]

Note that you may use wildcards in place of file names, for example:

jo *.py

If not given any filenames or passed one of '/?', '-h', or '--help' jo.py will display a usage message and the location of the configuration file:

C:\tmp>jo
usage: jo.py FILENAME [FILENAME+]

settings in: C:\Documents and Settings\orutherfurd\.jedit\jo.conf

Requirements

Version History

  • 1.0, 2003-04-01
    • Initial release

Bugs & Feedback

Send bug reports, questions, and feedback to Ollie Rutherfurd <oliver@rutherfurd.net>.