Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyrasite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
pyrasite
Commits
d7536560
Commit
d7536560
authored
Mar 13, 2012
by
Nathaniel Case
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use open() instead of file()
parent
538e6025
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
pyrasite/ipc.py
pyrasite/ipc.py
+1
-1
pyrasite/tools/gui.py
pyrasite/tools/gui.py
+3
-3
No files found.
pyrasite/ipc.py
View file @
d7536560
...
@@ -100,7 +100,7 @@ class PyrasiteIPC(object):
...
@@ -100,7 +100,7 @@ class PyrasiteIPC(object):
(
fd
,
filename
)
=
tempfile
.
mkstemp
()
(
fd
,
filename
)
=
tempfile
.
mkstemp
()
tmp
=
os
.
fdopen
(
fd
,
'w'
)
tmp
=
os
.
fdopen
(
fd
,
'w'
)
path
=
dirname
(
abspath
(
join
(
pyrasite
.
__file__
,
'..'
)))
path
=
dirname
(
abspath
(
join
(
pyrasite
.
__file__
,
'..'
)))
payload
=
file
(
join
(
path
,
'pyrasite'
,
'reverse.py'
))
payload
=
open
(
join
(
path
,
'pyrasite'
,
'reverse.py'
))
tmp
.
write
(
'import sys; sys.path.insert(0, "%s")
\
n
'
%
path
)
tmp
.
write
(
'import sys; sys.path.insert(0, "%s")
\
n
'
%
path
)
for
line
in
payload
.
readlines
():
for
line
in
payload
.
readlines
():
...
...
pyrasite/tools/gui.py
View file @
d7536560
...
@@ -450,10 +450,10 @@ class PyrasiteWindow(Gtk.Window):
...
@@ -450,10 +450,10 @@ class PyrasiteWindow(Gtk.Window):
def
inject_js
(
self
):
def
inject_js
(
self
):
log
.
debug
(
"Injecting jQuery"
)
log
.
debug
(
"Injecting jQuery"
)
js
=
join
(
dirname
(
abspath
(
__file__
)),
'js'
)
js
=
join
(
dirname
(
abspath
(
__file__
)),
'js'
)
jquery
=
file
(
join
(
js
,
'jquery-1.7.1.min.js'
))
jquery
=
open
(
join
(
js
,
'jquery-1.7.1.min.js'
))
self
.
info_view
.
execute_script
(
jquery
.
read
())
self
.
info_view
.
execute_script
(
jquery
.
read
())
jquery
.
close
()
jquery
.
close
()
sparkline
=
file
(
join
(
js
,
'jquery.sparkline.min.js'
))
sparkline
=
open
(
join
(
js
,
'jquery.sparkline.min.js'
))
self
.
info_view
.
execute_script
(
sparkline
.
read
())
self
.
info_view
.
execute_script
(
sparkline
.
read
())
sparkline
.
close
()
sparkline
.
close
()
...
@@ -638,7 +638,7 @@ class PyrasiteWindow(Gtk.Window):
...
@@ -638,7 +638,7 @@ class PyrasiteWindow(Gtk.Window):
payloads
=
os
.
path
.
join
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
payloads
=
os
.
path
.
join
(
os
.
path
.
abspath
(
os
.
path
.
dirname
(
pyrasite
.
__file__
)),
'payloads'
)
pyrasite
.
__file__
)),
'payloads'
)
dump_stacks
=
os
.
path
.
join
(
payloads
,
'dump_stacks.py'
)
dump_stacks
=
os
.
path
.
join
(
payloads
,
'dump_stacks.py'
)
code
=
proc
.
cmd
(
file
(
dump_stacks
).
read
())
code
=
proc
.
cmd
(
open
(
dump_stacks
).
read
())
self
.
update_progress
(
0.6
)
self
.
update_progress
(
0.6
)
self
.
source_buffer
.
set_text
(
''
)
self
.
source_buffer
.
set_text
(
''
)
...
...
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