← Back to team overview

sikuli-driver team mailing list archive

[Bug 1533134] [NEW] [1.1.0] comand line quoted parameters: single quotes should work too

 

Public bug reported:

************* workaround

use double-quotes

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

I wrote a simple test por pass user parameters by command line in
Windows. For one-word parameters it works ok, but when I quote
parameters to include spaces in values, sikulix is ignoring my quotes.
In fact it treats quotes as part of each parameter, as it does to any
other character.

The command line used is like this:
<path>runsikulix.cmd -r <path to script.sikuli> -- 'par 1' 'par 2'

My script is this:
import sys
for arg in sys.argv:
    print arg
popup("see what u got.")

The result is this:
'par
1'
'par
2'

So, I conclude that sikulix treated my command line as containing 4
parameters.

I'm using Sikulix 1.1.0 Build: 2015-09-15_01:00nightly

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: Fix Committed

** Changed in: sikuli
       Status: New => Fix Committed

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.1

** Description changed:

+ ************* workaround
+ 
+ use double-quotes
+ 
+ ---------------------------------
+ 
  I wrote a simple test por pass user parameters by command line in
  Windows. For one-word parameters it works ok, but when I quote
  parameters to include spaces in values, sikulix is ignoring my quotes.
  In fact it treats quotes as part of each parameter, as it does to any
  other character.
  
  The command line used is like this:
  <path>runsikulix.cmd -r <path to script.sikuli> -- 'par 1' 'par 2'
  
  My script is this:
  import sys
  for arg in sys.argv:
-     print arg
+     print arg
  popup("see what u got.")
  
  The result is this:
  'par
  1'
  'par
  2'
  
  So, I conclude that sikulix treated my command line as containing 4
  parameters.
  
  I'm using Sikulix 1.1.0 Build: 2015-09-15_01:00nightly

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

Title:
  [1.1.0] comand line quoted parameters: single quotes should work too

Status in Sikuli:
  Fix Committed

Bug description:
  ************* workaround

  use double-quotes

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

  I wrote a simple test por pass user parameters by command line in
  Windows. For one-word parameters it works ok, but when I quote
  parameters to include spaces in values, sikulix is ignoring my quotes.
  In fact it treats quotes as part of each parameter, as it does to any
  other character.

  The command line used is like this:
  <path>runsikulix.cmd -r <path to script.sikuli> -- 'par 1' 'par 2'

  My script is this:
  import sys
  for arg in sys.argv:
      print arg
  popup("see what u got.")

  The result is this:
  'par
  1'
  'par
  2'

  So, I conclude that sikulix treated my command line as containing 4
  parameters.

  I'm using Sikulix 1.1.0 Build: 2015-09-15_01:00nightly

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1533134/+subscriptions


Follow ups