Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63792094
jobselector.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 22, 12:32
Size
861 B
Mime Type
text/x-python
Expires
Fri, May 24, 12:32 (2 d)
Engine
blob
Format
Raw Data
Handle
17819882
Attached To
R3127 blackdynamite
jobselector.py
View Options
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- py-which-shell: "python"; -*-
################################################################
from
.
import
selector
from
.
import
job
################################################################
class
JobSelector
(
selector
.
Selector
):
"""
"""
def
selectJobs
(
self
,
constraints
=
None
,
sort_by
=
None
,
quiet
=
False
):
job_list
=
self
.
select
(
job
.
Job
,
constraints
=
constraints
,
sort_by
=
sort_by
)
if
quiet
is
False
:
if
not
job_list
:
print
(
"no jobs found"
)
print
(
"Selected jobs are: "
+
str
([
j
.
id
for
j
in
job_list
]))
return
job_list
def
__init__
(
self
,
base
):
selector
.
Selector
.
__init__
(
self
,
base
)
################################################################
__all__
=
[
"JobSelector"
]
Event Timeline
Log In to Comment