11 Topics

Member Avatar for
Member Avatar for vegaseat

This 'sticky' thread is for working examples of Python GUI code. Note that most wxPython examples have their own thread. Please use comments in your code to help the reader. The example code should be usable as a template, so folks get a feel for the toolkit and can use …

Member Avatar for vegaseat
9
45K
Member Avatar for siga

Hi, I am given this assignment that should be run in Jython. The assignment says that the program consists of a Java application with a canvas and a textarea for turtle code. I need to create a Jython application that takes turtle code from the Java application, parses it with …

Member Avatar for vegaseat
0
927
Member Avatar for vegaseat
Member Avatar for vegaseat

Jython is a version of Python that can use the extensive Java library. Jython uses Python syntax and avoids the rather ugly syntax (at least for Pythonions) of Java. Here we apply it to bring up an image from a file.

4
700
Member Avatar for woodenduck

Hey all I need some help with Jython. In Python I'm given the easy option to read a file with [CODE]file = open('/dev/input/js0')[/CODE] Then I can put it into a non blocking mode with something similar to [CODE] import os, fcntl file = os.open('/dev/input/js0', os.O_NONBLOCK) [/CODE] But in Jython I'm …

0
216
Member Avatar for KenGreen

In an earlier post, Tech-B stated that, other then dialogs, there wasn't 'any "real" GUI support' in Python that uses the Android SDK or SL4A/SAE. Has anyone tried Jython with the Android SDK?

Member Avatar for Tech B
0
368
Member Avatar for flebber

Can I ask for a little help with virtualenv. I am looking at the docs here [URL="http://guide.python-distribute.org/pip.html"]http://guide.python-distribute.org/pip.html[/URL] and here [URL="http://www.jython.org/jythonbook/en/1.0/appendixA.html#virtualenv"]http://www.jython.org/jythonbook/en/1.0/appendixA.html#virtualenv[/URL] There are a few things I can't quite understand about it. First just to clarify I am on ubuntu and my default python is 2.7.1 1. I use virtualenv to …

Member Avatar for flebber
0
189
Member Avatar for Tremillian

I took an intro python class and learned some about jython. Unfortunately, what I have in mind is far too complicated for my level of training. Is it possible to use jython to import pictures from a scanner? If so, what module would I start with/use? The scanner is an …

Member Avatar for FALL3N
0
130
Member Avatar for WolfShield

So, I am working with some code I don't understand. Here is the file: [CODE=Python] import sys import os def change_ext(directory, old_ext, new_ext): for f in os.listdir(sys.argv[1]): base, ext = os.path.splitext(f) if ext[1:] == sys.argv[2]: os.rename(f, "%s.%s" % (base, sys.argv[3])) if __name__ == '__main__': if len(sys.argv) < 4: print "usage: …

Member Avatar for WolfShield
0
425
Member Avatar for vegaseat

Hello, I am vegaseat, the goofy moderator from the Python forum of DaniWeb. I wanted to know if anyone in the Java forum has played around with Java based Python, also known as Jython. Jython uses easy to learn Python syntax and can use the Java libraries. To make a …

Member Avatar for bumsfeld
2
483
Member Avatar for TrustyTony

Here is experiment of how VM and Swing UI manage the sort test posted previously, instead of CPython and Tkinter. The timing is not so sweet, but at least no Java required! [CODE]K:\jython2.5.2>java -jar jython.jar swing_test.py 256000 words generated in 10.93 s Sorted in 1.68 s List prepared in 22.71 …

Member Avatar for TrustyTony
0
501

The End.