/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to src/stdhome.in

  • Committer: Tim Marston
  • Date: 2013-12-08 19:28:11 UTC
  • Revision ID: tim@ed.am-20131208192811-r20qj7cgmn4duw11
initial commit; basic app startup and initial command-line processing

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
2
 
#
 
1
#!/usr/bin/env python
 
2
 
3
3
# stdhome
4
4
#
5
5
# Copyright (C) 2013 Tim Marston <tim@edm.am>
21
21
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 
23
23
 
24
 
# @PACKAGE_NAME@ version @PACKAGE_VERSION@@bzr_info@
 
24
# @PACKAGE_NAME@ version @PACKAGE_VERSION@
 
25
 
25
26
 
26
27
if __name__ == "__main__":
27
28
 
30
31
 
31
32
        # check for a development source directory and use that if it's there
32
33
        PACKAGE_DIR = join( abspath( sys.path[ 0 ] ), "..", "lib" )
33
 
        if exists( join( PACKAGE_DIR, "stdhome", "the.py" ) ):
 
34
        if exists( join( PACKAGE_DIR, "stdhome", "stdhome.py" ) ):
34
35
                print >> sys.stderr, "!!! using development packages !!!"
35
36
                sys.path.insert( 0, PACKAGE_DIR )
36
37
        else:
37
38
                del PACKAGE_DIR
38
39
 
39
40
        # start main program
40
 
        from stdhome import the
41
 
        from stdhome.program import Program
42
 
        the.program = Program( "@PACKAGE_VERSION@@bzr_info@" )
43
 
        the.program.run()
 
41
        from stdhome.stdhome import *
 
42
        Stdhome( "@PACKAGE_VERSION@" ).run()