Python my Class throws TypeError -


Here is my code

  import file input, exit system import class crazy8 ( Object) as import sys from the OS import system randomly: Question = raw_input ("Please do not enter any yes or any question \ n") DRF luck (auto, file X, current): current = R "./ "Fate = List (File Input. (File x)) System (" CD ", Present) Print Random. The keys (fate) Crazy 8 (0)  

When I run the program, I enter a question (I know that the program is ignored ). I think I did something wrong in class. I know that there is no class when it works fine: statement, but I need class there (after my work, I will use it as a module).

After the question, do me <

(I'm not adding any error checks yet I try and try to add / catch / file if the file exists ./crazy8 Also, I have a file that is automatically sys ("touch .crazy8") (on Mac / Linux) and, after the method of creating a file on Windows, I will add it. .

You need to create a class (similar thing) and require an example or an object.
x = crazy8 ()

x.fortuner (r, ". / Crazy8")

with lowercase your classes Normal practice is also considered to start with capital letters and examples.
class Crazy8
crazy8 = Crazy8 ()

Hope it helps


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -