You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We agreed it would be useful to support a way to read-in field constructs from CDL supplied as a string, rather than defined in a file, the latter of which is the only means currently supported. (Naturally CDL is the only format we support that can be provided as a string.)
This could be handy if, say, a user had CDL copied to clipboard and they wanted to work with it interactively with cf, since they could just paste it into a string in their (i)Python session without having to save it to a file outside of the session.
An intuitive way to enable this would be a keyword argument such as cdl_string to cf.read to indicate, when True, that the input argument is a str of valid CDL rather than the path to a file, as standard, i.e:
cf.read(string, cdl_string=True)
where the default would of course be False.
The text was updated successfully, but these errors were encountered:
We agreed it would be useful to support a way to read-in field constructs from CDL supplied as a string, rather than defined in a file, the latter of which is the only means currently supported. (Naturally CDL is the only format we support that can be provided as a string.)
This could be handy if, say, a user had CDL copied to clipboard and they wanted to work with it interactively with cf, since they could just paste it into a string in their (i)Python session without having to save it to a file outside of the session.
An intuitive way to enable this would be a keyword argument such as
cdl_string
tocf.read
to indicate, whenTrue
, that the input argument is astr
of valid CDL rather than the path to a file, as standard, i.e:where the default would of course be
False
.The text was updated successfully, but these errors were encountered: