cleaning a python

  • We are currently upgrading MFK. thanks! -neo

fishnoob

Feeder Fish
MFK Member
May 21, 2004
701
0
0
37
Martin,TN
My python is pretty dirty, throughout the hose and what not. It is starting to stink. Should I just run bleach through it then run clean water through it? Or what?
 
If you have a 25 footer take 60 feet of heavy twine and tie a small rag dead in the middle. Take as large of a fishing weight as will easily pass through the hose and tie it to one end. Feed the weight through the hose and pull the rag through, take the other end of the string and pull it back the other way. Repeat until clean. You can rinse the rag with the string still in the hose.
If it is a 50 footer just use 110 feet of the twine.
 
You really opened my eyes on this one. You introduced a whole lot of new commands and ways of doing things! Though I still don't fully understand the _name_ = _main_ thing, well, as a matter of fact, I don't u nderstand it at all. I just take it cause you said so and I suspect that later I will understand this line. I do though understand most everything else and will be looking to incorperate that into my learning and future programs. There is one thing though.
The def _init_ function...Could you have said "def init" or does it have to be "_init_" and if so...why? Ok, there are two things really. The second one is about encapsulating the test in a "class". What is that all about? Anyway, I hate to seem simple, but I really want to understand this so I can write my calendar and from there, other sites and programs... thanks a bunch as always!

: Here's my first attempt at cleaning up your code. I went ahead and made a class to try to encapsulate the Test functionality as much as possible. I also left the __init__ method ready to read questions from a file. Note that True and False are already defined in Python (make sure you capitalize them properly, though).
:
: I felt that having a test object hold it's own questions and answers made more sense than having global lists or trying to pass lists around so much. And using the append() method of lists will make reading from a file much easier. The lists will grow as long as there are questions to read from the file. A simple loop should do it. Notice how easy it is to print the questions and answers if you keep them in separate lists. My other idea was to use a Dictionary object where the questions are the keys and the answers the values. But that might prove difficult because Dictionaries are not ordered.
:
: I also did the __name__ == '__main__' trick here so that you could import the TestOfKnowledge class into another program if you ever wanted to without having code execute that is only relevant to this particular instance of the test. Let me know if you don't understand something I did.
__________________________________________________________________
sports nutrition
fundraiser ideas
 
whaaaaaa ????????? :screwy::screwy::screwy::screwy::screwy:

Running bleach through it should work just fine. Every time im done using my python I turn the water on hot and let it run through the hose for 5 minutes I use it a lot and I never have any build up.
 
Emmanuel;3131472; said:
You really opened my eyes on this one. You introduced a whole lot of new commands and ways of doing things! Though I still don't fully understand the _name_ = _main_ thing, well, as a matter of fact, I don't u nderstand it at all. I just take it cause you said so and I suspect that later I will understand this line. I do though understand most everything else and will be looking to incorperate that into my learning and future programs. There is one thing though.
The def _init_ function...Could you have said "def init" or does it have to be "_init_" and if so...why? Ok, there are two things really. The second one is about encapsulating the test in a "class". What is that all about? Anyway, I hate to seem simple, but I really want to understand this so I can write my calendar and from there, other sites and programs... thanks a bunch as always!

: Here's my first attempt at cleaning up your code. I went ahead and made a class to try to encapsulate the Test functionality as much as possible. I also left the __init__ method ready to read questions from a file. Note that True and False are already defined in Python (make sure you capitalize them properly, though).
:
: I felt that having a test object hold it's own questions and answers made more sense than having global lists or trying to pass lists around so much. And using the append() method of lists will make reading from a file much easier. The lists will grow as long as there are questions to read from the file. A simple loop should do it. Notice how easy it is to print the questions and answers if you keep them in separate lists. My other idea was to use a Dictionary object where the questions are the keys and the answers the values. But that might prove difficult because Dictionaries are not ordered.
:
: I also did the __name__ == '__main__' trick here so that you could import the TestOfKnowledge class into another program if you ever wanted to without having code execute that is only relevant to this particular instance of the test. Let me know if you don't understand something I did.
__________________________________________________________________
sports nutrition
fundraiser ideas
im lost:irked:
 
turn the water on hot and let it run through the hose for 5 minutes
:WHOA:
Does Arnold S. know about this:)
or did you mean a few seconds.
 
MonsterFishKeepers.com