Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ArchiveExtractor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
ArchiveExtractor
Commits
73d66b2b
Commit
73d66b2b
authored
3 years ago
by
System User
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit of environment
parent
8f5a872f
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
OpUtils.py
+36
-0
36 additions, 0 deletions
OpUtils.py
pyprompt.ipy
+17
-0
17 additions, 0 deletions
pyprompt.ipy
with
53 additions
and
0 deletions
OpUtils.py
0 → 100644
+
36
−
0
View file @
73d66b2b
# Module OpUtils
# Usefull function for operation
###############################################################################
# FUNCTIONS ON DEVICE PROXY
###############################################################################
def
searchattr
(
prx
,
attr
,
ignorecase
=
True
):
"""
Search in a tango device proxy for an attribute name.
PARAMETERS
----------
prx: tango.DeviceProxy
Proxy to the device.
attr: string
String to search for.
ignorecase: bool
Case insensitive.
"""
if
ignorecase
:
return
[
a
for
a
in
prx
.
get_attribute_list
()
if
attr
.
lower
()
in
a
.
lower
()]
else
:
return
[
a
for
a
in
prx
.
get_attribute_list
()
if
attr
in
a
]
###############################################################################
# FUNCTIONS ON TANGO DATABASE
###############################################################################
###############################################################################
# FUNCTIONS ON ARCHIVER
###############################################################################
This diff is collapsed.
Click to expand it.
pyprompt.ipy
0 → 100644
+
17
−
0
View file @
73d66b2b
# IPython prompt initialization for operation
# Turn automagic on
# This gives the possibility to use magic command without '%'.
# i.e. cd, pwd, ...
%automagic on
# Import usefull packages
import PyTango as tango
import numpy as np
import OpUtils as OU
print("Imported: tango, np, OU")
# Create a database object
DB = tango.Database()
print("Object DB created: tango database")
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