Ask Your Question

anonym's profile - activity

2012-12-14 06:47:07 +0200 asked a question print a graph using sage library and python script

I'm using sage to generate graphs with python script. I want to write an interactive program that asks user to choose parameters for the graph they want to generate. with these parameters I generate the graph. For example if the user wants to generate a RandomGNP graph he has to specify the nodes' number and the probability

graphs.RandomGNP(6, .4) Is it possible to pass the values I get from the console in my scipt ? I tried with this code but I'm having an error :

dic = {"graphs": graphs, "digraphs":digraphs}
methodtocall = getattr(dic["graphs"], "RandomGNP")
result = methodtocall(list_param.values()[2], 0.2)
print(result)

list_param.values()[2] is the value I retrieve from the console :

list_param.update({param["name"]: float(input("choose a value :\n" ))})

and the error is :

IndexError: list index out of range

Thanks in advance

2012-12-05 19:17:50 +0200 asked a question sage windows vm cannot start

Hi ! I installed sage 5.4.1 on windows 7 and I'm using Vm workstation to open the .ova but I have a problem : Just after logging in the Vm stops working and I don't understand why. Can you please help me