Skip to content

Allow File and Directory traits to accept py.path and pathlib objects #2555

Open
@effigies

Description

@effigies

It's becoming increasingly common, particularly in Python 3, to use pathlib objects to describe files and directories. It would be useful to transparently accept these in File and Directory traits, converting them to strings.

It might also be useful (in Nipype 2.0) to add variants of these traits that are automatically promoted to pathlib objects when pulled from self.inputs.

Related: #2513

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions