Skip to content

Removed some hard-coded paths (see last PR) and added command line options

Marcus Oskarsson requested to merge gh-5d25d92d/38/mguijarr/master into master

Created by: mguijarr

Last committed code introduced some hard-coded paths, this PR removes that.

The solution for not having hard-coded paths can be the following:

  • use of "-r" command line switch to specify HWR directory
  • use of "-s" command line switch to specify beamline setup hardware object (defaults to "/beamline-setup"
  • normally, diffractometer and other devices are all loaded by beamline setup so we can use this object to get access to all others
  • except "queue-model", so I added a "-q" switch

Otherwise be careful not committing hard-coded paths ;-) Anyway the command line options are needed so it's good to add them.

I also enabled absolute imports, it is the new Python standard (since 2.7 I think ?) ; also, it fixes a weird bug I had with Hardware Repository package (I am still running Python 2.6 here...). Should not make any difference for you.

Merge request reports