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)| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |
| .DS_Store | |
| *.log | |
| tmp/ |
| var sys = require('sys'), | |
| spawn = require('child_process').spawn, | |
| // args from command line | |
| filename, servers; | |
| if (process.ARGV.length < 4) { | |
| return sys.puts("Usage: node remote-tail.js filename server1 [serverN]"); | |
| } |
| # coding: utf-8 | |
| require 'sinatra' | |
| set server: 'thin', connections: [] | |
| get '/' do | |
| halt erb(:login) unless params[:user] | |
| erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
| end | |
| get '/stream', provides: 'text/event-stream' do |
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)| # -*- coding: utf-8 -*- | |
| class Shell < BasicObject | |
| def initialize(name, *args, &block) | |
| _push(name, *args) | |
| end | |
| attr_accessor :_result | |
| attr_writer :_queue | |
| def to_s |
| ; The stack pointer is going to be an index into the stack, and the | |
| ; stack is an array of words. The alternative would be to have the | |
| ; stack pointer me a pointer to memory, but this is perhaps a bit | |
| ; nicer, as where the stack actually lives is totally irrelevant. | |
| @stack = global [1000 x i64] undef | |
| @sp = global i64 undef; | |
| ; Now we have the basic stack operations: push, pop, and peek. As can | |
| ; be seen from the definitions, LLVM is typed, which is really nice as |
| var net = require('net'), | |
| hpack = require('./hpack'); | |
| var FRAME_HEADER_LEN = 9; | |
| function createSettingsFrame(ack) { | |
| var flag = ack ? 0x1 : 0x0; | |
| var frameHeader = new Buffer(FRAME_HEADER_LEN); | |
| frameHeader.writeUInt32BE(0x0, 0); |
| $ git remote rm origin | |
| $ git remote add origin [email protected]:aplikacjainfo/proj1.git | |
| $ git config master.remote origin | |
| $ git config master.merge refs/heads/master |