Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~15.2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for bobstein

OK, so when I use open(<filename>, 'w') the program either writes to the specified file or creates a new one if it doesn't exist, right? Is there a way to create a folder path or something? Like to create D:\My Documents\Folder and create a file in that folder? How would …

Member Avatar for TrustyTony
0
15K
Member Avatar for bobstein

I'm writing part of a program that involves writing user generated information to a text file. [code]class MonsterStats: def __init__(self, name): self.__monName = name def setName(self, name): self.__monName = name def fileWrite(self): monFile = open('MonsterFile.txt', 'w') monFile.write(self.__monName) monFile.close() [/code] I wrote this to test it out: [code]import MonsterClass name = …

Member Avatar for jlm699
0
107