| | |
Python Game: Norbert Quest
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Murtan I took your code with the mode inputs as functions and pimped it out a bit, but I can't figure this part out:
I added a bank function (because dying needs consequences and you lose half your money on you so the bank keeps it safe) and a guild-like function (the government) and as you level up. you get new ranks and you get 10% more gold or xp (or higher) as your government rank goes up: level 10-officer, level 25-knight, level 50 - captain, level 90 - guardian, level 150 - lord commishener (I've got absolutely no idea how to spell it), level 200-imperial officer. once the xp/money increase is 100% or whatever, your xp and money will be double the usual you'd get. also there are special weapons only a certain rank can use (though I've yet to add them).
python Syntax (Toggle Plain Text)
import random class NorbertQuest(object): def __init__(self): self.weapon = 0 self.armor = 0 self.level = 1 self.m = random.randrange(50)+1+self.level*5 self.cost = 0 self.xp = 0 self.health = 150 self.ehealth = 100 self.money = 100 self.tnls = [100+level*50] self.wepORshield = 0 self.withdraw = 0 self.deposit = 0 self.bankbalance = 0 def Shop(self): self.weapons[1:"Steel Knuckles",2:"Knife",3:"Sword",4:"Gun",5:"Rocket Launcher"] self.armors[1:"Leather Jacket",2:"Padded Sweater",3:"Iron Arm-shield",4:"Bullet-Proof Jacket",5:"Bomber Squad Armor Plated Suit"] print \ """ What'll it be? Weapons: 1 - Steel Knuckles 50$ 2 - Knife 75$ 3 - Sword 300$ 4 - Gun 800$ 5 - Rocket Launcher 2500$ Armor: 1 - Leather Jacket 50$ 2 - Padded Sweater 75$ 3 - Iron Arm-shield 300$ 4 - Bullet-Proof Jacket 800$ 5 - Bomber Squad Armor Plated Suit Type exit to quit. """ self.wepORshield = raw_input("Do you want weapons or armor?") if self.wepORshield == "weapons": self.atk = input("Which weapon do you want?") if self.atk == 1: self.cost = 50 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 1 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == 2: self.cost = 75 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 2 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == 3: self.cost = 300 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 3 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == 4: self.cost = 800 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 4 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" if self.atk == 5: self.cost = 2500 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 5 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif wepORshield == "shield": if self.shield == 1: self.cost = 50 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 1 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.shield == 2: self.cost = 75 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 2 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.shield == 3: self.cost = 300 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 3 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.shield == 4: self.cost = 800 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 4 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" if self.shield == 5: self.cost = 2500 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 5 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == "exit": self.mode = "restart" def eAttack(self): self.attacke = random.randrange(12)+self.level*12 return self.attacke def HP(self): self.e = self.eAttack() self.d = self.nDefense() self.health = self.health - (self.e - self.d) print "Enemy hits for",self.e print "You block for",self.d print "Your HP is",self.health def nAttack(self): self.attack = random.randrange(10)+self.level*10 if self.weapon == 1: self.attack = random.randrange(10)+35+self.level*10 elif self.weapon == 2: self.attack = random.randrange(10)+55+self.level*10 elif self.weapon == 3: self.attack = random.randrange(10)+90+self.level*10 elif self.weapon == 4: self.attack = random.randrange(10)+150+self.level*10 elif self.weapon == 5: self.attack = random.randrange(10)+340+self.level*10 return self.attack def nDefense(self): self.armor = random.randrange(5)+self.level*5 if self.armor == 1: self.defense = random.randrange(5)+10+self.level*5 if self.armor == 2: self.defense = random.randrange(5)+25+self.level*5 if self.armor == 3: self.defense = random.randrange(5)+45+self.level*5 if self.armor == 4: self.defense = random.randrange(5)+70+self.level*5 if self.armor == 5: self.defense = random.randrange(5)+125+self.level*5 return self.defense def LVL(self): if 1 <= self.level <= len(self.tnls): self.tnl = self.tnls[self.level-1] if self.tnl <= self.xp: self.level += 1 if self.level > len(self.tnls): self.level = 100 self.xp = 0 print("Your new level is %d! Congratulations!" % self.level) if self.level == 100: print("Congratulations, you beat the Demo!") def EnemyHP(self): self.n = self.nAttack() self.ehealth = self.ehealth - self.n print "You hit for",self.n print "Enemy's HP is",self.ehealth def Bank(self): print"Welcome to the National Bank of NorbertQuest! What will you like to do?" self.bankchoice = raw_input("Do you want to withdraw or deposit? ") if self.bankchoice == "withdraw": print"Your current balance is",bankbalance,"dollars." self.withdraw = raw_input("How much would you like to withdraw? ") if self.withdraw > self.bankbalance: print"You don't have that much money in the bank!" self.mode = "restart" elif self.withdraw <= self.bankbalance: self.bankbalance - self.withdraw = self.money print"Your new bank Balance is",self.bankbalance,"dollars. Thank you." self.mode = "restart" elif self.bankchoice == "deposit": print"Your current balance is",bankbalance,"dollars." self.deposit = raw_input("How much would you like to deposit? ") if self.deposit > self.money: print"You don't have that much money on you!" self.mode = "restart" elif self.deposit <= self.money: self.money - self.deposit = self.bankbalance print"Your new bank Balance is",self.bankbalance,"dollars. Thank you." self.mode = "restart" def Battle(self): self.fight = random.randrange(10)+1 if self.fight == 1: self.monster = "Dragon!" elif self.fight == 2: self.monster = "Rogue Knight!" elif self.fight == 3: self.monster == "Jaguar!" elif self.fight == 4: self.monster = "Orc Lord!" elif self.fight == 5: self.monster = "Goblin!" elif self.fight == 6: self.monster = "Crazy Robot!" elif self.fight == 7: self.monster = "Werewolf!" elif self.fight == 8: self.monster = "Vampire!" elif self.fight == 9: self.monster = "Giant Spider!" elif self.fight == 10: self.monster = "Pirate King!" print "You have encountered a", self.monster, "What will you do?" self.health = 150 + self.level * 100 self.ehealth = 100 + self.level * 125 while self.health > 0 and self.ehealth > 0: self.turn = raw_input("Do you want to attack[1], defend[2] or cast a spell[coming soon]??") if self.turn == 1: print "You're attacking!" self.EnemyHP() self.HP() elif self.turn == 2: print "You're defending!" print "Monster's HP is",self.ehealth print "Your HP is",self.health else: print "Type attack or Defend!" if self.health <= 0: print "You are dead! You lose 50% of the money you have on you!" self.money = self.money/2 elif self.ehealth <= 0: print "You win the battle! You earn",self.m,"$!" self.money = self.money + self.m self.m = random.randrange(50)+1+self.level*5 self.xpGain = random.randrange(25)+self.level+25 self.xp = self.xpGain + self.xp print"You gain",self.xpGain,"Experience Points!" self.LVL() def main(self): while True: print \ """ Welcome to NorbertQuest! Type: - [battle] to hunt monsters - [shop] to buy weapons - [bank] to visit the bank - [badge] to visit the Government Building - [exit] to quit the game """ self.mode = raw_input("What do you want to do?: ") if self.mode == "shop": print"Your current weapon is",self.weapon[self.atk] print"Your current armor is",self.armor[self.shield] print"You have",money,"dollars on you." self.Shop() elif self.mode == "battle": self.Battle() elif self.mode == "badge": if self.level >= 10: print"Your current Government Rank is",self.govrank self.Badge() elif self.level < 10: print"Come back when you're stronger!" self.mode = "restart" elif self.mode == "bank": self.Bank() elif self.mode == "exit": print "If you exit now, all progress will be lost." self.exit = raw_input("Are you sure you want to quit? Yes or no: ") if "yes" in self.exit: break if "no" in self.exit: drlf.mode = "restart" if __name__ == "__main__": n = NorbertQuest() n.main() raw_input("Press [enter] to exit.")
I added a bank function (because dying needs consequences and you lose half your money on you so the bank keeps it safe) and a guild-like function (the government) and as you level up. you get new ranks and you get 10% more gold or xp (or higher) as your government rank goes up: level 10-officer, level 25-knight, level 50 - captain, level 90 - guardian, level 150 - lord commishener (I've got absolutely no idea how to spell it), level 200-imperial officer. once the xp/money increase is 100% or whatever, your xp and money will be double the usual you'd get. also there are special weapons only a certain rank can use (though I've yet to add them).
•
•
Join Date: May 2008
Posts: 538
Reputation:
Solved Threads: 86
If you're having a problem with part of the code, please be specific as to what the problem is. What did you see? What did you expect to see?
If it is a compile problem, include the full text of the compiler error if possible.
I saw something interesting in your new banking code, you ask for the amount to deposit/withdraw using raw_input. This alone is not a problem but it does mean that the amount is a string and not a number. You will need to convert it to a number before you attempt to compare against the balance or the cash-on-hand.
If it is a compile problem, include the full text of the compiler error if possible.
I saw something interesting in your new banking code, you ask for the amount to deposit/withdraw using raw_input. This alone is not a problem but it does mean that the amount is a string and not a number. You will need to convert it to a number before you attempt to compare against the balance or the cash-on-hand.
In the bank function, it can't add the deposit into the bankbalance:
Python Syntax (Toggle Plain Text)
elif self.deposit <= self.money: self.money - self.deposit = self.bankbalance print"Your new bank Balance is",self.bankbalance,"dollars. Thank you." self.mode = "restart"
Last edited by Norbert X; Mar 7th, 2009 at 3:37 pm.
Python Syntax (Toggle Plain Text)
*** can't assign to operator (NQv1, line 241)
That's the error I get. Line 241 is the self.money - self.deposit = self.bankbalance in my previous post.
This is the problem:
Change it to this
Your operations always have to be on the Right side of the "=" sign
python Syntax (Toggle Plain Text)
self.money - self.deposit = self.bankbalance
python Syntax (Toggle Plain Text)
self.bankbalance = self.money - self.deposit
Make it idiot proof and someone will make a better idiot.
Check out my Site | and join us on IRC | Python Specific IRC
Check out my Site | and join us on IRC | Python Specific IRC
Ok now I have 2 more problems: My money disappears if I deposit it into the bank (you start off with 100 dollars) and also I don't know how to define self.atk:
And can someone help me with the Government Function (well Badge Function)? I don't know how to go at it. If you don't know what the government is, look the last thing I posted with a code in it, and if that doesn't explain it, ask me.
Python Syntax (Toggle Plain Text)
import random class NorbertQuest(object): def __init__(self): self.weapon = 0 self.armor = 0 self.level = 1 self.m = random.randrange(50)+1+self.level*5 self.cost = 0 self.xp = 0 self.health = 150 self.ehealth = 100 self.money = 100 self.tnls = [100+self.level*50] self.wepORshield = 0 self.bankbalance = 0 self.withdraw = 0 self.deposit = 0 def Shop(self): self.weapons[1:"Steel Knuckles",2:"Knife",3:"Sword",4:"Gun",5:"Rocket Launcher"] self.armors[1:"Leather Jacket",2:"Padded Sweater",3:"Iron Arm-shield",4:"Bullet-Proof Jacket",5:"Bomber Squad Armor Plated Suit"] print \ """ What'll it be? Weapons: 1 - Steel Knuckles 50$ 2 - Knife 75$ 3 - Sword 300$ 4 - Gun 800$ 5 - Rocket Launcher 2500$ Armor: 1 - Leather Jacket 50$ 2 - Padded Sweater 75$ 3 - Iron Arm-shield 300$ 4 - Bullet-Proof Jacket 800$ 5 - Bomber Squad Armor Plated Suit Type exit to quit. """ self.wepORshield = raw_input("Do you want weapons or armor?") if self.wepORshield == "weapons": self.atk = input("Which weapon do you want?") if self.atk == 1: self.cost = 50 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 1 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == 2: self.cost = 75 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 2 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == 3: self.cost = 300 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 3 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == 4: self.cost = 800 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 4 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" if self.atk == 5: self.cost = 2500 if self.money >= self.cost: print"You have bought",self.weapons[self.atk] self.money = self.money - self.cost self.weapon = 5 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif wepORshield == "shield": if self.shield == 1: self.cost = 50 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 1 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.shield == 2: self.cost = 75 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 2 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.shield == 3: self.cost = 300 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 3 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.shield == 4: self.cost = 800 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 4 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" if self.shield == 5: self.cost = 2500 if self.money >= self.cost: print"You have bought",self.armors[self.shield] self.money = self.money - self.cost self.armor = 5 self.mode = "restart" elif self.money < self.cost: print"You don't have enough gold to buy this." raw_input("Press [enter] to exit.") self.mode = "restart" elif self.atk == "exit": self.mode = "restart" def eAttack(self): self.attacke = random.randrange(12)+self.level*12 return self.attacke def HP(self): self.e = self.eAttack() self.d = self.nDefense() self.health = self.health - (self.e - self.d) print "Enemy hits for",self.e print "You block for",self.d print "Your HP is",self.health def nAttack(self): self.attack = random.randrange(10)+self.level*10 if self.weapon == 1: self.attack = random.randrange(10)+35+self.level*10 elif self.weapon == 2: self.attack = random.randrange(10)+55+self.level*10 elif self.weapon == 3: self.attack = random.randrange(10)+90+self.level*10 elif self.weapon == 4: self.attack = random.randrange(10)+150+self.level*10 elif self.weapon == 5: self.attack = random.randrange(10)+340+self.level*10 return self.attack def nDefense(self): self.armor = random.randrange(5)+self.level*5 if self.armor == 1: self.defense = random.randrange(5)+10+self.level*5 if self.armor == 2: self.defense = random.randrange(5)+25+self.level*5 if self.armor == 3: self.defense = random.randrange(5)+45+self.level*5 if self.armor == 4: self.defense = random.randrange(5)+70+self.level*5 if self.armor == 5: self.defense = random.randrange(5)+125+self.level*5 return self.defense def LVL(self): if 1 <= self.level <= len(self.tnls): self.tnl = self.tnls[self.level-1] if self.tnl <= self.xp: self.level += 1 if self.level > len(self.tnls): self.level = 100 self.xp = 0 print("Your new level is %d! Congratulations!" % self.level) if self.level == 100: print("Congratulations, you beat the Demo!") def EnemyHP(self): self.n = self.nAttack() self.ehealth = self.ehealth - self.n print "You hit for",self.n print "Enemy's HP is",self.ehealth def Bank(self): print"Welcome to the National Bank of NorbertQuest! What will you like to do?" self.bankchoice = raw_input("Do you want to withdraw or deposit? ") if self.bankchoice == "withdraw": print"Your current balance is",self.bankbalance,"dollars." self.withdraw = input("How much would you like to withdraw? ") if self.withdraw > self.bankbalance: print"You don't have that much money in the bank!" self.mode = "restart" elif self.withdraw <= self.bankbalance: self.money = self.bankbalance - self.withdraw self.bankbalance = self.bankbalance - self.withdraw print"Your new bank Balance is",self.bankbalance,"dollars. Thank you." self.mode = "restart" elif self.bankchoice == "deposit": print"Your current balance is",self.bankbalance,"dollars." self.deposit = input("How much would you like to deposit? ") if self.deposit > self.money: print"You don't have that much money on you!" self.mode = "restart" elif self.deposit <= self.money: self.bankbalance = self.money - self.deposit self.money = self.money - self.deposit print"Your new bank Balance is",self.bankbalance,"dollars. Thank you." self.mode = "restart" def Battle(self): self.fight = random.randrange(10)+1 if self.fight == 1: self.monster = "Dragon!" elif self.fight == 2: self.monster = "Rogue Knight!" elif self.fight == 3: self.monster == "Jaguar!" elif self.fight == 4: self.monster = "Orc Lord!" elif self.fight == 5: self.monster = "Goblin!" elif self.fight == 6: self.monster = "Crazy Robot!" elif self.fight == 7: self.monster = "Werewolf!" elif self.fight == 8: self.monster = "Vampire!" elif self.fight == 9: self.monster = "Giant Spider!" elif self.fight == 10: self.monster = "Pirate King!" print "You have encountered a", self.monster, "What will you do?" self.health = 150 + self.level * 100 self.ehealth = 100 + self.level * 125 while self.health > 0 and self.ehealth > 0: self.turn = raw_input("Do you want to attack[1], defend[2] or cast a spell[coming soon]?") if self.turn == 1: print "You're attacking!" self.EnemyHP() self.HP() elif self.turn == 2: print "You're defending!" print "Monster's HP is",self.ehealth print "Your HP is",self.health else: print "Type attack or Defend!" if self.health <= 0: print "You are dead! You lose 50% of the money you have on you!" self.money = self.money/2 elif self.ehealth <= 0: print "You win the battle! You earn",self.m,"$!" self.money = self.money + self.m self.m = random.randrange(50)+1+self.level*10 self.xpGain = random.randrange(25)+1+self.level*25 self.xp = self.xpGain + self.xp print"You gain",self.xpGain,"Experience Points!" self.LVL() def main(self): while True: print \ """ Welcome to NorbertQuest! Type: - [battle] to hunt monsters - [shop] to buy weapons - [bank] to visit the bank - [badge] to visit the Government Building - [exit] to quit the game """ self.mode = raw_input("What do you want to do?: ") if self.mode == "shop": print"Your current weapon is",self.weapon[self.atk] print"Your current armor is",self.armor[self.shield] print"You have",money,"dollars on you." self.Shop() elif self.mode == "battle": self.Battle() elif self.mode == "badge": if self.level >= 10: print"Your current Government Rank is",self.govrank self.Badge() elif self.level < 10: print"Come back when you're stronger!" self.mode = "restart" elif self.mode == "bank": self.Bank() elif self.mode == "exit": print "If you exit now, all progress will be lost." self.exit = raw_input("Are you sure you want to quit? Yes or no: ") if "yes" in self.exit: break if "no" in self.exit: drlf.mode = "restart" if __name__ == "__main__": n = NorbertQuest() n.main() raw_input("Press [enter] to exit.")
And can someone help me with the Government Function (well Badge Function)? I don't know how to go at it. If you don't know what the government is, look the last thing I posted with a code in it, and if that doesn't explain it, ask me.
•
•
Join Date: May 2008
Posts: 538
Reputation:
Solved Threads: 86
Line 242 (line 2 in the fragment):
When depositing to the bank, we need to increase the bank balance and decrease the gold:
You have a similar problem in withdraw:
When withdrawing, we need to increase our money and decrease the bank balance:
python Syntax (Toggle Plain Text)
elif self.deposit <= self.money: self.bankbalance = self.money - self.deposit self.money = self.money - self.deposit print"Your new bank Balance is",self.bankbalance,"dollars. Thank you." self.mode = "restart"
When depositing to the bank, we need to increase the bank balance and decrease the gold:
python Syntax (Toggle Plain Text)
self.bankbalance = self.bankbalance + self.deposit self.money = self.money - self.deposit
You have a similar problem in withdraw:
python Syntax (Toggle Plain Text)
elif self.withdraw <= self.bankbalance: self.money = self.bankbalance - self.withdraw self.bankbalance = self.bankbalance - self.withdraw print"Your new bank Balance is",self.bankbalance,"dollars. Thank you." self.mode = "restart"
When withdrawing, we need to increase our money and decrease the bank balance:
python Syntax (Toggle Plain Text)
self.money = self.money + self.withdraw self.bankbalance = self.bankbalance - self.withdraw
Last edited by Murtan; Mar 7th, 2009 at 9:29 pm.
![]() |
Other Threads in the Python Forum
- Previous Thread: Ejecting trays of CDs
- Next Thread: Looping through and removing parts of a list
| Thread Tools | Search this Thread |
address aliased anydbm bash beginner bits calling casino changecolor class clear conversion convert corners count cturtle cursor curves definedlines dictionary digital dynamic dynamically events examples excel external file float format frange function gui handling hints homework i/o iframe import info input java line linux list lists loan loop matching mouse multiple number numbers output parsing path port prime programming projects py py2exe pygame python random rational raw_input recursion recursive scrolledtext searchingfile shebang signal singleton string strings subprocess table tails terminal text thread threading time tkinter tlapse tooltip tuple tutorial type ubuntu unicode urllib urllib2 valueerror variable web-scrape whileloop word wxpython





