Module Expr Str Import alias Import alias ImportFrom alias alias Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Call NameLoad NameLoad Assert CompareEq BinOpMod NameLoad Num Num Assign NameStore ListComp ListComp Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str comprehension NameStore NameLoad Assign NameStore BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore ListLoad ListLoad Num Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore SubscriptLoad BinOpAdd NameLoad SubscriptLoad NameLoad Slice Num Slice Num For NameStore Call NameLoad BinOpSub SubscriptLoad NameLoad Index Num Num SubscriptLoad NameLoad Index Num body Assign AttributeStore SubscriptLoad NameLoad Index NameLoad attr BinOpMod BinOpAdd Call NameLoad BoolOpOr AttributeLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr attr Num NameLoad Num Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A 
usage:   rotate.py my.pdf rotation [page[range] ...]
         eg. rotate.py 270 1-3 5 7-9

        Rotation must be multiple of 90 degrees, clockwise.

Creates rotate.my.pdf with selected pages rotated.  Rotates all by default.

 N/A sys N/A os pdfrw PdfReader PdfWriter N/A inpfn N/A N/A sys argv N/A 1 N/A rotate N/A N/A sys argv N/A 2 N/A ranges N/A N/A sys argv N/A 3 N/A rotate N/A int rotate N/A N/A N/A rotate 90 0 N/A ranges N/A N/A N/A int y N/A y N/A N/A x split - N/A x ranges N/A outfn N/A rotate.%s N/A N/A N/A os path basename inpfn N/A trailer N/A PdfReader inpfn N/A pages N/A trailer pages N/A N/A ranges N/A N/A ranges N/A N/A 1 N/A len pages N/A onerange ranges N/A N/A onerange N/A N/A onerange N/A onerange N/A -1 N/A 2 N/A pagenum N/A range N/A N/A onerange N/A 0 1 N/A onerange N/A 1 N/A N/A N/A N/A pages N/A pagenum Rotate N/A N/A N/A int N/A N/A N/A N/A pages N/A pagenum inheritable Rotate 0 rotate 360 N/A outdata N/A PdfWriter N/A N/A outdata trailer trailer N/A N/A N/A outdata write outfn