Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.51 KB | None | 0 0
  1. >>> ================================ RESTART ================================
  2. >>>
  3. >>> inst1 = BaseClass()
  4. >>> prop1 = BaseClass.Properties()
  5. >>> util1 = BaseClass.Utilites()
  6. >>> prop1.FileHeader = 'testing text output'
  7. >>> prop1.FilePath = 'outfile.txt'
  8. >>> prop1.FileAccessMode = 'a+'
  9. >>> prop1.CharacterSelection = string.ascii_lowercase + string.digits
  10. >>> prop1.CharacterLength = 12
  11. >>> fileobj = inst1.Actions.OpenFile(prop1.FilePath, prop1.FileAccessMode)
  12. >>> inst1.Actions.HeadFile(fileobj, prop1.FileHeader)
  13. 118
  14. >>> inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterSelection, prop1.CharacterLength))
  15. Traceback (most recent call last):
  16.   File "<pyshell#15>", line 1, in <module>
  17.     inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterSelection, prop1.CharacterLength))
  18. TypeError: NameGen() takes 2 positional arguments but 3 were given
  19. >>> inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterLength))
  20. Traceback (most recent call last):
  21.   File "<pyshell#13>", line 1, in <module>
  22.     inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterLength))
  23.   File "G:\prgrm\scribbles\wtf.py", line 22, in NameGen
  24.     return ''.join(random.choice(Character_Selection) for i in range(Length))
  25.   File "G:\prgrm\scribbles\wtf.py", line 22, in <genexpr>
  26.     return ''.join(random.choice(Character_Selection) for i in range(Length))
  27.   File "C:\Python34\lib\random.py", line 253, in choice
  28.     i = self._randbelow(len(seq))
  29. TypeError: object of type 'Utilites' has no len()
  30.  
  31. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement