Permalink
Browse files

Added sugar command

  • Loading branch information...
1 parent 8f4cd08 commit 9f5542e2538f2a9f21a799fe80def103c1765dd3 Sebastien Pierre committed Dec 6, 2008
Showing with 11 additions and 4 deletions.
  1. +3 −0 Scripts/sugar
  2. +6 −3 Sources/sugar/main.py
  3. +2 −1 setup.py
View
@@ -0,0 +1,3 @@
+#!/usr/bin/python
+import sys, sugar.main
+print sugar.main.run(sys.argv[1:])
View
@@ -40,8 +40,11 @@ def sourceToJavaScript( text, moduleName=None ):
else:
return command.runAsString(["-cljavascript", "-ssg", text])
+def run(arguments):
+ command = Command("sugar")
+ if not arguments: arguments = ["--help"]
+ command.run(arguments)
+
if __name__ == "__main__":
import sys
- command = Command("sugar")
- command.run(sys.argv[1:])
-
+ run(sys.argv[1:])
View
@@ -58,7 +58,8 @@
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
- ]
+ ],
+ scripts = ["Scripts/sugar"]
)
# EOF - vim: tw=80 ts=4 sw=4 noet

0 comments on commit 9f5542e

Please sign in to comment.