Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Jython 2.7, fullscreen, launcher & more #25

Merged
merged 35 commits into from

2 participants

Ralf Biedert Jonathan Feinberg
Ralf Biedert

I have been using Processing.py quite a lot recently. With it, I also implemented some new features and bug fixes. In particular:

• Now uses jython 2.7
• Added support for fullscreen mode
• Added convenience wrappers to launch sketches without the command line
• Optionally bundled JREs 
• Also added support for true "standalone" sketches with a separate launcher 
• Better support for frameworks such as Ani 
ralfbiedert added some commits
Ralf Biedert ralfbiedert Updated to latest Processing version. 874e34e
Ralf Biedert ralfbiedert Updated to latest Processing version. 389ea4b
Ralf Biedert ralfbiedert Updated to latest jython version (2.7.1b1). 23c6f80
Ralf Biedert ralfbiedert Restored Eclipse files. e1102cf
Ralf Biedert ralfbiedert Added "primitive float" which will help us with the Ani library. 6490706
Ralf Biedert ralfbiedert Added Processing 2.0 sketchFullScreen() functionality. bdfabf6
Ralf Biedert ralfbiedert Start scripts for Mac / Linux and Windows. Windows version needs a fi…
…x for the current path though.
c6ccf7a
Ralf Biedert ralfbiedert Started to work on the launcher feature. 1ae66d9
Ralf Biedert ralfbiedert First working launcher on Mac. 77c0a53
Ralf Biedert ralfbiedert Also copies bundled resources. 34cd3d7
Ralf Biedert ralfbiedert Launcher now also works on Windows. 8292f7f
Ralf Biedert ralfbiedert Added pwd() helper function when data is bundled. 664a9db
Ralf Biedert ralfbiedert Updated the README. 6eb14d2
Ralf Biedert ralfbiedert Fixed download URL ... 18e2616
Ralf Biedert ralfbiedert Also added development launcher scripts / apps. da70347
Ralf Biedert ralfbiedert Updated run script, now works on Windows with spaced paths. 6b205c9
Ralf Biedert ralfbiedert Added JREs to git ignore list. 07d1ccb
Ralf Biedert ralfbiedert Improved zip generation. d39f510
Ralf Biedert ralfbiedert Launcher emits message when no Java was found. 6ce0eaa
Ralf Biedert ralfbiedert Now with splash screen support, since startup is somewhat slow and we…
… should produce output.
6d53221
Ralf Biedert ralfbiedert Updated example, added redirection support. 28342f9
Ralf Biedert ralfbiedert Fixed .bat bug when started from lnk. 1210ba9
Ralf Biedert ralfbiedert Fixed build problems when no JRE present. 4bbb6b3
Ralf Biedert ralfbiedert Updated README. dc5c2f5
Jonathan Feinberg

I wonder if it might be better to create a dir in the temp dir and put the stream files in there.

Sure. Any suggestions?

Owner

What I mean is, instead of

System.setOut(new PrintStream(new FileOutputStream("output.txt")));

create a new directory as explained here and put the output.txt and error.txt files in that directory.

I can do that. However, the problem I'm seeing from a user's perspective is that he will have to search the logs first.

Also, since processing.py will likely start without a terminal when --redirect is used, there is no simple way to tell him where to go, which is sometimes not obvious (e.g., C:\Users\XXX\AppData\Local\Temp...)

Owner

How about creating them as [script].out.txt, [script].err.txt? (In the path of the script)....

Alternative: just within the script folder output.txt, error.txt (since otherwise many script will cause many files, and I could doubt one would like to retain them all)

Third issue: when called from a wrapper (e.g., Mac OS) the script path can't be used because it will be hidden within the .app folder. There we have to pick a few folders above (or something else).

Owner
Jonathan Feinberg

Please change these informational messages to stderr.

Jonathan Feinberg

System.err.println("propsResource:" + propsResource);

and same for libraries, below.

