Here's a few things I tried to write output to a python subprocess pipe.
from subprocess import Popen, PIPE
p = Popen('less', stdin=PIPE)
for x in xrange(100):
p.communicate('Line number %d.\n' % x)| # .zshrc file written by Matthew Blissett. | |
| # | |
| # Latest version available from http://matt.blissett.me.uk/linux/zsh/zshrc | |
| # | |
| # Some functions taken from various web sites/mailing lists, others written | |
| # myself. | |
| # | |
| # Last updated 2014-04-16 | |
| # Released into the public domain. | |
| # |
Here's a few things I tried to write output to a python subprocess pipe.
from subprocess import Popen, PIPE
p = Popen('less', stdin=PIPE)
for x in xrange(100):
p.communicate('Line number %d.\n' % x)| @charset UTF-8; | |
| /*!normalize.css v2.0.1 | MIT License | git.io/normalize */ | |
| article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary { | |
| display:block; | |
| } | |
| audio,canvas,video { | |
| display:inline-block; | |
| } |
| # https://hostianer.de/shopware-hosting-mit-nginx/ | |
| client_max_body_size 100M; | |
| location ~ /(engine|images/[a-z]+|files|templates)/ { | |
| } | |
| location / { | |
| index index.html index.php shopware.php; | |
| rewrite shopware.dll /shopware.php; | |
| rewrite files/documents/.* /engine last; | |
| rewrite images/ayww/(.*) /images/banner/$1 last; |
| #!/bin/sh | |
| # recursively removes all .pyc files and __pycache__ directories in the current | |
| # directory | |
| find . | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf |
| def context(conf, retry = None, fake_error = None): | |
| """ | |
| Examples: | |
| - Do not fail unless the third try goes also wrong: retries = 3 | |
| - wait delay_ms between eacht try | |
| - Succeed on the 3rd try: fails=2 | |
| retry = dict(retries=2, delay_ms=1) | |
| fake_error = dict(fails=3) | |
| ctx = swapi.context(conf) |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| REM Save to "C:\Users\WINDOWS_USERNAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" | |
| REM Filename: "Verbinde Laufwerk K.cmd" | |
| net use k: /delete /y | |
| net use k: \\192.168.1.214\starmoney10 /persistent:no |