Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
wanli
evm-store
Commits
46d0c3a5
Commit
46d0c3a5
authored
Jul 01, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
abb22f2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
backend/controller/api_manager.py
backend/controller/api_manager.py
+16
-15
No files found.
backend/controller/api_manager.py
View file @
46d0c3a5
'''
Author: your name
Date: 2021-04-14 14:12:18
LastEditTime: 2021-0
6-29 20:21:46
LastEditTime: 2021-0
7-01 11:39:27
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\b
ackend
\
controller
\a
pi_manager.py
...
...
@@ -17,6 +17,7 @@ from pony.orm import *
from
app.setting
import
config
from
model.user
import
User
from
utils
import
md5_salt
from
utils.ccode
import
convert_string
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -51,27 +52,27 @@ class ApiManager(object):
return
True
,
"success"
def
get_escape_text
(
self
,
data
):
fname
=
"./a.c"
target
=
os
.
sep
.
join
([
"out"
,
fname
])
#
fname = "./a.c"
#
target = os.sep.join(["out", fname])
if
os
.
path
.
exists
(
fname
):
os
.
remove
(
fname
)
#
if os.path.exists(fname):
#
os.remove(fname)
if
os
.
path
.
exists
(
target
):
os
.
remove
(
target
)
#
if os.path.exists(target):
#
os.remove(target)
with
open
(
fname
,
"w+"
)
as
f
:
f
.
write
(
data
[
'string'
])
#
with open(fname, "w+") as f:
#
f.write(data['string'])
result
=
os
.
system
(
"./opqcp {i} ./out"
.
format
(
i
=
fname
))
print
(
result
)
#
result = os.system("./opqcp {i} ./out".format(i=fname))
#
print(result)
with
open
(
target
)
as
f
:
result
=
f
.
read
()
#
with open(target) as f:
#
result = f.read()
return
result
#
return result
#
return convert_string(data['string'])
return
convert_string
(
data
[
'string'
])
def
opqcp
(
self
,
params
):
target_file
=
os
.
path
.
normpath
(
os
.
sep
.
join
([
config
.
get
(
"UPLOAD_PATH"
),
params
.
get
(
"filename"
)]))
...
...
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