Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.4.
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
grew
python
Commits
1d44af41
Commit
1d44af41
authored
4 years ago
by
Bruno Guillaume
Browse files
Options
Downloads
Patches
Plain Diff
dev mode for grew.init
parent
0800fe64
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
grew/grew.py
+3
-3
3 additions, 3 deletions
grew/grew.py
grew/network.py
+3
-2
3 additions, 2 deletions
grew/network.py
with
6 additions
and
5 deletions
grew/grew.py
+
3
−
3
View file @
1d44af41
...
...
@@ -14,12 +14,12 @@ from grew import utils
'''
Library tools
'''
def
init
():
def
init
(
dev
=
False
):
"""
Initialize connection to GREW library
:return:
True if anything went right
:return:
the ouput of the subprocess.Popen command.
"""
return
network
.
init
()
return
network
.
init
(
dev
)
def
grs
(
data
):
"""
Load a grs stored in a file
...
...
This diff is collapsed.
Click to expand it.
grew/network.py
+
3
−
2
View file @
1d44af41
...
...
@@ -25,13 +25,14 @@ def pid_exist(pid):
except
:
return
0
def
init
():
def
init
(
dev
):
global
port
,
remote_ip
,
caml_pid
grewpy
=
"
grewpy_dev
"
if
dev
else
"
grewpy
"
if
not
pid_exist
(
caml_pid
):
python_pid
=
os
.
getpid
()
while
(
port
<
8898
):
caml
=
subprocess
.
Popen
(
[
"
grewpy
"
,
"
--caller
"
,
str
(
python_pid
),
"
--port
"
,
str
(
port
)],
[
grewpy
,
"
--caller
"
,
str
(
python_pid
),
"
--port
"
,
str
(
port
)],
preexec_fn
=
preexec_function
)
caml_pid
=
caml
.
pid
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment