root/hodgestar/WhitespaceCode/pbradbury/main.py

Revision 425, 1.4 kB (checked in by hodgestar, 22 months ago)

Playing around with Whitespace.

  • Property svn:mime-type set to text/python-source
  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/usr/bin/python
2"""
3***********************************************************************
4        Whitespace - A language with no visible syntax.
5        Copyright (C) 2003 Edwin Brady (e.c.brady@durham.ac.uk)
6        Converted into Python in 2004 by Phillip Bradbury (phlip@mrphlip.com)
7       
8        This program is free software; you can redistribute it and/or
9        modify it under the terms of the GNU General Public License
10        as published by the Free Software Foundation; either version 2
11        of the License, or (at your option) any later version.
12       
13        This program is distributed in the hope that it will be useful,
14        but WITHOUT ANY WARRANTY; without even the implied warranty of
15        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16        GNU General Public License for more details.
17       
18        You should have received a copy of the GNU General Public License along
19        with this program; if not, write to the Free Software Foundation, Inc.,
20        59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21***********************************************************************
22"""
23
24import Input
25import sys
26
27def main():
28        if len(sys.argv) == 1:
29                usage()
30        else:
31                Input.load(sys.argv[1])
32
33def usage():
34        print "wspace 0.3 (c) 2003 Edwin Brady, 2004 Phillip Bradbury"
35        print "------------------------------------------------------"
36        print "Usage: python", sys.argv[0], "[file]"
37
38if __name__ == "__main__":
39        main() # only if run mainline if run directly (not imported)
Note: See TracBrowser for help on using the browser.