Jython first run


/ Published in: Python
Save to your folder(s)

http://www.jython.org/docs/index.html


Copy this code and paste it in your HTML
  1. [mac]@dhcp9:/Applications/-Other-Apps/8-Languages-IDEs/Jython_2_5_1>java -jar jython.jar
  2. Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
  3. [Java HotSpot(TM) Client VM (Apple Inc.)] on java1.5.0_22
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> a
  6. Traceback (most recent call last):
  7. File "<stdin>", line 1, in <module>
  8. NameError: name 'a' is not defined
  9. >>> 2
  10. 2
  11. >>> [x for x in range(90)]
  12. [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89]
  13. >>> import javax.swing as swing
  14. >>> win = swing.JFrame("Welcome to Jython")
  15. >>> win.size = (200, 200)
  16. >>> win.show()

URL: http://onjava.com/pub/a/onjava/2002/03/27/jython.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.