# Revision history [back]

### Load an SVM from a string in Python?

Is there a way to load a pre-trained SVM model from an XML string in Python? I am looking to use it on a platform that does not support an external file system, so the model must be saved as a string in the .py file itself.

These examples (1, 2) seem possible in C++; however, it doesn't appear that svm->read is exposed in Python.

Is there a workaround that would accomplish something similar in Python?

//1
string yml; // the whole schlepp in a string
FileStorage fs;