Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> ================================ RESTART ================================
- >>>
- >>> inst1 = BaseClass()
- >>> prop1 = BaseClass.Properties()
- >>> util1 = BaseClass.Utilites()
- >>> prop1.FileHeader = 'testing text output'
- >>> prop1.FilePath = 'outfile.txt'
- >>> prop1.FileAccessMode = 'a+'
- >>> prop1.CharacterSelection = string.ascii_lowercase + string.digits
- >>> prop1.CharacterLength = 12
- >>> fileobj = inst1.Actions.OpenFile(prop1.FilePath, prop1.FileAccessMode)
- >>> inst1.Actions.HeadFile(fileobj, prop1.FileHeader)
- 118
- >>> inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterSelection, prop1.CharacterLength))
- Traceback (most recent call last):
- File "<pyshell#15>", line 1, in <module>
- inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterSelection, prop1.CharacterLength))
- TypeError: NameGen() takes 2 positional arguments but 3 were given
- >>> inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterLength))
- Traceback (most recent call last):
- File "<pyshell#13>", line 1, in <module>
- inst1.Actions.InsertFile(fileobj, util1.NameGen(prop1.CharacterLength))
- File "G:\prgrm\scribbles\wtf.py", line 22, in NameGen
- return ''.join(random.choice(Character_Selection) for i in range(Length))
- File "G:\prgrm\scribbles\wtf.py", line 22, in <genexpr>
- return ''.join(random.choice(Character_Selection) for i in range(Length))
- File "C:\Python34\lib\random.py", line 253, in choice
- i = self._randbelow(len(seq))
- TypeError: object of type 'Utilites' has no len()
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement