[Scons-users] Reading a file in an emitter
William Roberts
bill.c.roberts at gmail.com
Thu Mar 19 16:06:24 EDT 2015
I have solved the issue, and it was in the documentation for the scanner.
However, a scanner is not what I think is needed.
I am looking at the scanner, and it appears to be for dependencies, not for
modifying the targets that get built, is that correct?
I tooke the file path that I was trying to open and created a Node.File()
object and used get_contents() method to retrieve the data
Thanks.
On Thu, Mar 19, 2015 at 1:09 AM, Dirk Bächle <tshortik at gmx.de> wrote:
> Hello William,
>
>
> On 18.03.2015 23:35, William Roberts wrote:
>
>> I am attempting to read a source file passed in via source argument in my
>> emmitter. However, I can't open the file, as the source
>> file I am trying to read has not been symlinked into my variant directory.
>>
>> CWD: <root>out/vm
>> IOError: [Errno 2] No such file or directory: 'src/miniat_java.i'
>>
>> Is their a proper way to read a source file while in the emitter and
>> respect the virant dir?
>>
>>
> in the latest source (current tip of our main development branch) there is
> the method
>
> Node.FS.Dir.rentry_exists_on_disk(name)
>
> for exactly this purpose. It returns True if the given file exists
> locally, or in one of the repositories (remote locations). You can then
> create a proper Node for it, and use get_contents().
>
> Best regards,
>
> Dirk
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
--
Respectfully,
William C Roberts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150319/0f347758/attachment.html>
More information about the Scons-users
mailing list