Description:
The Python computer language.
|
|
|
authentication with python-ldap
|
| |
import ldap
conn = ldap.initialize("ldap://ldap.u ci.cu")
conn.protocol_version = ldap.VERSION3
conn.simple_bind_s( "uid=xxx,dc=uci,dc=cu", "xxx" )
Result:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.7/dist-packa ges/ldap/ldapobject.py", line... more »
|
|
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 »
|
|
|