text
stringlengths
226
34.5k
In Python is there a history of the function that i ran? Question: After writing for a long time tons of stuff i've deleted a certain function... CTRL + y couldn't save me. basically i had: def foo(todo): print 'how why where' in a .py file, i have deleted function and its is not traceable ...
python csv writer is adding quotes when not needed Question: I am having issues with writing json objects to a file using csv writer, the json objects seem to have multiple double quotes around them thus causing the json objects to become invalid, here is the result: "{""user.CustomAttribute.ISOLanguageC...
What is the most appropriate way to pass objects between modules in python? Question: I have to access an object in a module from another module: module_1.py: import module_2 class A(): def __init__(): do_sth() class B(): def __init__(): do_sth...
Python: Trying to shift data in CSV but not seeing desired results Question: I'm having trouble with a relatively simple problem.. I have some data like so in CSV: period, reading 1, 3 2, 4 3, 5 4, 2 5, 2 I simply want the second column to shift up by one, while the first column...
Recovering memory scipy interpolation Question: I am using scipy's LinearNDInterpolator from the interpolate module, and I'm losing memory somewhere. It would be great if someone could tell me how to recover it. I'm doing something like the following (where I've tracked memory usage on the side): import ...
Python parsing set-cookie header Question: In PHP I send one cookie with secure and http only flags, and other without setcookie("c2","value"); setcookie("c1","value", 0, "/", "", true, true); It produces header Set-Cookie: c2=value, c1=value; path=/; secure; httponly In fi...
Console column output in python3 Question: I am trying to create to create a column output for a few lists that differ in lengths, e.g: list1 = ['hello', 'hello', 'hello', 'hello', 'hello', 'goodbye'] list2 = ['hello', 'hello', 'hello'] list3 = ['hello', 'hello', 'hello', 'hello'] desired o...
Failed testing on Ubuntu 12.04 Question: After installing the scikit-learn from source code of version 0.14.1 by 'sodu python setup.py install', I tested the package by 'nosetests sklearn --exe', and received the following information: =====================================================================...
Pillow keeps throwing cannot identify image file on Window in Python2.7.6 Question: I'm using Python2.7.6 and Pillow 2.3.0 on 32 bits Windows. And I do **not** have PIL installed on my machine. My problem is when I do following I get _"cannot identify image file"_ error. >>> from PIL import Image >>...
Using id (Primary Key) of a Model as ForeignKey when creating new model instances in Django through shell Question: For illustration purposes, just two plain models: class PrimaryModel(models.Model): foo = models.CharField(max_length=50, unique=True) class SecondaryModel(models.Model): ...
Multiple Instantiation of Programs interacting with one another (Python2.7 & Tkinter) Question: I currently have a restaurant simulation program, GUI by Tkinter and I was finding a way to allow multiple instantiation of the programs to interact with one another in the sense of updating its key variables. (Sorry for my ...
GridSpec with shared axes in Python Question: [This solution](http://stackoverflow.com/a/19627237/283296) to another thread suggests using `gridspec.GridSpec` instead of `plt.subplots`. However, when I share axes between subplots, I usually use a syntax like the following fig, axes = plt.subplots(N, 1,...
How do i interpret inline javascript code in python on GAE? Question: I'm in use python based on GAE (Google App Engine) and want to interpret inline javascript code. like as a SpiderMonkey(<https://code.google.com/p/python-spidermonkey>), > from spidermonkey import Runtime > rt = Runtime() > cx = rt.new_contex...
How to solve a binary linear program with cvxopt? Python Question: I know how to solve a linear program with cvxopt, but I don't know how to make it when the variables are all 0 or 1 (binary problem). Here is my attempt code: #/usr/bin/env python3 # -*- coding: utf-8 -*- from cvxopt.mod...
keeping "global" variables in flask blueprints Question: Let's say I have a fairly basic main app then a series of Blueprints which lead to other pages. I then have modules that will read a csv and use the data to do the functions from py_csv_entry import entry class python_csv: def __init__(se...
cpython vs cython vs numpy array performance Question: I am doing some performance test on a variant of the prime numbers generator from <http://docs.cython.org/src/tutorial/numpy.html>. The below performance measures are with kmax=1000 Pure Python implementation, running in CPython: 0.15s Pure Python implementation,...
Python - Adding a state to a program Question: I have this program that's supposed to take a user's lowercase sentence and capitalize it. There's currently two states, one that takes in the message (which I think is referred to as sockCanSend) and the other that capitalizes it (sockCanReceive). The problem is that I'm ...
BoxSizer in Frame and Panel Question: When i create a BoxSizer like this: class MyForm(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, wx.ID_ANY, "App",size=(800,600),style= wx.SYSTEM_MENU | wx.CAPTION | wx.MINIMIZE_BOX | wx.CLOSE_BOX) ...
foreman start no module named myapp Question: I'm following the heroku quick start guide here: <https://devcenter.heroku.com/articles/getting-started-with-python> and I'm stuck on the foreman start part. This is what my directory looks. I'm just running a basic web app. No frameworks or anything. soapba...
In Python: saving Unicode letters with newlines into a .txt so that it works fine while opening both using Excel and a text editor Question: I want to save some unicode data into a .txt file, so that it looks OK while opening the same file both in text editor and using Excel. Tried to codecs.open() the txt file using d...
Django gives "GET /static/css/style.css HTTP/1.1" 304 0 Question: ok so My Index.html is <!DOCTYPE html> <html> <head> <title>Kodeworms</title> <link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" /> </head> <body class="logged-out"> </...
Creating a threshold-coded ROC plot in Python Question: R's [ROCR package](http://rocr.bioinf.mpi-sb.mpg.de) provides options for ROC curve plotting that will color code and label threshold values along the curve: ![](http://i.stack.imgur.com/7MviA.png) The closest I can get with Python is something like ...
How to get POST/GET data in python Question: I'm trying to get POST/GET data in my python script. I'm using the web.py framework and below is my code: import web form = web.input() mydata = form.mydata This is the error output im getting: File "script.py", line 22, in <m...
urlopen with timeout fails behind proxy Question: python 2.7.3 under linux: getting strange behaviour when trying to use the timeout parameter from urllib2 import urlopen, Request, HTTPError, URLError url = "http://speedtest.website-solution.net/speedtest/random350x350.jpg" try: ...
How to deal with a lot variables access in different function/class in python Question: The code which I wanna improved now looks something like below, which f0 and f1(or more than 2 function) need the same variables. I have to code about 50 lines to describe the variable setting at each function. how can I do this...
OOP python program Question: from collections import Counter class Runlength: def __init__(self): self.str = 0 def returner(self,str): self.str = str self.__str = ','.join(str(n) for n in self.__str) self.__str = self.__str[::-1] ...
Jython Shutil (different behaviour between Windows, Linux, J/Python)! Question: I'm using Jython, through Topspin (NMR Software running on Java) to run the following code: home = "C:/Bruker/TopSpin3.2" ep_zges_outdir = os.path.abspath(home + "/data/Testshutil/nmr/zges/") data = ["EP_Saliva_140131...
Run Python script importing xmlrpclib on Windows? Question: I have been using Linux to programm Python scripts, but now I have to make one of them work on Windows XP, and here I am a beginner. I have installed Python 3.4 in C:\Python34, and I have my Python script in E:\solidworks_xmlrpc. This script works perfectly on...
Parsing big text files with python specific syntax Question: I'm trying to parse big text files with python. These files have a syntax like this: <option1> { <variable1>=<value1>; //<comment> <variable2>=<value2>; .. <variableN>=<valueN>; //<comment> } <option2> { <var...
No module psutil.error Question: I have the following error: File "/usr/local/lib/python2.7/dist-packages/a8/terminals.py", line 11, in <module> import psutil, psutil.error ImportError: No module named error psutil is installed. Answer: `psutil` has `NoSuchProcess`, `AccessDenied` a...
No module named setuptools Question: I want to install setup file of twilio. When I install it through given command it is given me an error "No module named setuptools". Could you please let me know what should I do? I am using python 2.7. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporatio...
Python ImportError: cannot import name datafunc [PyML] Question: I have installed [PyML](http://pyml.sourceforge.net/tutorial.html) package in order to use some machine learning algorithms, and according to the tutorial, my installation is successful. I try to run a python script which includes the following line to i...
Django tests - fixture User matching query does not exist Question: I'm trying to run a test that loads a fixture. One the models has `GenericForeign` key to `ContentType` and a Foreign key to `auth.Users`. It associates users with content they create. I created fixture with `--natural` key (as per below) and can forei...
wxPython- "no module named Panel" error Question: I am writing a GUI application using wxPython . But every time i am getting "no module named Panel" error. Can anyone suggest why.. My code is this class Player1(wx.Frame): def _init_(self, parent, id, title): wx.Frame._init_(self, par...
How to send Autobahn/Twisted WAMP message from outside of protocol? Question: I am following the basic wamp pubsub examples in [the github code](https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/basic/pubsub/basic): This example publishes messages from within the class: class C...
How to create a test script in Python for a registration page? Question: I have a website made in PHP. To increase number of data sets in my database, I need to create a python script such that I need not add 500 registrations manually. There are several tools available but I need to create script of my own. Can any...
Delete particular string while reading CSV data Question: I'm new in python , and I'm writing a code to read data from a CSV file. The data looks like this: 10944750,13451,0,6��4�� 10944750,21110,0,6��7�� 10944750,1131,0,7��23�� 10944750,8689,0,5��2�� The last column ...
Flask: 'Response' object is not iterable with response-producing exceptions Question: I can't seem to generate responses from exceptions anymore in Flask 0.10.1 (the same happened with 0.9). This code: from flask import Flask, jsonify from werkzeug.exceptions import HTTPException import flask, we...
Wrong freqs & amplitudes with numpy.fft, furthermore odd drawing of spectra Question: To understand the usage of ffts, I've just implemented a low-pass filter for a discrete signal in python. The resulting filtered signal is pretty much what I wanted to get, but unfortunately, the spectra are not what I had expected. ...
Fast algorithm to compute Adamic-Adar Question: I'm working on graph analysis. I want to compute an N by N similarity matrix that contains the Adamic Adar similarity between every two vertices. To give an overview of Adamic Adar let me start with this introduction: Given the adjacency matrix `A` of an undirected graph...
How to start a waveform from a python script, if a component is run on two different architectures? Question: I had asked an earlier question on how to create and run the same component on different architecture, [Same component run on 2 different GPPs](http://stackoverflow.com/questions/22390340/same-component- on-2-d...
Variables defined in a function - Python Question: I am running this code: <https://dpaste.de/RiAP> As you see, the variable `linespecificpayload` is used only within this function, but if I check the ID, its the same in every function call. I can't seem to figure out how to flush its value with each call. Both the c...
In Python how to encode/decode unicode characters such as ö Question: Using Python 2.6.6 on CentOS 6.4 import json import urllib2 url = 'http://www.google.com.hk/complete/search?output=toolbar&hl=en&q=how%20to%20pronounce%20e' opener = urllib2.build_opener(urllib2.HTTPCookieProcessor...
TypeError: expected string or buffer while using regular expression in python Question: I wrote this code to remove the tags that match like this `<p><b>See also:</b> <a href=\"(.*?)\">(.*)</a>(.*)</p>` **CODE:** import mechanize import urllib2 from bs4 import BeautifulSoup import re me...
Generating all possible combinations from a list of lists Question: I have the following lists: [[a,b,c],[b],[d,a,b,e],[a,c]] This list represents a mini-world in a puzzle problem. In this example the world contains 4 piles of objects stacked on-top of each other. I can only move the top object and...
Error in Synchronize Translation Openerp 7 Question: I am getting this strange error when trying to synchronize terms in Openerp 7. I had imported some terms for german language through a CSV file before but now I only have English installed. OpenERP Server Error Client Traceback (most recent c...
How to get a value from another file function? python Question: Does anyone can help here? I have two files called `game.py` and `settings.py`, I just want to get one value from settings to use in game, but I dont know what I am doing wrong. the value I want it is in the function bbbbb... THIS IS MY SET...
Python Turtle: How to use the write function to join an integer and a string with the integer coming from a list Question: So, I'm trying to get the grade to be able to print a percentage sign in the exact same line as to when I write the grade. The aim is to have it print: 45% for the first example. fr...
Python: Can't pop from an empty list Question: I am creating a python program to detect and enable usb to usb data transfer between usb storage drives. However I am having an issue with updating the `dev_label` (device name of the drive) and passing it to `Exchange`. Here is the code : serial_list=[] ...
How to pass the class path to ipython's notebook when called from ipzope? Question: I've been using iypthon as set from ipzope (buildout) for a while and it works without problems. Now I'm trying to use ipython's notebook and I cannot set it up properly. When I create a new notebook it stops IPython's Kernel with an ...
Python counter in Prolog Question: In Python you can do >>> import from collections counter >>> Counter(['a','b','b','c']) >>> Counter({'b': 2, 'a': 1, 'c': 1}) Is there something similar in Prolog? Like so: counter([a,b,b,c],S). S=[a/1,b/2,c/1]. This is my impleme...
Brute force closest pair algorithms - for loops Question: New to Python. Trying to analyze the algorithm for Closest pair of points. Found an [example](http://rosettacode.org/wiki/Closest-pair_problem#Python) Which has these lines: return min( ((abs(point[i] - point[j]), (point[i], point[j])) ...
Serving resource to QWebView of PyQT5 Question: How can serve resource (files like html, css, js, fonts) for a desktop app to QWebView (in PyQT5)? What I want is: 1. If possible handling requested resource by Webkit engine of PyQT5 with a custom scheme like say `custom://app/jquery.js` and returning the file. 2. ...
python drawing directed graph in SPYDER Question: I am using SPYDER. I have below code. The code produces the graph. But the graph is not clean. I would like to see layers in the graph - my first layer has 'start' node, second layer has 1,2,3 node, third layer has 'a', 'b', 'c' nodes and the last layer has 'end' node. ...
matplotlib imshow, ArtistAnimation and class attribute Question: I am trying to code a Conway's game of life in Python and to display the evolution. I have trouble displaying the output. I have pasted my whole code below. I used this example as a base: [from the matplotlib doc](http://matplotlib.org/examples/animation...
solve an integral equation embedded with another integral equation by python 3.2 Question: I need to solve an integral equation embedded with another integral equation by python 3.2 in win7. There are 2 integral equations. The code is here: import numpy as np from scipy.optimize.minpack import fsol...
queryset filter month returns empty Question: **Edit** : So I dropped this and then waited for a few days it started working! Some how the upgrade to 1.6 took a while to 'propagate'! _shrugs_. Thanks to all who chimed in! The queryset filter `month` does not seem to be working correctly. I have a bunch of objects in d...
Mezzanine Django Framework createdb error on Max OSX 10.9.2 Question: I want to build a django framework with mezzanine using python on my mac. from their site they have this simple steps to create a framework in your terminal. # Install from PyPI $ pip install mezzanine # Create a project ...
How to select multiple columns based on their names in python? Question: I am new to python so sorry if this is too obvious. I have a dataframe that looks like below: import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(5, 10)) df.columns = ['date1', 'date2', 'date3', 'na...
Creating folders in outlook 2010 using python Question: I know how to get the name of folders in outlook 2010 using the code below: import win32com.client ol = win32com.client.Dispatch("Outlook.Application") ns = ol.GetNamespace("MAPI") inbox = ns.Folders(6).Folders(2) How can I ad...
Is there a Python 3.x debugger for embedded interpreter? Question: I've embedded python in a C++ application. Is there any graphical debugger that I can attach to debug scrips that run in the embedded console for Python 3.4? Previously (when using Python 2.7) I've used Winpdb and attached the debugger with ...
Special HTML characters in Python to ASCII Question: I want to convert special characters which I see during web-page reading to the ASCII format. I've tried a lot, but I can't figure it out. I will give some examples below which are stored in a string in Python.I don't know what the current encoding of the web-page is...
Python readlines string issue Question: import os fname = "input1.txt" if os.path.isfile(fname): f = open("input1.txt", "r") for row in f.readlines(): if "logging failed" in row: print "the file does say 'logging failed' in it" ...
how to use reportlab with google app engine Question: I am unable to import reportlab properly under google app engine. According to the following [guide](http://blog.notdot.net/2010/04/Generating-PDFs-on-App- Engine-Python-and-introducing-Mapvelopes) (and several other places on the web): "All you have to do is downl...
How can I test if Python http.server.HTTPServer is serving forever? Question: I am writing this little demo code to start an HTTP server, test that it is running successfully and then exit. import http.server import urllib.request import threading # Start HTTP server httpd = http.ser...
Should I use `app.exec()` or `app.exec_()` in my PyQt application? Question: I use Python 3 and PyQt5. Here's my test PyQt5 program, focus on the last 2 lines: from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys class window(QWidget): def __init__(self,parent=None): ...
Error building Android Library project using Python in Eclipse Question: I'm trying to build this library project <https://crosswalk-project.org>. I wish to implement the XWalkView in my application to use WebRTC. I followed the following steps: 1. Downloaded the stable ARM release 2. Extracted the core library ...
how can the directory of a usb drive connected to a system be obtained? Question: I need to obtain the path to the directory created for a usb drive(I think it's something like /media/user/xxxxx) for a simple usb mass storage device browser that I am making. Can anyone suggest the best/simplest way to do this? I am usi...
How to add an icon to an exe developed through py2exe Question: I am working on windows-7 64 bit machine using python 2.7. Using **py2exe** to convert mycode.py script into an exe. I am not able to find the reason why icon to an exe is not embedded. My setup.py is: from distutils.core import setup i...
Gimp, Script-Fu: How can I set a value in the colormap directly Question: I have a Scriptfu script written in Python for Gimp which applies several steps on an existing image and converts it to an indexed image in the process. The lightest color in the resulting image is always nearly white; I want to set it to _exactl...
Python- Regular expression to match" <textarea> </textarea> " and anything between them Question: If the text was `<textarea>` **xyz asdf qwr** `</textarea>` I'm trying to write a regular expression which will help me extract the text in **bold**. So far I have reached `[(<textarea)][</textarea>)]` which will captur...
How to avoid overwriting previous package installation with distutils Question: I have a python package that uses distutils. I would like to configure the setup.py to do either of the following: * Detect a previously-installed version of the package and raise an error * Offer to remove the previously-installed ver...
Kivy pygame error Question: I've been trying to get Kivy to work on my Mac (Lion), but I've been encountering issues. I followed the instructions on the Kivy site, and since Kivy 1.8 supports Python 3, I wanted to run it with 3.3, and I finally got that to work, by editing the kivy file to point to 3.3 instead of 2.7. ...
Why am I getting an indentation error, "unexpected indent" in my code? Python Question: On the first line of my code, I seem to be getting an indentation error. I have 2 spaces as an indent on my code, as I always do since my class requires it, but for the first time I'm getting an error for it. My code looks like thi...
how import statement executes in python? Question: I read about about import statement in pydocs. It says it executes in two steps. (1)find a module, and initialize it if necessary; (2) define a name or names in the local namespace (of the scope where the import statement occurs). The first form (without from) repeats ...
piping from stdin to a python code in a bash script Question: I have a bash script, f, that contains python code. That python code reads from standard input. I want to be able to call my bash script as follows: f input.txt > output.txt In the example above, the python code will read from input.txt ...
python regex token capture Question: I need to capture small code (token) from html with regex, I'm writing code with BeautifulSoup but it is not possible to compile with py2exe, so for this I need a solution wihth regex. My html code is this: <form method="post" enctype="multipart/form-data" class="wp-u...
can't find module 'cx_Freeze__init__' Question: I'm trying to convert my Python project to a standalone executable, in order to run it on other servers that don't have Python installed. Command used: python setup.py build > build.log When I try to run the resulting exe, it always spits out the fol...
Sorting the order of bars in pandas/matplotlib bar plots Question: What is the Pythonic/pandas way of sorting 'levels' within a column in pandas to give a specific ordering of bars in bar plot. For example, given: import pandas as pd df=pd.DataFrame({'group':['a','a','a','a','a','a','a','b','b','b',...
Python subprocess command to run silent, prevent cmd from appearing Question: I have some complicated Python3 GUI code with tinker, and compiled with cx_Freeze. The issue only occurs when run on Windows. subprocess check_ouptut (or Popen) runs a similar command: import subprocess VAL = subprocess.c...
Generating Google Cloud Endpoints Android client classes from Python project Question: I have coded and tested a Python Endpoints server-side for an Android app that I'm building. The coded server-side works perfectly on the API Explorer. I'm also able to generate the zip containing the classes jar file, but when I im...
UnboundLocalError when use element tree to parse XML in plugin QGIS Question: I make plugin to open XML and read it then parse it to show some information, this is code I use from PyQt4 import QtCore, QtGui from ui_latih import Ui_latih import xml.etree.ElementTree as ETree # create the dialo...
Difference between using APSchedule and time.sleep() in Python Question: I am creating a script that has a function that should run every X hour. One way of doing it seems to be with [time.sleep()](http://docs.python.org/2/library/time.html#time.sleep). Example taken from [this Stackoverflow question](http://stackover...
Calling git -C /path/to/dir from python fails, runs from console Question: I am writing a git serverside hook that needs to check if there are any modifications to a different git folder (different from the bare git repository in which that hook resides). To that end, I have written a `pre- receive` hook and I am tryin...
python printing each character in new line Question: I'm trying to print lines and replace words in lines of a text/html file but not able to do so because python (2.7) is reading it character by character. What am I doing wrong? Here is the code and output: import sys infile = open('filenmae')...
Create a simple GUI for a minimalistic python script Question: I wrote a small python function, which takes several numerical input parameters and prints many lines with statements, which going to be used in an experiment, like this toy example: def myADD(x,y,z): res = x + y + z ...
python-ldap creating a group Question: I'm trying to create a security group in AD from a python script with python- ldap. I'm able to bind my user which has sufficient rights to perform such an operation (confirmed by creating the group from ADExplorer gui client) and search the domain, but when it comes to adding th...
Python String Comparison function() Question: I am checking a piece of Python code I found online (<http://www.exploit- db.com/exploits/18305/>), and I'm stuck over a piece of code. To be honest I don't know Python, but I have experience in other programming languages. The method `_computeCollisionChars` generates a ...
How to use python os.walk, but first get the subfolders and then the files as XML file Question: I'm python beginner and started to work on the below script. It already works, but in the wrong way. Now i get stuck and I would like some help. I use os.walk in order to get an index as a XML file of a filepath in Windows....
yet another pymacs helper did not start within 30 seconds (but with more debug) Question: I have followed [this guide](http://milkbox.net/note/installing-pymacs-rope- on-emacs-24/), and consulted these existing stackoverflow questions: * [Pymacs helper did not start after 30 seconds](http://stackoverflow.com/questio...
Python optparse command line args Question: I am working on a problem I need to run with different args from a command line. I found this example online but no answer. I am not currently not worried about the parser errors, I can do that later, I am just stumped on getting the args right. -l/--level INFO...
APScheduler not executing the python Question: I am learning Python and was tinkering with Advanced scheduler. I am not able to gt it working though. import time from datetime import datetime from apscheduler.scheduler import Scheduler sched = Scheduler(standalone=True) sched.start()...
Python: argv and IndexError Question: I am trying to reproduce the results of a research article which they provided the python codes. There is a script to download their data and I am trying to run the script from terminal by, > python getData.py an it raises the error > File "getData.py", line 127, in dataFile = s...
Python multiprocessing job to Celery task but AttributeError Question: I made a multiprocessed function like this, import multiprocessing import pandas as pd import numpy as np def _apply_df(args): df, func, kwargs = args return df.apply(func, **kwargs) def apply...
If identifying text structure in PDF documents is so difficult, how do PDF readers do it so well? Question: I have been trying to write a simple console application or PowerShell script to extract the text from a large number of PDF documents. There are several libraries and CLI tools that offer to do this, but it turn...
pandas to_sql truncates my data Question: I was using `df.to_sql(con=con_mysql, name='testdata', if_exists='replace', flavor='mysql')` to export a data frame into mysql. However, I discovered that the columns with long string content (such as url) is truncated to 63 digits. I received the following warning from ipython...
How can I calculate the area within a contour in Python using the Matplotlib? Question: I am trying to figure out a way to get the area inside a specific contour line? I use `matplotlib.pyplot` to create my contours. Does anyone have experience for this? Thanks a lot. Answer: From the `collections` attribute of ...
How can python threads be programmed such that the user can distinguish between them using monitoring tools available in LINUX Question: For example, I can name threads easily for reference within the python program: #!/usr/bin/python import time import threading class threadly(threading...
Go subprocess communication Question: GO: Is there some way to communicate with a subprocess (shell script / python script), which is waiting for input on stdin? e.g. python script (subprocess) import sys while True: sys.stdout.write('%s\n'%eval(sys.stdin.readline())) In the go program...
Docker python client API copy Question: I am using Docker python client API 'copy'. Response from copy is of type `requests.packages.urllib3.HTTPResponse` Does it need to be handled differently for different types of file? I copied a text file from container but when I try to read it using `response.read()` I am gett...