gatech-csl / jes

The Jython Environment for Students allows students to write Jython programs that can manipulate pictures, sounds, and videos.
http://mediacomputation.org/
60 stars 38 forks source link

Imported python modules cannot find JES functions #60

Open leafstorm opened 10 years ago

leafstorm commented 10 years ago

From cam.macd...@gmail.com on October 29, 2012 18:47:05

What steps will reproduce the problem? 1. Create a file that uses a JES function, like printNow

  1. Import that file from another file
  2. Run a function that calls printNow() What is the expected output? What do you see instead? I expect that printNow should work, but instead I get the error

The error was:printNow Name not found globally. What version of the product are you using? On what operating system? JES 4.3 on Mac OS X 10.7.4 Please provide any additional information below. In short, we'd like to be able to import user python files, but it's not working as described above.

Original issue: http://code.google.com/p/mediacomp-jes/issues/detail?id=60

cayuse commented 7 years ago

yeah same problem, is there a way to import the JES functions from within the module?

mjguzdial commented 7 years ago

Is the problem that you have a module that uses makePicture and getSamples and the like, and you want to know how to access those JES-specific functions? I think that's on Page 302 in the 4th edition book: from media import *, making sure that the library is set up right.