Replies: 1 comment
-
|
You're right. This is because the Node version of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a problem and can't solve it without hacks.
The following code uses two different approaches. One uses
globfunction ofDirand works as I expect and the second uses globalGlobwhich internally callsDir.globbut works differently.The output is following:
If I change the second example to prepend actual directory to exclude string it works.
for f in env.Glob(_dir + "*.cpp", exclude=_dir + "*.gen.cpp"):So the problem is that I already receive string
src/*.cppand I need to create hacky invalidDirenv.Dir("src/*.cpp").path_elements[-2].pathto getsrcstring or to useos.path.dirname("src/*.cpp")which is more beautiful but still is a workaround.Is there a way to force
env.Globwork like it was called from actualenv.globor do you have any other ideas how to perform it without hacks or mabual filtering of returned list? (I can't change format in which I receive string)Beta Was this translation helpful? Give feedback.
All reactions