This is a read-only mirror of pymolwiki.org

Get legal name

From PyMOL Wiki
Revision as of 15:33, 18 August 2011 by Speleo3 (talk | contribs) (Created page with "'''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 == <source lang="pyth...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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