← Back to team overview

sikuli-driver team mailing list archive

[Bug 584471] Re: X-1.0rc2: Eclipse/Netbeans: 'with' will become a reserved keyword in Python 2.6

 

** Summary changed:

- 0.10.1 parser error: 'with' will become a reserved keyword in Python 2.6
+ X-1.0rc2: Eclipse/Netbeans: 'with' will become a reserved keyword in Python 2.6

** Summary changed:

- X-1.0rc2: Eclipse/Netbeans: 'with' will become a reserved keyword in Python 2.6
+ X-1.0rc2: Eclipse/Netbeans: 'with' will become a reserved keyword in Python 2.6 --- workaround

** Description changed:

+ *** Sikuli-IDE: problem solved with X-1.0rc2
+ 
+ *** Eclipse / Netbeans / sikuli-script.jar standalone: 
+ add in the first line of your script:
+ from __future__ import with_statement
+ 
+ (posted by NMANOS (https://launchpad.net/~nuummi))
+ 
+ --------------------------------------------------------------------------------------------
+ 
  The workaround i posted in
  https://bugs.launchpad.net/sikuli/+bug/583085/comments/4 only works as
  long as it is located in the main .py.
  
  When put into a user module i import using the strategy RaiMan posted on
  2010-05-19 in https://answers.launchpad.net/sikuli/+question/110877:
  
  <path>\bugged.sikuli\bugged.py:
  =====================================
  import sys
  sys.path.append(getBundlePath())
  import bug
  =====================================
  
  it aborts with:
  
  SyntaxError: ("'with' will become a reserved keyword in Python 2.6",
  ('C:\\bugged.sikuli\\bug.py', 13, 1, ''))
  
  Because of the error i am unable to save it as .skl, so i had to attach
  bug.py on it's own (save as <path>\bugged.sikuli\bug.py to follow
  example).
  
  This is with 0.10.1-RC2 from
  https://bugs.launchpad.net/sikuli/+bug/580000/comments/9 on 32Bit XP Pro
  SP3

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/584471

Title:
  X-1.0rc2: Eclipse/Netbeans: 'with' will become a reserved keyword in
  Python 2.6 --- workaround

Status in Sikuli:
  Fix Released

Bug description:
  *** Sikuli-IDE: problem solved with X-1.0rc2

  *** Eclipse / Netbeans / sikuli-script.jar standalone: 
  add in the first line of your script:
  from __future__ import with_statement

  (posted by NMANOS (https://launchpad.net/~nuummi))

  --------------------------------------------------------------------------------------------

  The workaround i posted in
  https://bugs.launchpad.net/sikuli/+bug/583085/comments/4 only works as
  long as it is located in the main .py.

  When put into a user module i import using the strategy RaiMan posted
  on 2010-05-19 in
  https://answers.launchpad.net/sikuli/+question/110877:

  <path>\bugged.sikuli\bugged.py:
  =====================================
  import sys
  sys.path.append(getBundlePath())
  import bug
  =====================================

  it aborts with:

  SyntaxError: ("'with' will become a reserved keyword in Python 2.6",
  ('C:\\bugged.sikuli\\bug.py', 13, 1, ''))

  Because of the error i am unable to save it as .skl, so i had to
  attach bug.py on it's own (save as <path>\bugged.sikuli\bug.py to
  follow example).

  This is with 0.10.1-RC2 from
  https://bugs.launchpad.net/sikuli/+bug/580000/comments/9 on 32Bit XP
  Pro SP3