Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pycomsdk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
com
pycomsdk
Commits
d0b0782f
Commit
d0b0782f
authored
5 years ago
by
Vlad Golubev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Закрытие дескрипторов файлов типа aDOT и cpp
parent
24680000
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
parser.py
comsdk/parser.py
+2
-1
No files found.
comsdk/parser.py
View file @
d0b0782f
...
@@ -289,7 +289,7 @@ class Parser():
...
@@ -289,7 +289,7 @@ class Parser():
def
parse_file
(
self
,
filename
):
def
parse_file
(
self
,
filename
):
# @todo В случае, если на вход будет подан файл в отличной от UTF-8 кодировке программа работать не будет
# @todo В случае, если на вход будет подан файл в отличной от UTF-8 кодировке программа работать не будет
gcd_dir_rel_path
=
os
.
path
.
abspath
(
'../../gcd/'
)
gcd_dir_rel_path
=
os
.
path
.
abspath
(
'../../gcd/'
)
file
=
open
(
gcd_dir_rel_path
+
'/'
+
filename
,
encoding
=
'utf-8'
)
# "r")
with
open
(
gcd_dir_rel_path
+
'/'
+
filename
,
encoding
=
'utf-8'
)
as
file
:
dot
=
file
.
read
()
dot
=
file
.
read
()
self
.
_check_brackets
(
dot
)
self
.
_check_brackets
(
dot
)
...
@@ -344,6 +344,7 @@ class Parser():
...
@@ -344,6 +344,7 @@ class Parser():
print
(
Template
(
filename
=
os
.
path
.
abspath
(
"../pycomsdk/cpp/template.cpp"
))
.
render
(
preds
=
preds
,
morphs
=
morphs
,
print
(
Template
(
filename
=
os
.
path
.
abspath
(
"../pycomsdk/cpp/template.cpp"
))
.
render
(
preds
=
preds
,
morphs
=
morphs
,
sels
=
sels
,
states
=
st
,
sels
=
sels
,
states
=
st
,
body
=
body
),
file
=
f
)
body
=
body
),
file
=
f
)
f
.
close
()
return
f
return
f
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment