← Back to team overview

sikuli-driver team mailing list archive

[Bug 1297168] Re: Feature request for a command like "exit(1)" that starts the script from a specific line

 

I have set this request to "won't fix", because on one hand such an
implementation is rather complex with little effect and might raise
other problems, when used.

If some code can be run from line 101, then the code in line 1 - 100 programmatically is totally independent and should be handled as such (if/else/while blocks, classes, defs and/or modules). 
Even the simple unit test workflow allows elegant solutions for setting up workflows from smaller parts.

If you want to stick with your approach, the simplest solution is to add a line containing 3 consecutive apostrophes before the first line, that should not run and the same line before the first statement that should be run.
you might add additional trailing text, to easily identify the lines.
this makes all lines between these 2 block comment lines to comment, so they will be skipped at runtime.
So you have your solution with one more line to be added.

** Changed in: sikuli
       Status: New => Won't Fix

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

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

Title:
  Feature request for a command like "exit(1)" that starts the script
  from a specific line

Status in Sikuli:
  Won't Fix

Bug description:
  It would be extremely useful to have a command that will start executing my script from a specific line: like "start(1)"??
  It would be like exit(1) which stops it at that line of the code, just the other way round..

  Say if I want to test my 600 line script from line 101 to 120 I would put the command "start(1)" at line 100 and "exit(1)" at line 121.
  This would be amazingly helpful for executing and testing parts of a code easily.

  At the moment I have to copy and paste the parts of my script into a
  new project to test and then modify the original with my corrections
  and then copy the modified again to test it.. this process can slow
  down quite a lot when I have hundreds of lines..

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


References