Get legal name

From PyMOLWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

get_legal_name is an API only function that clears any non-valid characters from a potential object name.

New in PyMOL version 1.2

PyMOL API

cmd.get_legal_name(string name)

Example

This will print "foo_bar":

print cmd.get_legal_name('foo!"$%&/()=?bar')


SEE ALSO

get_names, get_legal_name, get_unused_name, set_names