You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I wonder if it wouldn't make sense to set file global variable by default inside pybind11::eval_file executed scripts might want to use it.
A kind of recurring pattern in python is:
import os
script_path = os.path.realpath(__file__)
The text was updated successfully, but these errors were encountered:
Seconded. Nominally, if you try and use trace in a file executed via py::eval_file without having set __file__, you won't see any commands for that file. An example usage (albeit a hacky motivation - for debugging in CLion): Python code C++ code
* Set __file__ constant when using eval_file
* Use const ref
* Use a move instead
* Revert
* Improve test
* Guard test with Python version
* Fix tests
* Dont support Python2 API
* Drop Python2 eval __file__ support
* Hack
* Semisupport Python2
* Take2
* Remove Python2 support
Hi,
I wonder if it wouldn't make sense to set file global variable by default inside pybind11::eval_file executed scripts might want to use it.
A kind of recurring pattern in python is:
The text was updated successfully, but these errors were encountered: