функции для сохранения, изменения и создания файлов для бота
This commit is contained in:
1 parent
edf0be7b4c
commit
f25d30cb25
2 files changed
+48
-13
No files matched your search
Generated
+30
-13
@@ -4,7 +4,10 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="aaf4cea1-996f-4616-a7e8-5aebcf6aea3e" name="Changes" comment="test" />
|
<list default="true" id="aaf4cea1-996f-4616-a7e8-5aebcf6aea3e" name="Changes" comment="функции для сохранения, изменения и создания файлов для бота">
|
||||||
|
<change afterPath="$PROJECT_DIR$/pyLessons/filemanager.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
@@ -33,21 +36,25 @@
|
|||||||
"associatedIndex": 6
|
"associatedIndex": 6
|
||||||
}</component>
|
}</component>
|
||||||
<component name="ProjectId" id="3BhbFCTFV4R0VVKYpM8sZkvMBml" />
|
<component name="ProjectId" id="3BhbFCTFV4R0VVKYpM8sZkvMBml" />
|
||||||
|
<component name="ProjectLevelVcsManager">
|
||||||
|
<ConfirmationsSetting value="2" id="Add" />
|
||||||
|
</component>
|
||||||
<component name="ProjectViewState">
|
<component name="ProjectViewState">
|
||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"git-widget-placeholder": "main",
|
"git-widget-placeholder": "main",
|
||||||
"last_opened_file_path": "C:/Users/Dream/python",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
|
"last_opened_file_path": "C:/Users/Dream/python",
|
||||||
|
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="SharedIndexes">
|
<component name="SharedIndexes">
|
||||||
<attachedChunks>
|
<attachedChunks>
|
||||||
<set>
|
<set>
|
||||||
@@ -103,7 +110,15 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1774946246052</updated>
|
<updated>1774946246052</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="6" />
|
<task id="LOCAL-00006" summary="test2">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1775069680989</created>
|
||||||
|
<option name="number" value="00006" />
|
||||||
|
<option name="presentableId" value="LOCAL-00006" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1775069680989</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="7" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="UpdateCopyrightCheckinHandler">
|
<component name="UpdateCopyrightCheckinHandler">
|
||||||
@@ -114,7 +129,9 @@
|
|||||||
<option name="CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT" value="true" />
|
<option name="CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT" value="true" />
|
||||||
<MESSAGE value="исправленные import-ы" />
|
<MESSAGE value="исправленные import-ы" />
|
||||||
<MESSAGE value="test" />
|
<MESSAGE value="test" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="test" />
|
<MESSAGE value="test2" />
|
||||||
|
<MESSAGE value="функции для сохранения, изменения и создания файлов для бота" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="функции для сохранения, изменения и создания файлов для бота" />
|
||||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
|
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
|
||||||
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
|
||||||
<option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
|
<option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
def save_to_file(name, data):
|
||||||
|
# начало
|
||||||
|
with open(name, "w", encoding="utf-8") as file:
|
||||||
|
file.write(data)
|
||||||
|
|
||||||
|
|
||||||
|
# конец
|
||||||
|
|
||||||
|
def load_from_file(name):
|
||||||
|
data = ""
|
||||||
|
with open(name, "r", encoding="utf-8") as file:
|
||||||
|
data = file.read()
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
def create_file(name):
|
||||||
|
with open(name, "x", encoding="utf-8") as file:
|
||||||
|
file.write("")
|
||||||
Reference in new issue
Block a user