I am trying to read an xml using minidom from python library xml.dom
This is the xml file:
-
rm_structure
resources
resource
AB
Capacity100/Capacity
NumberVirtualClasses
2
Hello, let S be a python set which is not empty
(http://docs.python.org/library/sets.html)
i would like to obtain one element (anyone, it doesn't matter which one) and
assign it to a variable.
How can i do this?
Thanks.
--
View this message in context:
I installed scipy (and all the required libraries) and the following error
appears when i tried run a simple example which uses the optimize package of
scipy. I tried also numpy alone and it works ( at least for printing
numpy.array([10,20,10]))
error:
Traceback (most recent call last):
File
I have a problem using Pickle inside a class object.
The following code works:
m2 = markov_model.MarkovModel()
m2 = pickle.load(open(prueba, 'rb'))
print m2.n
However, if I create the following method inside markov_model.MarkovModel:
def load_model_from_file(self, name):
try:
I have a problem using Pickle inside a class object.
The following code works:
m2 = markov_model.MarkovModel()
m2 = pickle.load(open(prueba, 'rb'))
print m2.n
However, if I create the following method inside markov_model.MarkovModel:
def load_model_from_file(self, name):
try:
I tried both things:
1- moved all the code to C:/Python26/lib/site-packages
2- Modified the PYTHONPATH in the windows registry.
However, i stil have exactly the same error on the screen.
Any other suggestions?
Thanks.
Peter Otten wrote:
gerardob wrote:
Hello, I am new to python and i
Hello, I am new to python and i have a problem using the pickle load
function.
I have an object m of the class MarkovModel and i want to copy it to a file
and load it onto another class:
l=[1,2,3]
m = markov_model.MarkovModel()
m.load_observations(l)
file = open(prueba.txt, 'w')