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
7b198aba
Commit
7b198aba
authored
Mar 25, 2012
by
Luke Macken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a PyrasiteIPC.title property, taken from the GUI
parent
fb2667f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
pyrasite/ipc.py
pyrasite/ipc.py
+11
-1
No files found.
pyrasite/ipc.py
View file @
7b198aba
...
@@ -23,10 +23,12 @@ import os
...
@@ -23,10 +23,12 @@ import os
import
socket
import
socket
import
struct
import
struct
import
tempfile
import
tempfile
import
pyrasite
import
subprocess
from
os.path
import
dirname
,
abspath
,
join
from
os.path
import
dirname
,
abspath
,
join
import
pyrasite
class
PyrasiteIPC
(
object
):
class
PyrasiteIPC
(
object
):
"""Pyrasite Inter-Python Communication.
"""Pyrasite Inter-Python Communication.
...
@@ -67,6 +69,14 @@ class PyrasiteIPC(object):
...
@@ -67,6 +69,14 @@ class PyrasiteIPC(object):
self
.
hostname
=
None
self
.
hostname
=
None
self
.
port
=
None
self
.
port
=
None
@
property
def
title
(
self
):
if
not
getattr
(
self
,
'_title'
,
None
):
p
=
subprocess
.
Popen
(
'ps --no-heading -o cmd= -p %d'
%
self
.
pid
,
stdout
=
subprocess
.
PIPE
,
shell
=
True
)
self
.
_title
=
p
.
communicate
()[
0
].
decode
(
'utf-8'
)
return
self
.
_title
.
strip
()
def
connect
(
self
):
def
connect
(
self
):
"""
"""
Setup a communication socket with the process by injecting
Setup a communication socket with the process by injecting
...
...
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