Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
python-handel
Commits
e2e754cf
Commit
e2e754cf
authored
Sep 08, 2017
by
Vincent Michel
Browse files
Fix the file API
parent
825b9881
Pipeline
#944
passed with stages
in 1 minute and 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
handel/interface.py
View file @
e2e754cf
...
...
@@ -46,8 +46,8 @@ def to_buffer_id(bid):
# Initializing handel
def
init
(
filename
):
filename
=
to_bytes
(
filename
)
def
init
(
*
path
):
filename
=
to_bytes
(
os
.
path
.
join
(
*
path
)
)
code
=
handel
.
xiaInit
(
filename
)
check_error
(
code
)
...
...
@@ -172,14 +172,14 @@ def buffer_done(channel, buffer_id):
# System
def
load_system
(
filename
):
filename
=
to_bytes
(
filename
)
def
load_system
(
*
path
):
filename
=
to_bytes
(
os
.
path
.
join
(
*
path
)
)
code
=
handel
.
xiaLoadSystem
(
b
'handel_ini'
,
filename
)
check_error
(
code
)
def
save_system
(
filename
):
filename
=
to_bytes
(
filename
)
def
save_system
(
*
path
):
filename
=
to_bytes
(
os
.
path
.
join
(
*
path
)
)
code
=
handel
.
xiaSaveSystem
(
b
'handel_ini'
,
filename
)
check_error
(
code
)
...
...
@@ -409,7 +409,8 @@ def get_handel_version():
def
get_config_files
(
path
):
"""Return all the ini files in path (including subdirectories)."""
ext
=
b
'.ini'
if
isinstance
(
path
,
bytes
)
else
'.ini'
return
[
os
.
path
.
join
(
dp
,
f
).
lstrip
(
path
).
lstrip
(
'/'
)
sep
=
b
'/'
if
isinstance
(
path
,
bytes
)
else
'/'
return
[
os
.
path
.
join
(
dp
,
f
).
lstrip
(
path
).
lstrip
(
sep
)
for
dp
,
dn
,
fn
in
os
.
walk
(
path
)
for
f
in
fn
if
f
.
endswith
(
ext
)]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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