from Flask as flask
get trans(key):
redis_store = flask.g.redis
return redis_store.get('en_transcr:' + key)
from flask import current_app
каждый запрос к странице производит прямой запрос к устройству на порту
gulp.task('wiredep', function () {
var wiredep = require('wiredep').stream;
gulp.src('./client/index.html')
.pipe(wiredep({
}))
.pipe(gulp.dest('./client'));
});
"scripts": {
"postinstall": "gulp wiredep"
}
"как видеть(получить адреса) именно тех lpt портов, к которым подключены какие-либо устройства."
The lp(4) module must be unloaded, rmmod lp. lp claims exclusive access to the port and other programs won’t be able to use it.
The ppdev(4) module needs to be loaded, modprobe ppdev. When udev is in use, (default with 2.6 kernels) this will create a /dev/parport0.
The user needs to have write permissions to /dev/parport0. Many distributions have an lp group that owns the device; the simplest is to add the user account to this group. Simply changing permissions on the device is not the best strategy as they will be reverted to their defaults next time the driver is loaded.
>>> def foo(**kwargs):
kwargs['id'] = 1
print 'Internal: %s' % kwargs['id']
>>> d = {'id': 0}
>>> foo(**d)
Internal: 1
>>> d
{'id': 0}
>>> def foo(**kwargs):
kwargs['id'][:] = [4, 5, 6]
print 'Internal: %s' % kwargs['id']
>>> d = {'id': [1, 2, 3]}
>>> foo(**d)
Internal: [4, 5, 6]
>>> d
{'id': [4, 5, 6]}