First time here? Check out the FAQ!

Ask Your Question
0

putting a sage program inside a loop with out modifying the indentation

asked 9 years ago

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I have written a simple program on sage, in which I will define a graph G at the beginning , and the program will return a matrix. now I want the program to return all such matrices corresponds to all trees of order 5. So basically I want to iterate the program over the list of all trees of order 5. But when I doing so, I need to change the indentation of each and every line of the program as I am putting all of them inside a loop. is there any way of getting rid of this problem, my program has more than 50 lines so it looks difficult to change the indentation . one thing I thought was using goto command, but I dont know how to use it.

Any suggestion would be appreciated.

Thanks a lot.

Preview: (hide)

Comments

get an editor that makes it easy to increase the indentation of the whole block. The sage notebook itself does that.

nbruin gravatar imagenbruin ( 9 years ago )

can you please tell me how to increase the whole indentation in sage notebook? thanks

GA316 gravatar imageGA316 ( 9 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

tmonteil gravatar image

On the Sage notebook, just select the paragraph you want to indent and click on the <tab> key.

Preview: (hide)
link

Comments

thanks. it works perfectly. nice.

GA316 gravatar imageGA316 ( 9 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 9 years ago

Seen: 344 times

Last updated: Sep 20 '15