Description:
The Python computer language.
|
|
|
suppress newlines in my script
|
| |
I am importing lines from an external csv file and when I iterate through the lines and increment, new lines are introduced.
How would I cut out the newlines. I have attempted several pythonic strip() and rstrip() how can i implent this?
import sys, os
f=open('europe_csv')
lines=f.readlines()... more »
|
|
Pulp problem _dummy
|
| |
Hello!
I'm using pulp for linear optimization but when I run my code I get the following output:
Central Optimization:
MAXIMIZE
0*__dummy + 0
SUBJECT TO
_C1: 2 T0 >= 0
_C2: 2 T0 <= 0
_C3: 0.0686928673545 Frigorifico0 >= 0
_C4: 0.0686928673545 Frigorifico0 <= 0
_C5: 2 Termo0 >= 0... more »
|
|
Error with python 3.3.2 and https
|
| |
I am trying to write a program that requires me hitting a https web link. However, I can't seem to get it to work. The program works fine when dealing with http sites, however, when I try it with a https site I get
socket.gaierror: [Errno 11001] getaddrinfo failed
It seems like it has something to do with the ssl not working, however, I do have the ssl.py in the python library and I have no problem importing it.... more »
|
|
Debugging parallel nose tests?
|
| |
I've got a suite of about 150 tests written using unittest. It takes 5-10 minutes to run, so I'd really like to use nose to run things in parallel. The problem is, when I do that, I get lots of test failures. Obviously, we've got some kind of inter-test dependency that I haven't been able to locate.... more »
|
|
Strange behaviour of Python when importing something from a symlinked script
|
| |
Hello. Today in relation with a library I was working on I was frustrated by this bug for (I think) over an hour: it has to do with a Python script called via a symlink. To illustrate it I have included a minimal test case tarball at the end of this post in base64. (I used uuencode -m.) Just run sh test.sh at root of the extracted tree to see what's happening.... more »
|
|
serialize a class to XML and back
|
| |
Hi list,
how can I serialize a python class to XML? Plus a way to get the class back from the XML?
My aim is to store instances of this class in a database.
bg,
Johannes
-- GLOBE Development GmbH
Königsberger Strasse 260
48157 MünsterGLOBE Development GmbH
Königsberger Strasse 260... more »
|
|
|