On Aug 26, 10:49 am, ++imanshu [EMAIL PROTECTED] wrote:
Hi,
Wouldn't it be nicer to have 'in' return values (or keys) for both
arrays and dictionaries.
NO!
When you iterate over a list (or even a array) it is the members of
the list in the order they appear that is of interest. When
On Aug 26, 9:47 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 25 Aug 2008 17:04:07 +, Grzegorz Staniak wrote:
On 25.08.2008, Terry Reedy [EMAIL PROTECTED] wroted:
The newish sorted() and reversed() built-ins were meant to complement
list.sort and list.reverse,
[EMAIL PROTECTED] wrote:
I've come to the conclusion that posting about Embedded Python on the
Python forums is a complete waste of time. I hope I can get some
useful insights here.
(just curious, but what are the Python forums? isn't the
newsgroup/mailing list *the* Python forum?)
/F
In a recent experiment I've done this:
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from wsgiref.simple_server import make_server, demo_app
from SocketServer import ThreadingMixIn
# Let's make a WSGI server that can use multiple threads.
class
Gerhard Haring wrote:
Have you actually used this rspec thing in Ruby? I always wonder with
such things.
Same with all the other hyped technologies of yesteryear. Anybody out
there who really uses model-driven development?
-- Gerhard
Two laws are (the) most fundamental in our field.
Owen Zhang wrote:
Can anyone recommand the best performance python xslt library?
lxml. It's based on libxml2/libxslt.
http://codespeak.net/lxml
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
Brandon wrote:
I'm attempting to have a file copied from a menu selection. The menu
already exists, but it won't even create the menu item. If anyone has any
ideas, please let me know.
try cutting down your code to a minimal example that illustrates the
problem, and post that code
Hi all. I am trying to use mailbox module, mbox class like this:
import mailbox
m1 = mailbox.mbox('./ra9ftm2')
But it gives the following:
ra9ftm:/home/ra9ftm/pyemail# python mbox1.py
Traceback (most recent call last):
File mbox1.py, line 2, in ?
m1 = mailbox.mbox('./ra9ftm2')
Marc 'BlackJack' Rintsch wrote:
On Mon, 25 Aug 2008 19:57:06 -0700, alex23 wrote:
On Aug 26, 10:49 am, ++imanshu [EMAIL PROTECTED] wrote:
Wouldn't it be nicer to have 'in' return values (or keys) for
both
arrays and dictionaries. Arrays and Dictionaries looked so similar in
Python
++imanshu wrote:
Wouldn't it be nicer to have 'in' return values (or keys) for both
arrays and dictionaries. Arrays and Dictionaries looked so similar in
Python until I learned this difference.
It's because dealing with keys makes far more sense, since that's how
the dictionary data
Sorry Bruce,
When can I read this PEP ? I'm interesting
Bye
On Mon, Aug 25, 2008 at 7:15 PM, Bruce Frederiksen [EMAIL PROTECTED]wrote:
I wanted to make everybody aware that I've posted a (rather long and
involved) PEP proposal for adding micro-threading to Python on
python-ideas for
ok, may be it is truth, because class UnixMailbox is working. I found
it in Depricated classess and methods in manual :(
here is only version 2.4 in Debian
ra9ftm:
I am using Debian 4.0 Etch for my tests. May be old version of python
in this repository?
--
Hi,
Need some help, I have a list of dictionary as below,
table = [{Part #:Washer,Po #:AE00128,qty:100},
{Part #:Brake Pad,Po #:AE00154,qty:150},
{Part #:Mesh,Po #:AE00025,qty:320},
{Part #:Mouse,Po #:AE00207,qty:120},
{Part #:Insulator,Po #:AE0013,qty:190}]
Adrian Smith wrote:
Can anyone tell me how to get rid of smart quotes in html using
Python? I've tried variations on
stuff = string.replace(stuff, \“, \), but to no avail, presumably
because they're not standard ASCII.
Convert the string to unicode. For that you have to know its encoding. I
Are dictionaries the same as hashtables?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm a newbie and created a new combo box with Tix.
The combo box is filled with the required items.
I've used Tkinter's listbox and used the ListboxSelect event and
bind that with a callback.
Now, I want to do the same stuff with the Tix combo box.
Please suggest how can I do the same in
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list instead of simply overwriting.
PS: your sig was *a bit* longer than you question. please don't do
that...
signature.asc
On Aug 26, 9:43 am, Martin Marcher [EMAIL PROTECTED] wrote:
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list instead of simply overwriting.
PS: your sig was *a bit* longer
Ok. Sorted it out, but only after taking a round trip over
xml.minidom. Here's the working code:
#!/usr/bin/python
from odf.opendocument import Spreadsheet
from odf.opendocument import load
from odf.table import TableRow,TableCell
from odf.text import P
doc = load(/tmp/match_data.ods)
d =
Any ideas why a particular dll won't load on Windows XP Pro using
ctypes? The dll in question is 'librsvg-2-2.dll' (a link if anyone cares to try!!!
http://ftp.gnome.org/pub/gnome/binaries/win32/librsvg/2.22/) The other dlls from the GTK libraries seem to load okay,
so I'm more than puzzled!!
2008/8/26 ajak_yahoo [EMAIL PROTECTED]:
Need some help, I have a list of dictionary as below,
table = [{Part #:Washer,Po #:AE00128,qty:100},
{Part #:Brake Pad,Po #:AE00154,qty:150},
{Part #:Mesh,Po #:AE00025,qty:320},
{Part #:Mouse,Po #:AE00207,qty:120},
David Moss a écrit :
Hi,
I want to manage and control access to several important attributes in
a class and override the behaviour of some of them in various
subclasses.
Below is a stripped version of how I've implemented this in my current
bit of work.
It works well enough, but I can't help
DwBear75 a écrit :
I am considering using python as a replacement for a lot of bash
scripting that I have been doing. I would like to be as cross platform
as possible, writing scripts for both windows and linux. Are there any
guides are general rules of thumb on
1) keeping code os independant
I'm looking for a method to retrieve a Windows Domain name (not a DNS
Domain name).
I know this can be done by simply reading an environment variable,
however on the machines I need to work with sometimes the environment
variables can be messed-up and are not trustworthy.
Is there somebody who
I'm looking for a method to retrieve a Windows Domain name (not a DNS
Domain name).
I know this can be done by simply reading an environment variable,
however on the machines I need to work with sometimes the environment
variables can be messed-up and are not trustworthy.
Is there somebody who
Simon Brunning:
You can indeed use ctypes to modify the value of a string - see
http://tinyurl.com/5hcnwl. You can use it to crash the OS, too.
My advice - don't.
Thanks for the link.
Any advice on what to do or use as an I/O structure for dissemination?
Ken Seehart:
8--- using
Jason Scheirer a écrit :
(snip)
The 5%
of your time when you are doing metaprogramming or other abuses of the
object system are when you use get/setattr.
What makes you label metaprogramming and get/setattr as abuses ???
--
http://mail.python.org/mailman/listinfo/python-list
W. eWatson a écrit :
I have an ordinary text file with a CR at the end of a line, and two
numbers in each line. Is there some way to determine the number of lines
(records) in the file before I begin reading it?
How could you know how many times a given character appears in file
without
W. eWatson a écrit :
Fredrik Lundh wrote:
W. eWatson wrote:
I have an ordinary text file with a CR at the end of a line, and two
numbers in each line. Is there some way to determine the number of
lines (records) in the file before I begin reading it?
In the general case, no. A file is
castironpi a écrit :
On Aug 23, 7:25 pm, Gandalf [EMAIL PROTECTED] wrote:
how can I declare a variable with another variable name?
for example I will use PHP:
$a= hello;
$a_hello=baybay;
print ${'a_'.$a) //output: baybay
how can i do it with no Arrays using python
thanks!
Here's one
MeTheGameMakingGuy a écrit :
On Aug 24, 6:32 pm, Hussein B [EMAIL PROTECTED] wrote:
Hi,
I'm familiar with static method concept, but what is the class method?
how it does differ from static method? when to use it?
--
class M:
def method(cls, x):
pass
method = classmethod(method)
--
Thank
Maric Michaud a écrit :
(snip)
It is a common advice that staticmethod should not exist in python, as they do
nothing compared to module level functions,
They do nothing more, but are accessible thru a class object instead
of being accessible thru a module object. It sometimes happens to be
On Aug 26, 11:52 am, Erik Max Francis [EMAIL PROTECTED] wrote:
++imanshu wrote:
Wouldn't it be nicer to have 'in' return values (or keys) for both
arrays and dictionaries. Arrays and Dictionaries looked so similar in
Python until I learned this difference.
It's because dealing with
Maric Michaud a écrit :
(snip)
i don't get your design, it seems over-complicated to mee at first glance.
aol /
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 26, 5:43 pm, Martin Marcher [EMAIL PROTECTED] wrote:
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list instead of simply overwriting.
Please clarify: (1) Nothing in
Simon Brunning a écrit :
2008/8/26 ajak_yahoo [EMAIL PROTECTED]:
Need some help, I have a list of dictionary as below,
table = [{Part #:Washer,Po #:AE00128,qty:100},
{Part #:Brake Pad,Po #:AE00154,qty:150},
{Part #:Mesh,Po #:AE00025,qty:320},
{Part #:Mouse,Po
Martin Marcher wrote:
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list instead of simply overwriting.
The term collision is rather well defined when talking about associative
why doesn't logging throw any exception when it should? how do I
configure logging to throw exceptions?
try:
... logging.fatal('asdf %d', '123')
... except:
... print 'this line is never printed'
...
Traceback (most recent call last):
File
Hi
I am trying to make a simple Python script using LDAP. The module is
imported OK, but when I call the function open or initialize, I get
this error:
Traceback (most recent call last):
File /home/juan/workspace/amquare/src/nutum/amquare/amquare.py,
line 122, in module
conn.connect()
cnb [EMAIL PROTECTED] writes:
Are dictionaries the same as hashtables?
The 'dict' type in Python has certain behaviour, as specified in the
language reference. In CPython they are implemented as hash tables,
but I don't recall anything that specifies they *must* be implemented
that way.
So my
Fredrik Lundh a écrit :
Bruno Desthuilliers wrote:
Given the lack of proper support for the descriptor protocol in
old-style classes and a couple other diverging behaviors, I wouldn't
say that advising newcomers to use new-style classes is so pointless.
Yeah, but if you don't need
norseman a écrit :
Gregor Horvath wrote:
Hi,
why is this code failing?
class B(object):
pass
B.testattr = property(lambda s:hallo)
b = B()
b.testattr = test
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
/tmp/python-14202ViU.py in module()
14 B.testattr = property(lambda
Gregor Horvath a écrit :
Hi,
why is this code failing?
class B(object):
pass
B.testattr = property(lambda s:hallo)
b = B()
b.testattr = test
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
/tmp/python-14202ViU.py in module()
14 B.testattr = property(lambda s:hallo)
15 b =
Hi,
I'm using the ctypes module to load my dlls.
I have some 10 dlls the names of those are passed to a fucntion which
then loads the passed dll.
Now every dll has a getversion function.
eg: A.dll, B.dll, C.dll are the dlls
and GetVersion functions are as:
A_getVersion(), B_getVersion(),
Hi
I'm working recently with XMLRPC for python and It never was so easy.
But I've meet a obstacle. Because python is not giving us any
reasonable encapsulation mechanism, I have problems with hiding some
part of the implementation.
When class has 2 methods and I want to make rpc private only
Hi,
I work on the python module AVC (http://avc.inrim.it) useful for the
development of applications with GUIs. AVC is based on the property
mechanism: any a variable controlled by AVC is set as a property, so
when it is assigned by the application program, the __set__ function
is called and AVC
Gabriel Genellina:
To avoid altering the equilibrium of the whole universe, use
ctypes.create_string_buffer:
http://python.net/crew/theller/ctypes/tutorial.html#fundamental-data-types
Thanks Gabriel – looks like I really have to spend more time with that
excellent document.
Patrick Maupin:
Hi.
I'm looking for libraries for implementing SOA components (not
necessery web services). Most of the components are not communicating
with the world. Language independence is not very important (Python
is everywhere :). Important requirement is ability to process requests
in parallel, and
Good morning Guys,
I'm running python 2.5 on a Debian based system and I'm looking for your
advice on how to set the locale for my application. I've read through the
locale module documentation http://docs.python.org/lib/module-locale.html
and tried a couple of the examples but can't seem to
++imanshu:
Wouldn't it be nicer to have 'in' return values (or keys) for both
arrays and dictionaries. Arrays and Dictionaries looked so similar in
Python until I learned this difference.
D language works like you say, and it's awful. With a key you can find
its value, but given only the
Fabrizio Pollastri a écrit :
Hi,
I work on the python module AVC (http://avc.inrim.it) useful for the
development of applications with GUIs. AVC is based on the property
mechanism: any a variable controlled by AVC is set as a property, so
when it is assigned by the application program, the
Version 1.2.2 of pygtkmvc has been released.
Project homepage:
http://pygtkmvc.sourceforge.net
Download:
http://sourceforge.net/projects/pygtkmvc/
==
About pygtkmvc
==
pygtkmvc is a fully Python-based implementation of the
Model-View-Controller (MVC) and Observer
x Simple code:
x class RpcClass:
x def one(self): #visible by RPC, available as public for other class
x return one
x def two(self): #INVISIBLE by RPC, available as public for other
x class
x return two
x Server.register_instance(RpcClass())
On Aug 26, 7:36 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Martin Marcher wrote:
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list instead of simply overwriting.
The
HI!
Is there a function in the standard lib which can be used to split a
string containg 'host:port' into a tuple (host,port) and also does this
reliably for IPv6 addresses?
Ciao, Michael.
--
http://mail.python.org/mailman/listinfo/python-list
Juan wrote:
self.conn = ldap.initialize(self.host, self.port)
[..]
LDAPError: (2, 'No such file or directory')
You have to pass in a LDAP URI as documented here:
http://python-ldap.sourceforge.net/doc/html/ldap.html#ldap.initialize
Use of compability function ldap.open() is deprecated
Hi.
I'm migrating a VBScript into python.
How should I convert Date type parameter in VBScript's COM interface
with win32com?
I couldn't find any answer yet...
Thank you in advance.
--
http://mail.python.org/mailman/listinfo/python-list
Alexandru Mosoi napisał(a):
why doesn't logging throw any exception when it should? how do I
configure logging to throw exceptions?
try:
... logging.fatal('asdf %d', '123')
... except:
... print 'this line is never printed'
...
[...]
You need to subclass your handler and redefine
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
AFAIK port names cannot contain any colons, so python2.5's
'host:port' .rsplit(':') should do the job. On 2.5 you probably
need to do something like
s = addr.rindex(':')
host, port = addr[:s], addr[s+1:]
Best,
Manuel
On Aug 26, 2008, at 1:31
Hi all,
I read this interesting post comparing Boost.Python with Pyd:
http://pyd.dsource.org/vsboost.html
What's your opinion about it?
What's your first choice when you have write a C/C++ module for Python?
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
snip
def SomeClass(object):
_gridsize = 0.8
The leading underscore tells callers that they change the attribute at
their own risk.
An even more Pythonic approach is to write your class that makes no
assumptions about gridsize, and thus explicitly supports any
[EMAIL PROTECTED]:
I read this interesting post comparing Boost.Python with Pyd:
http://pyd.dsource.org/vsboost.html
What's your opinion about it?
What's your first choice when you have write a C/C++ module for Python?
That's not exactly a post.
Pyd works well enough, it's easy to use and
Hi,
Thanks for your reply Terry.
I am still not done with this problem. Please tell me can a server send a
list object using socket programming to the requesting client?
If yes, how? I am getting the following error
TypeError: send() argument 1 must be string or read-only buffer,
not
On Aug 26, 4:04 pm, ++imanshu [EMAIL PROTECTED] wrote:
On Aug 26, 11:52 am, Erik Max Francis [EMAIL PROTECTED] wrote:
++imanshu wrote:
Wouldn't it be nicer to have 'in' return values (or keys) for both
arrays and dictionaries. Arrays and Dictionaries looked so similar in
Python
On Tue, 26 Aug 2008 18:18:53 +0530
Piyush Chechani [EMAIL PROTECTED] wrote:
Please suggest how to share a in-memory list object across two different
programs?
Perhaps you want to investigate XML-RPC. Check the docs for some
example scripts for both client and server.
P.S. Please drop the
On Aug 23, 6:12 am, W. eWatson [EMAIL PROTECTED] wrote:
The other night I surveyed a site for astronomical use by measuring the
altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees north
clockwise around the site to 360 degrees, almost north again) of obstacles,
trees. My
Steven D'Aprano a écrit :
(snip)
But it's quite rare to see double-underscore really private attributes
in Python code. It is considered to go against the spirit of the language.
Not necessarily against the spirit - it's mostly than __name_mangling
is only really useful when you want to
Without reading your post properly or having tried to do the same thing
myself: I think you might want to have a look at ipython; it gives a better
REPL and embedding ipython should give you plenty of hits as well.
Matthew Fitzgibbons [EMAIL PROTECTED] writes:
I've got a pretty complex
La verdad
que me da un poco de vergüenza pero bueno no se como colaborar con la
comunidad
python entonces empecé hacer conjunto de entradas en mi blog para
todos aquellos que recién se inician en python.Aun no llegue
a explicar objetos pero estaría bueno que me digan si voy por buen
camino :-).
On Tue, 26 Aug 2008 08:20:44 +0200, Fredrik Lundh
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
I've come to the conclusion that posting about Embedded Python on the
Python forums is a complete waste of time. I hope I can get some
useful insights here.
(just curious, but what are the
On Tue, Aug 26, 2008 at 9:52 AM, cnb [EMAIL PROTECTED] wrote:
On Aug 26, 9:43 am, Martin Marcher [EMAIL PROTECTED] wrote:
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list
Hi !
I want use many comands in same python script .
I want to use openoffice and pyuno .
I try this
cmdoo=openoffice.org -accept='socket,host=localhost,port=2002;urp;'
subprocess.call(cmdoo, shell=True)
but i need to execute another comand and need to stop subprocess
Thank you !
--
Hello Everyone
It's my very first email to this group. i am a beginner programmer of
python. it it possible to build Desktop application using python.
Which IDE should i use for this purpose? I will be glad if anyone can
give link of python ebook.
Thanks in Advance
Zamil
--
how can i do an atomic read+increment? something like
with lock:
old = atomic_int
atomic_int += 1
but in one operation
--
http://mail.python.org/mailman/listinfo/python-list
On 26/08/2008, Tim Grove [EMAIL PROTECTED] wrote:
Any ideas why a particular dll won't load on Windows XP Pro using
ctypes?
I'm going to take a stab in the dark here and suggest it's because you
have multiple (different) copies of iconv.dll on your PATH.
Hi...
I'm using quick test with libxml2dom
===
import libxml2dom
aa=libxml2dom.parseString(foo)
ff=libxml2dom.toString(aa)
print ff
===
--
when i start, foo is:
html
body
/body
/html
html
body
.
.
.
/body
/html
Hi,
I have searched the online manuals, faqs and forums, but i haven't
found a satisfactory explanation ... most probably my fault ;)
I have found 2 projects, one commercial and another free, that deal
with the installation and running of python code on portable/removable
devices, my questions
On 26 Aug, 17:28, bruce [EMAIL PROTECTED] wrote:
so it's as if the parseString only reads the initial html tree. i've
reviewed as much as i can find regarding libxml2dom to try to figure out how
i can get it to read/parse/handle both html trees/nodes.
Maybe there's some possibility to have
Alexandru Mosoi wrote:
how can i do an atomic read+increment? something like
with lock:
old = atomic_int
atomic_int += 1
but in one operation
As above - the lock (under the assumption that it is actually a
threading.Lock) will ensure that.
Diez
--
bruce wrote:
I'm using quick test with libxml2dom
===
import libxml2dom
aa=libxml2dom.parseString(foo)
ff=libxml2dom.toString(aa)
print ff
===
--
when i start, foo is:
html
body
/body
/html
html
body
.
.
.
/body
luismi wrote:
I have searched the online manuals, faqs and forums, but i haven't
found a satisfactory explanation ... most probably my fault ;)
I have found 2 projects, one commercial and another free, that deal
with the installation and running of python code on portable/removable
devices, my
In article [EMAIL PROTECTED],
Diez B. Roggisch [EMAIL PROTECTED] wrote:
Martin Marcher wrote:
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
.
.
.
Python does not have a one key maps to a list
Martin Marcher wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list instead of simply overwriting.
are you sure you know what collision handling means in this context?
/F
--
Ok, below is a portion of the code that first (near as I can tell because I
had nothign to do with desgining the program) sets up the menu
(setupMenuBar) and then adds the commands to be used with the items:
def setupMenuBar(self):
menubar = self.menuBar()
file_ =
zamil was kind enough to say:
[cut]
If your needs are very basic, you can stick with the tk module that comes
with python. It's not really feature-packed, but it's maintained and pretty
cross-platform.
Otherwise, you can pick any supported widget set you like and use the
proper python bindings.
一首诗 wrote:
I read this interesting post comparing Boost.Python with Pyd:
http://pyd.dsource.org/vsboost.html
What's your opinion about it?
What's your first choice when you have write a C/C++ module for Python?
There is no such thing as a C/C++ language. Seriously, both are really
Diez B. Roggisch wrote:
I don't know the exact names of the involved structures - I named them
liberally from my understanding of how associative arrays based on hashing
are implemented. But the below code shows that hash-collisions can occur
without corrupting data
Cameron Laird wrote:
In article [EMAIL PROTECTED],
Diez B. Roggisch [EMAIL PROTECTED] wrote:
Martin Marcher wrote:
On 2008-08-26 00:32:20, cnb wrote:
Are dictionaries the same as hashtables?
.
.
.
Python does not have a one key maps to a list of values-semantics -
which I consider the
What's the best Python idiom for this C construct?
while ((x = next()) != END) {
}
Now I'm doing
x = next()
while x != END:
x = next()
There's not an iterator for this function, or I would
just use
for x in ...
Many TIA!
Mark
--
Mark
Greetings all,
I'm wanting to maintain what values in one file and call them in
another. The purpose being to keep a single location where url's,
login's and passwords can be maintained, then called as needed from
another file.
In file #1 I have...
import time
import os
import sys
url =
Hi I have done this without error
:D
Yield returns the result I am looking for... however it does not
continue looping. It does the same thing as return would
any suggestions
my code is as follows
serveraddr = ('', )
srvr = ThreadingServer(serveraddr, SimpleXMLRPCRequestHandler,
Alexander Schmolck wrote:
Without reading your post properly or having tried to do the same thing
myself: I think you might want to have a look at ipython; it gives a better
REPL and embedding ipython should give you plenty of hits as well.
Thanks for the tip; I hadn't heard of ipython
On Tue, 26 Aug 2008 16:42:30 GMT, [EMAIL PROTECTED] wrote:
What's the best Python idiom for this C construct?
while ((x = next()) != END) {
}
Now I'm doing
x = next()
while x != END:
x = next()
There's not an iterator for this function, or I would
Is the loginout file named loginout.py ? It needs to be for the
import to work. If the import works, you have to refer to those
variables within the right namespace, ie : loginout.url,
loginout.adminlogin, etc.
On Tue, Aug 26, 2008 at 12:46 PM, frankrentef [EMAIL PROTECTED] wrote:
On Tue, Aug 26, 2008 at 11:12 AM, Fredrik Lundh [EMAIL PROTECTED] wrote:
Martin Marcher wrote:
Are dictionaries the same as hashtables?
Yes, but there is nothing in there that does sane collision handling
like making a list instead of simply overwriting.
are you sure you know what
frankentux wrote:
Ok. Sorted it out, but only after taking a round trip over
xml.minidom. Here's the working code:
#!/usr/bin/python
from odf.opendocument import Spreadsheet
from odf.opendocument import load
from odf.table import TableRow,TableCell
from odf.text import P
doc =
[EMAIL PROTECTED] wrote:
What's the best Python idiom for this C construct?
while ((x = next()) != END) {
}
iter is your friend:
for x in iter(next, END):
...
details:
help(iter)
Help on built-in function iter in module __builtin__:
iter(...)
hi all,
i have a list, for example;
L=[]
L.append('10')
L.append('15')
L.append('20')
len(L)
3
print L
['10', '15', '20']
is there a way to sum up all the numbers in a list? the number of objects
in the list is vary, around 50 to 60. all objects are 1 to 3 digit positive
numbers.
all i
Andrew wrote:
Yield returns the result I am looking for... however it does not
continue looping. It does the same thing as return would
the XML-RPC protocol doesn't really support your use case; for each
call, the client issues a complete request package, and the server
produces a complete
I want to read from text file, 25 lines each time i press enter key,
just like the python documentation.
i`m using Python 2.5, Windows XP
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 259 matches
Mail list logo