Description:
The Python computer language.
|
|
|
Subprocess freezes when piping from stdout.
|
| |
Hi All, I'm using subprocess.Popen to run a C++ compiler and have set stdout = PIPE. The exact line of code that I am using is: process = Popen(command, stdout=PIPE) status = process.wait() This works fine until a large amount of data is written to stdout. When this occurs, my python program seems to freeze. It will no longer... more »
|
|
Read and write binary data
|
| |
Hi guys, I am new to Python, and thinking about migrating to it from matlab as it is a really cool language. Right now, I am trying to figure out how to control read and write binary data, like 'formatted','stream','big-endi an','little-edian' etc.. as in fortran. I googled, but can not find a clear answer. Anyone has clue where can... more »
|
|
Updating python dictionary
|
| |
Hello... I have a dict of key/values and I want to change the keys in it, based on another mapping dictionary. An example follows: MAPPING_DICT = { 'a': 'A', 'b': 'B', ...my_dict = { 'a': '1', 'b': '2' ...I want the finished my_dict to look like: my_dict = { 'A': '1', 'B': '2'... more »
|
|
lacking follow-through
|
| |
I am concerned by the lack of follow-through on some responses to recent ideas I have described. Do I merely have a wrong understanding of group policy? Is it a good policy (defined with respect to the future of Python and the welfare of humans at large) if so? Is there a serious lack of diligence, or should I merely take more initiative,... more »
|
|
problem with permutations
|
| |
I am trying to translate this elegant Erlang-code for finding all the permutations of a list. I think it is the same function as is but it doesn't work in Python. -- is upd in Python. It works as it should. perms([]) -> [[]]; perms(L) -> [[H|T] || H <- L, T <- perms(L--[H])]. def perms(lista): if lista == []:... more »
|
|
__builtins__ magic behavior
|
| |
__builtins__ in 2.5.2 doesn't seem to behave like I remember it did the last time I did some custom stuff with it, a very long time ago. This isn't surprising, because of ongoing optimization, but it's hard to google for '__builtins__' so I didn't really find any documentation on the current CPython behavior, which in some cases seems quite... more »
|
|
The Python Papers Vol 3 Iss 2 in one PDF
|
| |
Hi everyone Our original release of TPP Volume 3 Issue 2 is in the form of one PDF per article. A number of readers had kindly requested for a parallel release for the entire issue in a single PDF for easy transport. Despite prevalent "industrial standards" for one PDF per article such as IEEE and ACM, we can understand our readers' point of view. We can... more »
|
|
doctest not seeing any of my doc tests
|
| |
I have a function in my module: def selftest(verbose=False): import doctest doctest.testmod(verbose=verbos e) When I run it, it fails to find any of my doc tests, including the tests in __main__, and in fact it looks like it can't even find my functions and classes: ...1 items had no tests:... more »
|
|
|