View Single Post
Old 03-17-2010, 05:07 PM   #1623
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by Starson17 View Post
I'll look for some when I get home. Just think of "url" as a string that you use Python string manipulation functions to modify before it gets returned.
Here's a simple way to do it:
Code:
    def print_version(self, url):
        parts = url.rsplit('?')
        print_url = parts[0] + '?Print=Yes'
        return print_url
It splits at the '?' and adds your '?Print=Yes' to the first half.
Starson17 is offline