#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    31
    Rep Power
    11

    Is there in Python something like Applet to display image/animation on webpage?


    Hello

    I guess the question subject line itself tells about my query. i just wann know that is there any way to display image and animation on webpage.

    i am planning tomake web application in which User will enter values in input boxes in forum and based on input value my Pythonn program should display animation or draing on webpage

    How this has to be done?

    Sandeep
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Location
    There where the rabbits jump
    Posts
    556
    Rep Power
    11
    em that would be cgi something? for the vals

    and for the animation I think there is nothing really yet you could try to make an extension or use jython to use java script (I dont know for sure)
    Those people who think they know everything are a great annoyance to those of us who do.
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    Did you try looking into ActiveX?
  6. #4
  7. A wanna-be guru of some sort
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2004
    Location
    Either online or offline
    Posts
    625
    Rep Power
    20
    Yes, you can actually write applets in Python. It's outdated, but doable.
    http://grail.sourceforge.net/info/manual/applets.html
    But I would still recommend using some other way of accomplishing what you want.
    Am I supposed to sign here?
  8. #5
  9. Only the strong survives!!.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Feb 2003
    Location
    A World of wonders.
    Posts
    5,583
    Rep Power
    407
    hmm i think you can create appletes with jthon, not sure.. i really never tried it.. but i have read about it... its pretty mutch and old module if you ask me.. there has got to be a better alternative.
  10. #6
  11. A wanna-be guru of some sort
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2004
    Location
    Either online or offline
    Posts
    625
    Rep Power
    20
    Originally Posted by xlordt
    hmm i think you can create applets with jython,
    Yes, you can. Click
    Am I supposed to sign here?
  12. #7
  13. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    174
    Rep Power
    11
    although the first page of the http://www.jython.org/applets/index.html site shows java code, subsequent demos are python-looking.
    Last edited by sf2k; September 28th, 2005 at 05:17 AM.
  14. #8
  15. Only the strong survives!!.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Feb 2003
    Location
    A World of wonders.
    Posts
    5,583
    Rep Power
    407
    I have never tried jython but i would like to know how it goes.. , a sample maybe.
  16. #9
  17. A wanna-be guru of some sort
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2004
    Location
    Either online or offline
    Posts
    625
    Rep Power
    20
    Originally Posted by xlordt
    I have never tried jython but i would like to know how it goes.. , a sample maybe.
    A really simple example I wrote a long time ago... Here you go:
    Python Code:
    #!/usr/bin/jython
    import javax.swing.JOptionPane as JOP
    from javax.swing import *
    import sys
    bad = True
    num = 0
    while bad:
    	try:
    		UIManager.setLookandFeel(UIManager.getSystemLookAndFeel())
    		num = int(JOP.showInputDialog(None, "Enter a number:", "User Input", JOP.QUESTION_MESSAGE))
    		if num < 0 or num > 20: raise ValueError
    		bad = False
    	except ValueError:
    		JOP.showMessageDialog(None, "Invalid input\n Try again", "Error", JOP.ERROR_MESSAGE)
    	except:
    		sys.exit()
    def fact(n):
    	if n <= 1: return 1
    	else: return n * fact(n - 1)
    JOP.showMessageDialog(None, "The factorial of " + str(num) + " is " + str(fact(num)) + ".", "Factorial", JOP.INFORMATION_MESSAGE)
    sys.exit()
    Am I supposed to sign here?
  18. #10
  19. Only the strong survives!!.
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Feb 2003
    Location
    A World of wonders.
    Posts
    5,583
    Rep Power
    407
    hmm is it worth learning jython?? becaue i dont find it fun to be honest with you.
  20. #11
  21. A wanna-be guru of some sort
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2004
    Location
    Either online or offline
    Posts
    625
    Rep Power
    20
    If you're building serious applications, then usin gJython instead of pure Java could save you up to 30% coding. But, I think we better stick to the subject of this thread...
    Am I supposed to sign here?
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    INDIA
    Posts
    31
    Rep Power
    11
    Thanks a lot

    for providing all these information. I really apreciate it.

    thanking You

    Sandeep

IMN logo majestic logo threadwatch logo seochat tools logo