X-1.0rc3: from package import * does not work for Java classes in imported Sikuli scripts --- fixed in 1.1.0

Bug #844546 reported by RaiMan on 2011-09-08
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Sikuli
Critical
RaiMan

Bug Description

see https://answers.launchpad.net/sikuli/+question/170365
for details.

***** proof of being fixed:
---*** folder before run
Raimunds-MBP:~ raimundhocke$ ls -l /Users/raimundhocke/Desktop/SikuliX/TestImport
total 0
drwxr-xr-x 3 raimundhocke staff 102 6 Mär 16:51 main.sikuli
drwxr-xr-x 4 raimundhocke staff 136 6 Mär 16:58 sub.sikuli

---*** content of main
Raimunds-MBP:~ raimundhocke$ cat /Users/raimundhocke/Desktop/SikuliX/TestImport/main.sikuli/main.py
from sub import *
action()

---*** content of sub
Raimunds-MBP:~ raimundhocke$ cat /Users/raimundhocke/Desktop/SikuliX/TestImport/sub.sikuli/sub.py
#from sikuli import * # only needed if SikuliX features used in sub
from java.awt import Robot
from java.awt import Toolkit
from java.awt import Rectangle
from java.io import File
from javax.imageio import ImageIO
def action():
  p = "/Users/raimundhocke/Desktop/SikuliX/TestImport" # getParentPath()
  f = "test.jpg"
  robot = Robot()
  theImage = robot.createScreenCapture( \
             Rectangle(Toolkit.getDefaultToolkit().getScreenSize()))
  ImageIO.write(theImage, "jpg", File(p, f))

--- run the main script
Raimunds-MBP:~ raimundhocke$ /Applications/SikuliX.app/run -r /Users/raimundhocke/Desktop/SikuliX/TestImport/main.sikuli
running SikuliX: /Applications/SikuliX.app/Contents/Java/sikulix.jar -r /Users/raimundhocke/Desktop/SikuliX/TestImport/main.sikuli

---*** folder after run: capture in file test.jpg
Raimunds-MBP:~ raimundhocke$ ls -l /Users/raimundhocke/Desktop/SikuliX/TestImport
total 344
drwxr-xr-x 3 raimundhocke staff 102 6 Mär 16:51 main.sikuli
drwxr-xr-x 4 raimundhocke staff 136 6 Mär 16:58 sub.sikuli
-rw-r--r-- 1 raimundhocke staff 174848 6 Mär 17:10 test.jpg
Raimunds-MBP:~ raimundhocke$

RaiMan (raimund-hocke) on 2012-11-02
Changed in sikuli:
status: New → In Progress
assignee: nobody → RaiMan (raimund-hocke)
RaiMan (raimund-hocke) on 2012-11-02
tags: added: general
RaiMan (raimund-hocke) on 2013-02-21
tags: added: fkt-import
removed: general
RaiMan (raimund-hocke) on 2013-02-21
Changed in sikuli:
importance: Undecided → High
RaiMan (raimund-hocke) on 2013-02-21
Changed in sikuli:
milestone: none → x1.0
RaiMan (raimund-hocke) on 2013-05-06
Changed in sikuli:
milestone: x1.0 → x1.1
RaiMan (raimund-hocke) on 2016-03-06
summary: X-1.0rc3: from package import * does not work for Java classes in
- imported Sikuli scripts
+ imported Sikuli scripts --- fixed in 1.1.0
Changed in sikuli:
status: In Progress → Fix Committed
importance: High → Critical
RaiMan (raimund-hocke) on 2016-03-06
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers