ANNOUNCING
eGenix.com pyOpenSSL Distribution
Version 0.8.1-0.9.8j-1
An easy to install and use repackaged distribution
of the pyOpenSSL Python
Hi all,
I'm proud to announce the release of Sphinx 0.6b1 and 0.5.2b1.
Sphinx 0.5.2 is a bugfix-only release in the 0.5 series, while 0.6 is
a feature release, containing all of 0.5.2's fixes together with
many added features.
These are beta releases, so please test them out and report any bugs
updated Python bindings for ITT's IDL
http://www.its.caltech.edu/~mmckerns/software.html
# Version
0.7c3: 03/16/09
added support for idl_7.0
installs with setuptools, if available
links to easy_install build of numarray
more gentle install dependency failure
sensible path defaults
This isn't exactly how things work. The server *sends* you bytes. It can
send you a lot at once. To some extent you can control how much it sends
before it waits for you to catch up, but you don't have anywhere near
byte-level control (you might have something like 32kb or 64kb level
2009/3/16 Saurabh phoneth...@gmail.com:
I want to download content from the net - in chunks of x bytes or characters
at a time - so that it doesnt pull the entire content in one shot.
import urllib2
url = http://python.org/;
handler = urllib2.urlopen(url)
data = handler.read(100)
print
Mensanator wrote:
On Mar 16, 1:40 pm, Peter Otten __pete...@web.de wrote:
mattia wrote:
I have 2 lists, like:
l1 = [1,2,3]
l2 = [4,5]
now I want to obtain a this new list:
l = [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
Then I'll have to transform the values found in the new list.
Now,
Please excuse my replying to a reply instead of the original, but the
original doesn't show up on my news feed.
On 2009/3/16 Saurabh phoneth...@gmail.com:
I want to download content from the net - in chunks of x bytes or
characters at a time - so that it doesnt pull the entire content in one
is there any this kind of lib for python?
thanx
--
http://mail.python.org/mailman/listinfo/python-list
Hi David and John.
Thanks a lot, the problem is solved.
David, your idea was the key to solve the problem.
Actually John in his code and the explanation made it clear that the
wrong attributes were being used on wrong elements.
david's code confirmed the fact. The center style which david had
Heres the reason behind wanting to get chunks at a time.
Im actually retrieving data from a list of RSS Feeds and need to
continuously check for latest posts.
But I dont want to depend on Last-Modified header or the pubDate tag
in channel. Because a lot of feeds just output date('now') instead
of
On Mon, 16 Mar 2009 02:59:57 -0700, Michele Simionato wrote:
On Mar 16, 8:08 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:
On Sun, 15 Mar 2009 23:18:54 -0500, alex goretoy
Many of your posts are actually exceeding the 500-line
limit I've
set in my client for down-load --
On 16 mrt 2009, at 22:15, Lou Pecora wrote:
In article mailman.1980.1237237525.11746.python-l...@python.org,
Python pyt...@rgbaz.eu wrote:
--
why don't you just execute the script directly form the terminal?
then you will be able to read all error messages...
and you can delete all the
Hi all, can you tell me why the module urllib.request (py3) add extra
characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the
following and urllib2 (py2.6) correctly not?
py2.6
import urllib2
f = urllib2.urlopen(http://www.google.com;).read()
fd = open(google26.html, w)
Il Tue, 17 Mar 2009 08:18:08 +0100, Peter Otten ha scritto:
Mensanator wrote:
On Mar 16, 1:40 pm, Peter Otten __pete...@web.de wrote:
mattia wrote:
I have 2 lists, like:
l1 = [1,2,3]
l2 = [4,5]
now I want to obtain a this new list: l =
[(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)] Then
On Sat, Mar 14, 2009 at 9:09 AM, mattia ger...@gmail.com wrote:
How can I convert the following string:
'AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
EGC','SXF','BZR','BIQ','BLL','BHX','BLQ'
into this sequence:
['AAR','ABZ','AGA','AHO','ALC','LEI','AOC',
On Sat, Mar 14, 2009 at 5:10 AM, Saurabh nirkh...@gmail.com wrote:
For introduction I am thinking about 'Learning Python' and for
reference I am thinking about 'Python Bible'.
I need your suggestions on this.
Thanks in advance
--
http://mail.python.org/mailman/listinfo/python-list
mattia ger...@gmail.com wrote:
Hi all, can you tell me why the module urllib.request (py3) add extra
characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the
following and urllib2 (py2.6) correctly not?
py2.6
import urllib2
f =
a = ['cat','dog','elephant']
a.next()
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'list' object has no attribute 'next'
Is there something that imtates PHP's next() ? (http://php.net/next)
--
http://mail.python.org/mailman/listinfo/python-list
Saurabh phoneth...@gmail.com wrote:
This isn't exactly how things work. The server *sends* you bytes. It can
send you a lot at once. To some extent you can control how much it sends
before it waits for you to catch up, but you don't have anywhere near
byte-level control (you might have
Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto:
mattia ger...@gmail.com wrote:
Hi all, can you tell me why the module urllib.request (py3) add extra
characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the
following and urllib2 (py2.6) correctly not?
py2.6
On Tue, Mar 17, 2009 at 12:12 PM, Anjanesh Lekshminarayanan
m...@anjanesh.net wrote:
a = ['cat','dog','elephant']
a.next()
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'list' object has no attribute 'next'
Is there something that imtates PHP's next() ?
On Tue, Mar 17, 2009 at 12:24 PM, Andre Engels andreeng...@gmail.com wrote:
On Tue, Mar 17, 2009 at 12:12 PM, Anjanesh Lekshminarayanan
m...@anjanesh.net wrote:
a = ['cat','dog','elephant']
a.next()
Traceback (most recent call last):
File stdin, line 1, in module
AttributeError: 'list'
Andre Engels wrote:
[...]
b = a.__iter__()
b.next()
'cat'
b.next()
'dog'
not sure from what version, but certainly in 2.6 and on, you can improve
the syntax slightly:
b = iter(a)
b.next()
andrew
--
http://mail.python.org/mailman/listinfo/python-list
Andre Engels wrote:
[...]
b = a.__iter__()
b.next()
'cat'
b.next()
'dog'
NOTE CORRECTION BELOW! IT'S next(b), not b.next() which doesn't exist in
Python 3 (if you need it, it's now b.__next__()). sorry.
not sure from what version, but certainly in 2.6 and on, you can improve
the syntax
On 16 Mrz., 23:06, Mudcat mnati...@gmail.com wrote:
On Mar 13, 8:37 pm, Christian Heimes li...@cheimes.de wrote:
Chris Rebert wrote:
Haven't used it, butPythonfor .NET sounds like it might be what you
want:http://pythonnet.sourceforge.net/
I've done some development for and with
Python wrote:
On 16 mrt 2009, at 22:15, Lou Pecora wrote:
Because the shell process in the Terminal window would exit right after
it started even when I was just trying to open a new window (not even
running a script), i.e. command-N in Terminal. So I could not run
anything from the
On Sun, 15 Mar 2009 22:47:54 -0700, Chris Rebert c...@rebertia.com wrote:
On Sun, Mar 15, 2009 at 10:24 PM, venutaurus...@gmail.com
venutaurus...@gmail.com wrote:
Hi all,
I have to write an application which does a move and copy of a
file from a remote machine to the local machine. I
not sure from what version, but certainly in 2.6 and on, you can improve
the syntax slightly:
b = iter(a)
b.next()
This syntax (also my preferred version) has been available since
at least 2.3
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
Jorgen Grahn wrote:
On Sun, 15 Mar 2009 22:47:54 -0700, Chris Rebert c...@rebertia.com wrote:
On Sun, Mar 15, 2009 at 10:24 PM, venutaurus...@gmail.com
venutaurus...@gmail.com wrote:
Hi all,
I have to write an application which does a move and copy of a
file from a remote machine to the
On Tue, 17 Mar 2009 13:38:31 +0530, Saurabh phoneth...@gmail.com wrote:
Heres the reason behind wanting to get chunks at a time.
Im actually retrieving data from a list of RSS Feeds and need to
continuously check for latest posts.
But I dont want to depend on Last-Modified header or the
Dnia Tue, 17 Mar 2009 15:43:27 +0800, oyster napisał(a):
is there any this kind of lib for python? thanx
If you plan to use it for some sort of automatic testing, look here:
http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy#GUITestingTools
--
On Mar 16, 5:42 pm, John Machin sjmac...@lexicon.net wrote:
On Mar 17, 9:29 am, R. David Murray rdmur...@bitdance.com wrote:
walle...@gmail.com wrote:
On Mar 16, 4:10 pm, Benjamin Peterson benja...@python.org wrote:
wallenpb at gmail.com writes:
self.out.write(b'BM') worked
Thought you might find his interesting.
A standalone Eye-Fi server has now been presented to the general public,
and while it's written in a language that few understand these days (it's
Python, and no, we're not joking), the functionality here is second to
none.
Quoting andrew cooke and...@acooke.org:
Andre Engels wrote:
[...]
b = a.__iter__()
not sure from what version, but certainly in 2.6 and on, you can improve
the syntax slightly:
b = iter(a)
b.next()
Indeed. Directly calling __special_methods__ should be avoided. That one is a
better
This is a long running process, written in Python. Only standard lib is
used. This process accepts connections on TCP sockets, read/write data.
After about one day, it starts throwing this when I try to connect:
2009-03-17 09:49:50,096 INFO .accesspoint0 ('127.0.0.1', 55510) connecting
On Mar 17, 2009, at 10:04 AM, Laszlo Nagy wrote:
This is a long running process, written in Python. Only standard lib
is used. This process accepts connections on TCP sockets, read/write
data.
After about one day, it starts throwing this when I try to connect:
2009-03-17 09:49:50,096
Hi Laszlo,
Just a hunch -- are you leaking file handles and eventually running out?
These file handles are for TCP sockets. They are accept()-ed, used and
then thrown out. I guess after the connection was closed, the file
handle is destroyed automatically. BTW here is the shutdown() method
On Tue, 17 Mar 2009 15:04:22 +0100, Laszlo Nagy gand...@shopzeus.com wrote:
This is a long running process, written in Python. Only standard lib is
used. This process accepts connections on TCP sockets, read/write data.
After about one day, it starts throwing this when I try to connect:
On Tue, 17 Mar 2009 12:15:23 +0530, Saurabh phoneth...@gmail.com wrote:
This isn't exactly how things work. The server *sends* you bytes. It can
send you a lot at once. To some extent you can control how much it sends
before it waits for you to catch up, but you don't have anywhere near
On Mar 17, 2009, at 10:31 AM, Laszlo Nagy wrote:
Hi Laszlo,
Just a hunch -- are you leaking file handles and eventually running
out?
These file handles are for TCP sockets. They are accept()-ed, used
and then thrown out. I guess after the connection was closed, the
file handle is
Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto:
mattia ger...@gmail.com wrote:
Hi all, can you tell me why the module urllib.request (py3) add extra
characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the
following and urllib2 (py2.6) correctly not?
py2.6
Jean-Paul Calderone exar...@divmod.com wrote:
On Tue, 17 Mar 2009 12:15:23 +0530, Saurabh phoneth...@gmail.com wrote:
This isn't exactly how things work. The server *sends* you bytes. It can
send you a lot at once. To some extent you can control how much it sends
before it waits for you
Richard Jones richardjo...@optushome.com.au writes:
I'm proud to release version 1.4.7 of Roundup.
- Allow CGI frontend to serve XMLRPC requests.
- Added XMLRPC actions, as well as bridging CGI actions to XMLRPC actions.
Sweet.
I'm working on a small project called TracShell which is a
On Mar 17, 6:39 am, Kay Schluehr kay.schlu...@gmx.net wrote:
On 16 Mrz., 23:06, Mudcat mnati...@gmail.com wrote:
On Mar 13, 8:37 pm, Christian Heimes li...@cheimes.de wrote:
Chris Rebert wrote:
Haven't used it, butPythonfor .NET sounds like it might be what you
Laszlo Nagy gand...@shopzeus.com wrote in message
news:mailman.2032.1237300298.11746.python-l...@python.org...
This method is called after the connection has been closed. Is is possible
that somehow
the file handles are leaking?
If I understand correctly, you call shutdown() but not
Supervisor does not work with Python2.6. While running with the test
configuration, supervisord prints traceback:
2009-03-17 15:12:31,927 CRIT Traceback (most recent call last):
File
/usr/local/Python-2.6/lib/python2.6/site-packages/supervisor-3.0a6-py2.6.egg/supervisor/xmlrpc.py,
line 367,
Hello there,
I have a problem moving files from my local harddrive to a NFS share
using a Python script.
The script is used to run a model which produces large (~500MB) binary
output files. The model itself is a Fortran program, and I call it from
my script using the line
mattia ger...@gmail.com wrote:
Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto:
mattia ger...@gmail.com wrote:
Hi all, can you tell me why the module urllib.request (py3) add extra
characters (b'fef\r\n and \r\n0\r\n\r\n') in a simple example like the
following and
I like some of the comments: oh come on, you can practically just read it
like it's english and And there's me thinking Python was getting more
popular..., both true.
--
http://mail.python.org/mailman/listinfo/python-list
On 17 Mrz., 16:22, Mudcat mnati...@gmail.com wrote:
On Mar 17, 6:39 am, Kay Schluehr kay.schlu...@gmx.net wrote:
On 16 Mrz., 23:06, Mudcat mnati...@gmail.com wrote:
On Mar 13, 8:37 pm, Christian Heimes li...@cheimes.de wrote:
Chris Rebert wrote:
Haven't used it, butPythonfor
On Fri, 13 Mar 2009 22:10:37 -0700 (PDT), Saurabh nirkh...@gmail.com wrote:
Hi all,
I am an experienced C programmer, I have done some perl code as well.
But while thinking about large programs,I find perl syntax a
hinderance.
I read Eric Raymonds article reagrding python,(http://
hwpus...@yahoo.de wrote:
What I would like is to extend the augmented assignment
and make it easy to understand for naive readers.
Good luck. :)
I hope the following literary definition
is consistent enough to convey the correct meaning:
whenever it is possible, modify the target IN
Laszlo Nagy wrote:
Hi Laszlo,
Just a hunch -- are you leaking file handles and eventually running out?
These file handles are for TCP sockets. They are accept()-ed, used and
then thrown out. I guess after the connection was closed, the file
handle is destroyed automatically. BTW here is the
http://code.activestate.com/recipes/114217/
On Tue, Mar 17, 2009 at 1:38 PM, Saurabh phoneth...@gmail.com wrote:
Heres the reason behind wanting to get chunks at a time.
Im actually retrieving data from a list of RSS Feeds and need to
continuously check for latest posts.
But I dont want to
Jacob Holm j...@improva.dk wrote:
I believe that as soon as the left-hand side stops being a simple
variable and it is used in non-trivial expressions on the right-hand
side, using the keyword would help clarify the intent. What I mean is
that the examples you should be looking at are more
I am using Python 2.5, and I would like to write a decorator (or using
some other elegant, declarative approach) to mangle the name of
function in a class. I would like to be able to have two methods
declared with the same name, but one of them will have a decorator (or
whatever) that will change
Here's an interesting post:
http://mail.python.org/pipermail/python-list/2005-April/317442.html
Thank you. I'll try socket.close() instead of socket.shutdown(). Or
both. :-)
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am new to this newsgroup (and new to Python and PostgreSQL). My
experience (17+ years) has been with Smalltalk (e.g. VAST) and Object
databases (e.g. Versant, OmniBase).
I now have a new project to develop web applications using the latest/
best possible versions of Python (3.x?) with
Adam wrote:
class A(object):
def __init__(self, method, usebar = False):
self.method = method
self.usebar = usebar
def __call__(self):
if self.usebar == True:
mangled_name = _bar_ + self.method
if hasattr(self, mangled_name):
For whatever reason, you're ending up with a lot of open files and/or
sockets
(and/or any other resource based on file descriptors). That results
in new
file descriptors having large values (=1024).
You cannot use select() with such file descriptors. Try poll() instead,
or Twisted. ;)
Poll
On Mar 14, 5:22 am, Matteo tadweles...@gmail.com wrote:
Re-posting in more simple and precise terms from a previous
threadhttp://groups.google.it/group/comp.lang.python/browse_thread/thread/6...
Problem:
SWIG doesn't properly wrap c++ arrays of pointers, therefore when you
try to call a c++
On Tue, 17 Mar 2009 18:03:59 +0100, Laszlo Nagy gand...@shopzeus.com wrote:
For whatever reason, you're ending up with a lot of open files and/or
sockets
(and/or any other resource based on file descriptors). That results in new
file descriptors having large values (=1024).
You cannot use
Thanks, Andrew. I'm trying to accomplish something with a
metaprogramming flavor, where, for the convenience of the programmer
and the clarity of code, I'd like to have a decorator or some other
mechanism do twiddling behind the scenes to make a class do something
it wouldn't normally do.
Here's
hello,
On Tue, 2009-03-17 at 09:46 -0700, Lobo wrote:
Hi,
I am new to this newsgroup (and new to Python and PostgreSQL). My
experience (17+ years) has been with Smalltalk (e.g. VAST) and Object
databases (e.g. Versant, OmniBase).
Welcome to the world of monty pythons,
/\/\/\:
I now have
Lobo wrote:
I now have a new project to develop web applications using the latest/
best possible versions of Python (3.x?) with PostgreSQL (8.x?, with
pgAdmin 1.10?).
You want to use Python 2.5.x (or 2.6 if your framework of choice already
supports it), Postgres 8.3 and have a look at
On Mar 17, 12:20 pm, Adam adam.crossl...@gmail.com wrote:
Thanks, Andrew. I'm trying to accomplish something with a
metaprogramming flavor, where, for the convenience of the programmer
and the clarity of code, I'd like to have a decorator or some other
mechanism do twiddling behind the scenes
ah, ok. then yes, you can do that with decorators. you'd need hash
tables or something similar in a metaclass. then the decorator would take
the given function, stick it in the appropriate hash table, and return a
function that does the dispatch (ie at run time does the lookup from the
hash
Hello,
Could someone suggest a Python library for generating the indicators and
graphs that weather station software typically produces, e.g., similar to
those seen here: http://www.weather-display.com/wdfull.html ... and here:
http://www.weather-display.com/index.php ? I did stumble across
The real problem jelle is the license of OpenCASCADE. My understanding
is that it's not recognized as free by debian because of it's
description.
The phrase You are also obliged to send your modifications of the
original source code (if you have made any) to the Initial Developer
(i.e. Open
On Mon, Mar 16, 2009 at 6:05 PM, robert song robertsong.li...@gmail.com wrote:
Hello, everyone.
python can be debugged with pdb, but if there anyway to get a quick
view of the python execution.
Just like sh -x of bash command.
I didn't find that there is an option of python that can do it.
On Tue, 17 Mar 2009 11:10:36 -0700
Chris Rebert c...@rebertia.com wrote:
I've read the manpage for bash and can find no such -x option listed.
It's an option from sh(1) that bash copies. Check the man page for sh
(1) for a description.
--
D'Arcy J.M. Cain da...@druid.net | Democracy
Il Tue, 17 Mar 2009 15:40:02 +, R. David Murray ha scritto:
mattia ger...@gmail.com wrote:
Il Tue, 17 Mar 2009 10:55:21 +, R. David Murray ha scritto:
mattia ger...@gmail.com wrote:
Hi all, can you tell me why the module urllib.request (py3) add
extra characters (b'fef\r\n and
On Mar 17, 2009, at 12:46 PM, Lobo wrote:
Hi,
I am new to this newsgroup (and new to Python and PostgreSQL). My
experience (17+ years) has been with Smalltalk (e.g. VAST) and Object
databases (e.g. Versant, OmniBase).
I now have a new project to develop web applications using the latest/
On Tue, Mar 17, 2009 at 11:13 AM, D'Arcy J.M. Cain da...@druid.net wrote:
On Tue, 17 Mar 2009 11:10:36 -0700
Chris Rebert c...@rebertia.com wrote:
I've read the manpage for bash and can find no such -x option listed.
It's an option from sh(1) that bash copies. Check the man page for sh
(1)
Luis Zarrabeitia kyrie at uh.cu schrieb:
Works for python2.4 and 2.5 also.
In python3, this should be used instead:
b = iter(a)
c = next(b)
(btw, I love the new sentinel argument for the next function in python3!)
next() doesn't have a sentinel argument. It's iter() which does, and
I am trying to print binary data on screen but I got the following error.
f = open('/home/ehsen/1.mp3','rb')
g = f.read()
print g
Traceback (most recent call last):
File input, line 1, in module
File
/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/py/shell.py,
line 1160, in writeOut
Arg, my apologies, I posted my replies to the wrong group :(
--
R. David Murray http://www.bitdance.com
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 17 Mar 2009 15:17:56 + (UTC), R. David Murray
rdmur...@bitdance.com wrote:
Jean-Paul Calderone exar...@divmod.com wrote:
On Tue, 17 Mar 2009 12:15:23 +0530, Saurabh phoneth...@gmail.com wrote:
This isn't exactly how things work. The server *sends* you bytes. It can
send you a
at bottom
On Mar 17, 12:54 pm, andrew cooke and...@acooke.org wrote:
ah, ok. then yes, you can do that with decorators. you'd need hash
tables or something similar in a metaclass. then the decorator would take
the given function, stick it in the appropriate hash table, and return a
function
Ehsen Siraj wrote:
I am trying to print binary data on screen but I got the following error.
f = open('/home/ehsen/1.mp3','rb')
g = f.read()
print g
[...]
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0:
unexpected code byte
please help me how i fix this thing.
One
Jean-Paul Calderone exar...@divmod.com wrote:
On Tue, 17 Mar 2009 15:17:56 + (UTC), R. David Murray
rdmur...@bitdance.com wrote:
Jean-Paul Calderone exar...@divmod.com wrote:
On Tue, 17 Mar 2009 12:15:23 +0530, Saurabh phoneth...@gmail.com wrote:
This isn't exactly how things work.
On Mar 17, 2:18 am, Peter Otten __pete...@web.de wrote:
Mensanator wrote:
On Mar 16, 1:40 pm, Peter Otten __pete...@web.de wrote:
mattia wrote:
I have 2 lists, like:
l1 = [1,2,3]
l2 = [4,5]
now I want to obtain a this new list:
l = [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
Then
Benjamin Peterson benja...@python.org wrote:
Luis Zarrabeitia kyrie at uh.cu schrieb:
Works for python2.4 and 2.5 also.
In python3, this should be used instead:
b = iter(a)
c = next(b)
(btw, I love the new sentinel argument for the next function in python3!)
next()
On Mar 17, 1:45 pm, Irmen de Jong irmen.nos...@xs4all.nl wrote:
Ehsen Siraj wrote:
I am trying to print binary data on screen but I got the following error.
f = open('/home/ehsen/1.mp3','rb')
g = f.read()
print g
[...]
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in
Chris Rebert c...@rebertia.com writes:
Ah, I should've thought to google for the sh manpage. Locally, man
sh just gives me the bash manpage again which doesn't list -x :-(
Are you sure? On my system the OPTIONS section of bash(1) begins with:
In addition to the single-character shell
On Tue, Mar 17, 2009 at 12:15 PM, Hrvoje Niksic hnik...@xemacs.org wrote:
Chris Rebert c...@rebertia.com writes:
Ah, I should've thought to google for the sh manpage. Locally, man
sh just gives me the bash manpage again which doesn't list -x :-(
Are you sure? On my system the OPTIONS
I'm using the ldap package to connect to an ldap server and run a query.
Very simple code, along these lines:
con = ldap.initialize(uri)
con.simple_bind_s(user, password)
results = con.search_s(group, ldap.SCOPE_SUBTREE, filter, attrs)
for r in results:
# inspect the results
I'm
We the def statement and the lambda expression. We have the class
statement, but is their an expression to create a class?
Or:
def F(): pass
type(F)
type 'function'
# Is to:
F2 = lambda : none
type(F2)
type 'function'
# As
class O(object): pass
type(O)
type 'type'
# is to:
#
On 2009-03-17 16:13, Paddy wrote:
We the def statement and the lambda expression. We have the class
statement, but is their an expression to create a class?
Or:
def F(): pass
type(F)
type 'function'
# Is to:
F2 = lambda : none
type(F2)
type 'function'
# As
class O(object): pass
On Tue, Mar 17, 2009 at 2:24 PM, Robert Kern robert.k...@gmail.com wrote:
On 2009-03-17 16:13, Paddy wrote:
We the def statement and the lambda expression. We have the class
statement, but is their an expression to create a class?
Or:
def F(): pass
type(F)
type 'function'
# Is to:
we have software we are putting into package form. So far, all the
code was in local py files and we imported between the modules as
you'd think. Now with the package (ourpackage) we are addressing
how import affects the importing module.
if ourpackage __init__.py itself does regular imports of
Chris Rebert wrote:
On Tue, Mar 17, 2009 at 2:24 PM, Robert Kern robert.k...@gmail.com wrote:
On 2009-03-17 16:13, Paddy wrote:
We the def statement and the lambda expression. We have the class
statement, but is their an expression to create a class?
Or:
def F(): pass
type(F)
type
Craig Allen wrote:
[...]
Instead, I think we want import package to preserve the sort of
namespace our loose python files provided, so:
import ourpackage
inst = ourpackage.OurClass()
I think the way to do this, and it seems a legit use of a somewhat
dangerous form of import, to in
Mensanator wrote:
Maybe he's looking for the face of Jesus?
or aphex twin
--
http://mail.python.org/mailman/listinfo/python-list
Craig Allen wrote:
we have software we are putting into package form. So far, all the
code was in local py files and we imported between the modules as
you'd think. Now with the package (ourpackage) we are addressing
how import affects the importing module.
if ourpackage __init__.py itself
On Tuesday 17 March 2009 03:17:02 pm R. David Murray wrote:
(btw, I love the new sentinel argument for the next function in
python3!)
next() doesn't have a sentinel argument. It's iter() which does, and
that's in 2.x also.
But it does have a 'default' argument, and you can pass that
I'm an experienced C/Java/Perl developer learning Python.
What's the canonical Python way of implementing this pseudocode?
String buf
File f
while ((buf=f.read(1)).length() 0)
{
do something
}
In other words, I want to read a potentially large file in
Given the following
[cdal...@localhost ~]$ python
Python 2.4.3 (#1, Oct 1 2006, 18:00:19)
[GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2
Type help, copyright, credits or license for more information.
list = [7,8,9]
id(list)
-1209401076
id(list[0])
154303848
id(list[1])
154303836
On Tue, Mar 17, 2009 at 05:04:36PM -0500, Jim Garrison wrote:
What's the canonical Python way of implementing this pseudocode?
String buf
File f
while ((buf=f.read(1)).length() 0)
{
do something
}
That looks more like C than pseudocode to me...
grocery_stocker wrote:
snip
It seems like id(list[some value]) == id(some value).
It might seem that way, but test with other than single-character
strings, eg lists like [7],[8],[9] and try again.
Emile
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 225 matches
Mail list logo