Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
bones
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Franck Pommereau
2015-01-14 11:25:10 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a1b6164a1b92d081c031e3e8204dc9f1e1adf268
a1b6164a
1 parent
260a50f5
fixed tempfile issue on Windows
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
bones/gui/editor.py
bones/gui/editor.py
View file @
a1b6164
import
sys
,
os
,
os.path
import
sys
,
os
,
os.path
,
tempfile
import
gtk
,
pango
,
gobject
import
bones.asm
as
asm
import
bones.cpu
...
...
@@ -580,10 +580,9 @@ class CodeEditor (gtk.VBox) :
asm
.
save
(
_new_file
(
"Save BIOS as..."
))
self
.
_set_status
(
"BIOS saved"
,
1
)
elif
resp
==
gtk
.
RESPONSE_APPLY
:
name
=
os
.
tmpnam
()
tmp
=
open
(
name
,
"w"
)
tmp
.
write
(
asm
.
dump
())
tmp
.
close
()
fd
,
name
=
tempfile
.
mkstemp
()
with
os
.
fdopen
(
fd
,
"w"
)
as
tmp
:
tmp
.
write
(
asm
.
dump
())
bones
.
cmd
.
launch
(
"bones_machine.py"
,
"--tmpfile"
,
name
)
self
.
_clear_status
()
else
:
...
...
Please
register
or
login
to post a comment