added icon, files now open in UTF-8

This commit is contained in:
Zdenek Borovec 2019-09-02 12:36:18 +02:00
parent 1be75a0e63
commit 21b72f2fad
9 changed files with 193 additions and 8 deletions

11
.idea/Test-Me.iml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>

4
.idea/encodings.xml Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

4
.idea/misc.xml Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Test-Me.iml" filepath="$PROJECT_DIR$/.idea/Test-Me.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

151
.idea/workspace.xml Normal file
View file

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="51fbe63a-b9a4-4568-8b8d-3351f51944b9" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/tests/example angtest.tst" beforeDir="false" afterPath="$PROJECT_DIR$/tests/example angtest.tst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/vyzkousejme.pyw" beforeDir="false" afterPath="$PROJECT_DIR$/vyzkousejme.pyw" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/vyzkousejme.pyw">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="72" lean-forward="true" selection-start-line="72" selection-end-line="72" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/vyzkousejme.pyw" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-7" />
<option name="width" value="974" />
<option name="height" value="1047" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="Test-Me" type="b2602c69:ProjectViewProjectNode" />
<item name="Test-Me" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration name="vyzkousejme.pyw" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="Test-Me" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/vyzkousejme.pyw" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.vyzkousejme.pyw" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="51fbe63a-b9a4-4568-8b8d-3351f51944b9" name="Default Changelist" comment="" />
<created>1567420093914</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1567420093914</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-7" y="0" width="974" height="1047" extended-state="0" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.33653846" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Python Console" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32932165" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/vyzkousejme.pyw">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="72" lean-forward="true" selection-start-line="72" selection-end-line="72" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

BIN
programfiles/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,6 +1,6 @@
CESTINA/ANGLICTINA
0
jablko/apple
auto,automobil/car,automobile
vrtulnik,helikoptera/chopper,helicopter
hruska/pear
ČEŠTINA/ENGLISH
5
apple/jablko
car,automobile/auto,automobil
chopper,helicopter/vrtulník,helikoptéra
pear/hruška

View file

@ -16,7 +16,7 @@ def swapSides():
def saveTest():
print(test)
with open(filepath, mode='w') as file:
with open(filepath, mode='w', encoding = "UTF-8") as file:
file.write(test[0]+'/'+test[1])
file.write(str(test[4])+'\n')
for i in range(len(test[2])):
@ -62,7 +62,7 @@ def submitAnswer(uselessArgument):
def formatTest(filepath):
global score
with open(filepath) as file:
with open(filepath, encoding = "UTF-8") as file:
file = file.readlines()
nazev1 = file[0].split('/')[0]
@ -120,6 +120,7 @@ def makeRoot():
root.geometry('500x400')
root.title('Test Me')
root.configure(bg="gray")
root.iconbitmap('programfiles/icon.ico')
return root