[Scons-users] How to identify a Node object as File or Directory type
M Busche
spammymatt94 at yahoo.com
Fri Jun 15 13:48:25 EDT 2012
Me.pythonLevel = NOOB
Me.sconsLevel = NOOB
My problem:
matt at meteor:scons.test$ cat SConstruct
d = Dir('blech')
print d.isdir()
matt at meteor:scons.test$ scons -Q
False
scons: `.' is up to date.
matt at meteor:scons.test$
OK, so the directory blech does not yet exist, but I was still expecting d.isdir() to return true. How am I supposed to interrogate d to determine that it is a Dir type Node?
Motivation:
I'm writing my own Builder that can take either a directory OR a file as it's build target. As one of my first steps in this builder I want to know which type I'm building. I did see that Python comes with a type() method, but the return value in this case seems to be "instance" or some such thing which leaves me equally puzzled. No doubt this is well explained in some bit of documentation I have overlooked. If you want to just point me to the relevant man page section or user guide section that would be just dandy. Thanks for your patience.
Good day!
More information about the Scons-users
mailing list