Jonathan Feinberg jdf commented on the diff
README.markdown
((14 lines not shown))
## Quick Start ##
-Download the processing.py distribution.
+Download __[Processing.py All-inclusive](http://s.xr.io/processing.py/latest.zip)__ (Windows & Mac, ~170mb).
Jonathan Feinberg Owner
jdf added a note

Let's change these links to github file download links.

Problem: github disabled uploads / downloads. (https://github.com/blog/1302-goodbye-uploads)

There should be a place to have the binary downloads as well. Do you have a project server or any other place to put them?

Jonathan Feinberg Owner
jdf added a note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Jonathan Feinberg jdf commented on the diff
README.markdown
((25 lines not shown))
- $ java -jar processing-py.jar examples.py/Basics/Math/noisefield.py
Jonathan Feinberg Owner
jdf added a note

I'd love for the intro docs to still contain pointers to some of these demos.

Will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
README.markdown
((146 lines not shown))
- """
Jonathan Feinberg Owner
jdf added a note

Could you restore this stuff?

I very much like what you've done to the README, but I'm wondering if you'd do an edit pass to it now to integrate what you've done with the original project, so that it doesn't look like a fork anymore, but is really a core contribution to the original project. Let me know what you think.

I can rework it. However, since the README is the "main entry point" into the project at the moment I recall that I found it a little confusing when I had my first look. I'll restore and rework a few things and submit it again.

Jonathan Feinberg Owner
jdf added a note

Ah, that's very helpful feedback. Well, don't make it confusing again; do what you think is most helpful for the newcomer, and I can always find a different place to put the heavy verbiage. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Jonathan Feinberg jdf commented on the diff
runtime/src/jycessing/core.py
@@ -74,3 +74,10 @@ def __mul__(a, b):
if isinstance(b, RealPVector):
raise TypeError("The * operator can only be used to multiply a PVector by a scalar")
return PVector(a.x * b, a.y * b, a.z * b)
+
+# Extra helper functions go here
+def pwd(name = ""):
+ """Returns the script's path, or the path for some data close to the script."""
+ import java.lang.System as System
+ return System.getProperty("python.main.root") + "/" + name
+
Jonathan Feinberg Owner
jdf added a note

Please add a newline here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Jonathan Feinberg
Owner
jdf commented

Maybe add a unit test for the new native float thingy?

Ralf Biedert

Addressed most of the issues (apart from the download links), fixed some other bugs as well.

Also, can you review the 'set' test please? It looks as if the unit test was wrong, at least CPython reports MySet in both cases.

(And the @PythonUsage is merely experimental … might as well remove it, since all of that might be covered by python-unit tests as well)

Jonathan Feinberg jdf was assigned
Jonathan Feinberg jdf merged commit 6de2184 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 16, 2013
  1. Ralf Biedert
  2. Ralf Biedert
  3. Ralf Biedert
  4. Ralf Biedert

    Restored Eclipse files.

    ralfbiedert authored
Commits on Feb 18, 2013
  1. Ralf Biedert
Commits on Feb 21, 2013
  1. Ralf Biedert
  2. Ralf Biedert

    Start scripts for Mac / Linux and Windows. Windows version needs a fi…

    ralfbiedert authored
    …x for the current path though.
Commits on Mar 30, 2013
  1. Ralf Biedert
  2. Ralf Biedert
  3. Ralf Biedert
  4. Ralf Biedert
Commits on Mar 31, 2013
  1. Ralf Biedert
  2. Ralf Biedert

    Updated the README.

    ralfbiedert authored
  3. Ralf Biedert

    Fixed download URL ...

    ralfbiedert authored
  4. Ralf Biedert
  5. Ralf Biedert
  6. Ralf Biedert
  7. Ralf Biedert

    Improved zip generation.

    ralfbiedert authored
  8. Ralf Biedert
  9. Ralf Biedert
  10. Ralf Biedert
  11. Ralf Biedert
  12. Ralf Biedert
  13. Ralf Biedert

    Updated README.

    ralfbiedert authored
Commits on Apr 1, 2013
  1. Ralf Biedert

    Fixed logging.

    ralfbiedert authored
    Added PythonUsage annotation to add a little safeguard against refactoring Java code used from Python.
  2. Ralf Biedert

    Fixed "set" test (please check!).

    ralfbiedert authored
    At least on CPython 2.7.3 and CPython 3.3 the type is MySet, not set for the same code.
  3. Ralf Biedert
  4. Ralf Biedert
  5. Ralf Biedert
  6. Ralf Biedert

    Moved method in launcher.

    ralfbiedert authored
  7. Ralf Biedert

    Newlines added.

    ralfbiedert authored
  8. Ralf Biedert

    Fixed noisefield demo.

    ralfbiedert authored
  9. Ralf Biedert

    Updated README.

    ralfbiedert authored
  10. Ralf Biedert
  11. Ralf Biedert

    Fixed some README links.

    ralfbiedert authored
Something went wrong with that request. Please try again.