File.FromPath node in Python

its Easy question )

i want to write File.FromPath node inside the Python code …

Assuming you want to read the content of the file you can do:

with open('path_to_file', 'rb') as inf:
       # do stuff with inf which is a file object
       # here is an example to print every line in the file
       for line in inf:
            print(line)

@Mostapha thank you for answer . i still not try your script…

and this i want to get

I think you’re looking for this:

from System.IO import FileInfo

file = FileInfo(IN[0])
3 Likes

@T_Pover
yes it is !
Thank you !

1 Like