Skip to content

Instantly share code, notes, and snippets.

@ericdill
ericdill / gist:9875d22c2a83806b0010
Created April 15, 2015 17:44
button_menu.enaml
#------------------------------------------------------------------------------
# Copyright (c) 2013, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------------------------------------------------------------------------------
""" An example of using the `Menu` widget as a context menu.
<< autodoc-me >>
All the hooks!
--------------
Non-blocking callbacks
======================
- Scan start
- RunStart Document created
- EventDescriptor document created
- Event Document created
- RunStop Document created
class Bar(object):
def foo(self):
# do something
print("Hey, this is the foo method")
self.foo = False # then do something really dumb like overwrite it
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
s()edill@edill-810g:~$ sudo apt-get install emacs
[sudo] password for edill:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg libm17n-0
libotf0 m17n-db
Suggested packages:
emacs24-el m17n-docs gawk
(hkl)edill@edill-810g:~/Dropbox/dev/python$ conda list
# packages in environment at /home/edill/anaconda/envs/hkl:
#
binstar 0.10.3 py27_0
cairo 1.12.18 3
cairo-gobject 1.12.18 2
clyent 0.3.4 py27_0
epics-base 3.14.12.3_10 2
fontconfig 2.11.1 3
freetype 2.5.2 1
2030 conda create -n epics ophyd pyepics
2031 sa epics
2032 python hkl_test.py
(epics)edill@edill-810g:~/dev/python/ophyd/examples (hkl *% u+3)$ python hkl_test.py
/home/edill/anaconda/envs/epics/lib/python2.7/site-packages/pytz/__init__.py:29: UserWarning: Module bson was already imported from /home/edill/anaconda/envs/epics/lib/python2.7/site-packages/bson/__init__.pyc, but /home/edill/anaconda/envs/epics/lib/python2.7/site-packages/mongoengine-0.8.7-py2.7.egg is being added to sys.path
from pkg_resources import resource_stream
libasIoc.so.3.14: cannot open shared object file: No such file or directory
2015-05-13 14:16:44,862 [ophyd_session:WARNING] Instantiating SessionManager outside of IPython
Traceback (most recent call last):
@ericdill
ericdill / gist:628a23ec14b94262b54b
Created May 13, 2015 21:54
`python manual_mask.py` in xray-vision
after pressing 'l' and hovering over the image...
```
Traceback (most recent call last):
File "/home/eric/anaconda/envs/nikea3/lib/python3.4/site-packages/matplotlib/backends/backend_qt5.py", line 282, in mouseMoveEvent
FigureCanvasBase.motion_notify_event(self, x, y)
File "/home/eric/anaconda/envs/nikea3/lib/python3.4/site-packages/matplotlib/backend_bases.py", line 1935, in motion_notify_event
guiEvent=guiEvent)
File "/home/eric/anaconda/envs/nikea3/lib/python3.4/site-packages/matplotlib/backend_bases.py", line 1527, in __init__
LocationEvent.__init__(self, name, canvas, x, y, guiEvent=guiEvent)
File "/home/eric/anaconda/envs/nikea3/lib/python3.4/site-packages/matplotlib/backend_bases.py", line 1444, in __init__
===== testing package: metadatastore-v0.0.5-py27_0 =====
import: u'metadatastore'
Traceback (most recent call last):
File "/home/eric/anaconda/conda-bld/test-tmp_dir/run_test.py", line 25, in <module>
import metadatastore
File "build/bdist.linux-x86_64/egg/metadatastore/__init__.py", line 1, in <module>
File "build/bdist.linux-x86_64/egg/metadatastore/conf.py", line 62, in <module>
File "build/bdist.linux-x86_64/egg/metadatastore/conf.py", line 58, in load_configuration
KeyError: "The configuration field(s) ['timezone', 'host', 'port', 'database'] were not found in any file or environmental variable."
TESTS FAILED: metadatastore-v0.0.5-py27_0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.