[Scons-users] SCons, Python 3, and pathlib

Russel Winder russel at winder.org.uk
Tue Jul 25 05:18:10 EDT 2017


Now that SCons runs on Python 3, it is (at least in principle) feasible
to use pathlib instead of all the os and os.path fiddling. However, it
seems that the __file__ symbol is not defined in a SConstruct file, and
Path(__file__) seems the idiomatic way of getting a path to the
SConstruct file. Is there a SCons way of getting the path to the
current location of this file?

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170725/a5d7236d/attachment.pgp>


More information about the Scons-users mailing list