Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__file__ returns quoted path string In KLayout IDE #946

Closed
cheng1214 opened this issue Dec 15, 2021 · 1 comment
Closed

__file__ returns quoted path string In KLayout IDE #946

cheng1214 opened this issue Dec 15, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@cheng1214
Copy link

cheng1214 commented Dec 15, 2021

Hi All,

In my case, _file_ returns "'C:/Users/Rui Cheng/KLayout/salt/siepic_tools/tech/GSiP/pymacros/GSiP Library.lym'", which is seen as invalid path in many cases of Python.

I guess that the issue might be because of the name space of my usename folder? But that issue doesn't exist in my Spyder.

Currently, I have fixed the issue by using _file_[1:-1].

I wondered if anyone could help fix this issue.

Thanking you!

@klayoutmatthias
Copy link
Collaborator

If fixed the issue which was related to the blank in the path.

However, if you are using the include feature (see https://www.klayout.de/doc-qt5/manual/drc_runsets.html#k_3), __file__ (Python) or __FILE__ (Ruby) will not report the true file name as the interpreters will see an include-expanded version.

Matthias

klayoutmatthias added a commit that referenced this issue Dec 16, 2021
Fixed issue #946 for the case of file paths with blanks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants