string manipulation.

2010-07-27 Thread gerardob
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

an element from a set

2010-05-14 Thread gerardob
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:

scipy error undefined symbol: lsame_

2010-04-19 Thread gerardob
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

Python Pickle

2010-04-12 Thread gerardob
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:

Pickle

2010-04-12 Thread gerardob
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:

Re: Pickle problem while loading a class instance.

2010-04-09 Thread gerardob
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

Pickle problem while loading a class instance.

2010-04-06 Thread gerardob
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')