-1

For running of one of my C++ programs, using terminal(Ubuntu) I use

Note: I'm trying to Embed Python in C++. Hence, PYTHONPATH in C++. Refer to Python/C API for more details.

$ PYTHONPATH=. ./prog_name 

Sorry, I didn't know how to ask this question on Google. I want to do the same running with Eclipse. I don't know where to specify PYTHONPATH=. during running from Eclipse. How to produce the equivalent of this? I tried putting in argument list, but obviously it didn't work. Thanks!

PS. Don't downvote just because you don't understand that python scripts can be called through C++ .. Lol

user3000805
  • 287
  • 1
  • 2
  • 14

1 Answers1

0

Hi to all those facing the same problem, i found the solution! setenv() is a function defined in which sets the environment variable. Just have to run it!

setenv("PYTHONPATH",".",1);

for more info on setenv:

$ man setenv

All the best :)

user3000805
  • 287
  • 1
  • 2
  • 14