Issue: There’s an AssertionError when I try to test mutliprocessing features using lettuce 0.2.22 / nosetests and python 2.7.10 error details:
multiprocessing\forking.py AssertionError: main File "", line 1, in File "C:\Python27\Lib\multiprocessing\forking.py", line 380, in main prepare(preparation_data) File "C:\Python27\Lib\multiprocessing\forking.py", line 488, in prepare assert main_name not in sys.modules, main_name AssertionError: __main__
upgrade to python 2.7.11 becuase this is a fixed bug: https://bugs.python.org/issue10128; or
use a wrapper (.py file name should be not in sys.modules, main_name):
# run_at.py: __requires__ = 'lettuce==0.2.20' import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('lettuce==0.2.20', 'console_scripts', 'lettuce')() )
http://guoliang-dev.github.io/rabbit-backup/
rabbit-backup uses dropbox api to upload local file to dropbox.com; // that’s why we need a dropbox access token.
Features:
Usage:
rabbit-youtube.py -u ChromeDevelopers /tmp/test/
for more details: http://guoliang-dev.github.io/rabbit-youtube/
requirement:
code:
create a Dockerfile
this image will install python and start a SimpleHTTPServer:
FROM ubuntu ENV DEBIAN_FRONTEND noninteractive CMD ["bash"] RUN apt-get update RUN apt-get install -y python EXPOSE 8000 CMD python -m SimpleHTTPServer 8000
Build project
docker build -t myapp:latest .
run docker image
docker run -P myapp
-P for port forwarding: Publish all exposed ports to random ports
check the web page
find port by:
docker ps -l
This project can be found here:
https://github.com/guoliang-dev/docker-hello-world-python
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.