Author Topic: "Run from dir:" not respected in Python project  (Read 1006 times)

rowbearto

  • Senior Community Member
  • Posts: 1549
  • Hero Points: 115
"Run from dir:" not respected in Python project
« on: October 23, 2017, 05:30:31 pm »
I have a Python project. I setup a build configuration, defined my working directory and put %rw in "Run from dir:".

When I try to execute (or even do "build" which I added to run a shell script), SE is not changing to the working directory (%rw) and therefore cannot find my script.

rowbearto

  • Senior Community Member
  • Posts: 1549
  • Hero Points: 115
Re: "Run from dir:" not respected in Python project
« Reply #1 on: October 23, 2017, 05:36:11 pm »
I think I may know what is going on here.

I defined "Working directory:" as %(HOME)/apt_tests

When I run: "echo %rw", it shows:

/home/rbresali/slickopt//home/rbresali/apt_tests/

Instead of showing:

/home/rbresali/apt_tests

/home/rbresali/slickopt is the directory with my project files.

So SE is prepending the project directory into the working dir when I do not want it to. If I wanted that, I would have put %rp there.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1170
  • Hero Points: 111
Re: "Run from dir:" not respected in Python project
« Reply #2 on: October 23, 2017, 08:43:31 pm »
Can you post the vpj file, or upload it to support?  Don't need the source files, just the project file.

rowbearto

  • Senior Community Member
  • Posts: 1549
  • Hero Points: 115
Re: "Run from dir:" not respected in Python project
« Reply #3 on: October 23, 2017, 08:48:53 pm »
Sure, it is attached.

Try the "BladeTest_apt" configuration and do "Build", you will see what I am referring to.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1170
  • Hero Points: 111
Re: "Run from dir:" not respected in Python project
« Reply #4 on: October 24, 2017, 05:35:19 pm »
The fix for this is going to have to go in the point release, it's related to having environment variable expansions in the working directory of the project.

As a temporary workaround, you can change the "Working directory" in project properties to manually expand out the %(HOME) environment variable to /home/rbresali. 

rowbearto

  • Senior Community Member
  • Posts: 1549
  • Hero Points: 115
Re: "Run from dir:" not respected in Python project
« Reply #5 on: October 25, 2017, 01:09:27 am »
Thanks for looking into it!