def movePage(self, pno, to = -<NUM_LIT:1>):
pl = list(range(len(self)))<EOL>if pno < <NUM_LIT:0> or pno > pl[-<NUM_LIT:1>]:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if to < -<NUM_LIT:1> or to > pl[-<NUM_LIT:1>]:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>pl.remove(pno)<EOL>if to == -<NUM_LIT:1>:<EOL><INDENT>pl.append(pno)<EOL><DEDENT>else:<EOL><INDENT>pl.insert(to-<NUM_LIT:1>, pno)<EOL><DEDENT>return self.select(pl)<EOL>
Move a page to before some other page of the document. Specify 'to = -1' to move after last page.