I think bearophile makes an excellent point. I also have a hard time
remembering what else does.
I have always pictured that the "normal" behavior of a for loop is to get
through all the items. In special circumstances, it is necessary to break
out early. Therefore, it FEELS like the else loop shou
Gary Herron wrote:
> Gerard Brunick wrote:
>> I really don't understand the following behavior:
>>
>> >>> class C(object):
>> ... def __init__(self, s): self.s = s
>> ... def __str__(self): return self.s
>> ...
>> >>> cafe = unicode("Caf\xe9", "Latin-1")
>> >>> c = C(cafe)
>> >>> print
On Mar 5, 11:27 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Mar 5, 2:25 pm, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi All
>
> > Is there a simple way to twiddle the bits of a float? In particular, I
> > would like to round my float to the n most significant bits.
>
> > For exampl
On 06/03/2008, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Mar 5, 7:24 pm, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
>
> > Steven D'Aprano wrote:
> > > Surely it would depend on the type of text: pick up any random English
> > > novel containing dialogue, and you're likely to find a couple of dozen
Hello
can u plz tell how to send and read msg from device(telit-863-GPS) and
the coding is in python.
if this can happen then plz send the source code to my mail account
--
http://mail.python.org/mailman/listinfo/python-list
> I accept my question about classes being singletons is not well-formed,
> not even in my own mind. I guess one way of asking is, for any two class
> objects (not instances) C1 and C2, does "C1 == C2" imply "C1 is C2"?
C and D are instances of metaC in that.
class metaC( type ):
def what( self
> > Where to begin?
>
> What does exec( open( 'modA.py' ).read() ) do?
The most appropriate list to ask those questions is:
http://mail.python.org/mailman/listinfo/tutor
--
http://mail.python.org/mailman/listinfo/python-list
> > *plonk*
>
> > key is an iterable, just like the constructors to
> > other collection.
>
> Um... "*plonk*" is the (imaginary) sound made by dropping someone into
> your plonkfile (killfile, scorefile, whatever): the action of setting
> your newsreader to ignore someone you perceive to be a trol
On Mar 5, 8:06 pm, [EMAIL PROTECTED] wrote:
> On Mar 5, 4:25 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> > > Classes and modules are really similar. In Python they're really
> > > *really* similar.
>
> > Yes they
Dennis Lee Bieber wrote:
> On Wed, 05 Mar 2008 08:26:04 -0800, Jeff Schwab <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> Which is which? Aren't those both part of the space vehicle? Btw, do
>> you work for government or industry? Do you enjoy working with the
>> spa
[EMAIL PROTECTED] writes:
> On Mar 5, 8:03 pm, [EMAIL PROTECTED] wrote:
>> On Mar 5, 5:31 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
>>
>> > On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> > > Anyway, if (a,b) is a key in dictionary d, can it guarantee
>> > > that (b,a) is also in
On Mar 5, 9:51 pm, [EMAIL PROTECTED] wrote:
> > > > If I understand your question, classes are not singletons:
> > > ll=[]
> > > for i in range(2):
> > > > import string
> > > > ll[i]=string
>
> > > Where's the IndexError? :-)
>
> > > I accept my question about classes being singletons
On Mar 5, 8:03 pm, [EMAIL PROTECTED] wrote:
> On Mar 5, 5:31 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
>
> > On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > Anyway, if (a,b) is a key in dictionary d, can it guarantee
> > > that (b,a) is also in it, and maps to the same object?
On 5 Mrz., 13:47, gideon <[EMAIL PROTECTED]> wrote:
> Hi Everybody,
>
> In the context of a master's thesis I'm currently looking into
> Python's operational semantics. Even after extensive searching on the
> web, I have not found any formal model of Python. Therefore I am
> considering to write on
> > > If I understand your question, classes are not singletons:
> > ll=[]
> > for i in range(2):
> > > import string
> > > ll[i]=string
>
> > Where's the IndexError? :-)
>
> > I accept my question about classes being singletons is not well-formed,
> > not even in my own mind. I guess o
On Mar 5, 8:31 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 21:05:31 -0500, Terry Reedy wrote:
> > If I understand your question, classes are not singletons:
> ll=[]
> for i in range(2):
> > import string
> > ll[i]=string
>
> Where's the IndexE
On Mar 5, 6:09 pm, sambo q <[EMAIL PROTECTED]> wrote:
> I got myself in jam trying to be too fancy with threading.Thread
> Docs say / remind to call the base __init__
> but I can't fighure out how.
>
> ---
> def main()
> .
> ls.listen(5)
> key = ' '
> # while
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> I recall that Python guarantees that module objects are singletons, and
> that this must hold for any implementation, not just CPython: you can
> only ever create one instance of a module via the import mechanism. But
> my google-foo is obviously we
On Mar 5, 6:09 pm, sambo q <[EMAIL PROTECTED]> wrote:
> I got myself in jam trying to be too fancy with threading.Thread
> Docs say / remind to call the base __init__
> but I can't fighure out how.
>
> ---
> def main()
> .
> ls.listen(5)
> key = ' '
> # while
On Mar 5, 7:24 pm, Matt Nordhoff <[EMAIL PROTECTED]> wrote:
> Steven D'Aprano wrote:
> > Surely it would depend on the type of text: pick up any random English
> > novel containing dialogue, and you're likely to find a couple of dozen
> > pairs of quotation marks per page, against a few apostrophes
On Wed, 05 Mar 2008 21:05:31 -0500, Terry Reedy wrote:
> If I understand your question, classes are not singletons:
ll=[]
for i in range(2):
> import string
> ll[i]=string
Where's the IndexError? :-)
ll[0] is ll[1]
> True
But yes, modules are singletons in that way, at least i
On Mar 5, 6:40 pm, [EMAIL PROTECTED] wrote:
> Troels Thomsen:
>
> > The discussion of words is silly. My surprise about "else following a for
> > loop what the heck " lasted excactly as long as it takes to read
> > this sentence.
>
> Maybe I don't follow what you are saying, but well chosen
On Mar 5, 4:25 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> > Classes and modules are really similar. In Python they're really
> > *really* similar.
>
> Yes they are.
>
> Both are namespaces. The very last line of the Z
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|I recall that Python guarantees that module objects are singletons, and
| that this must hold for any implementation, not just CPython: you can
| only ever create one instance of a module via the import mechanism. But
On Mar 5, 5:31 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Anyway, if (a,b) is a key in dictionary d, can it guarantee
> > that (b,a) is also in it, and maps to the same object?
Er... -specialized- dictionary d.
> To solve that pr
> On Behalf Of Monica Leko
> Does Python has some testing frameworks for testing Web
> applications (like Cactus and HttpUnit for Java), generating
> requests and checking if the response is correct?
I have got a lot of traction using mechanize [1] with nose [2]. Of course
that still leaves out
I recall that Python guarantees that module objects are singletons, and
that this must hold for any implementation, not just CPython: you can
only ever create one instance of a module via the import mechanism. But
my google-foo is obviously weak today, I cannot find where the Python
language re
Steven D'Aprano wrote:
> Surely it would depend on the type of text: pick up any random English
> novel containing dialogue, and you're likely to find a couple of dozen
> pairs of quotation marks per page, against a few apostrophes.
That's an idea... Write a novel in Python docstrings.
Someone
On Thu, 06 Mar 2008 09:36:29 +1100
Ben Finney <[EMAIL PROTECTED]> wrote:
> > Those of us who identify the time wasters would also like to drop
> > the responses to their posts and changing the address makes this
> > impossible.
>
> Not at all. AFAIK the messages from Google mail correctly include
I just realized that I could do this as follows:
static PyObject* GetByteBuffer(PyObject* self, PyObject* args)
{
char byteBuffer[100];
// do something to fill byteBuffer with values.
return Py_BuildValue("s#", byteBuffer, numberOfBytesToReturn);
}
Sorry for the unnecessary distract
On Wed, 5 Mar 2008 14:00:17 -0800 (PST)
Mike Driscoll <[EMAIL PROTECTED]> wrote:
> What are you talking about? I didn't change the address at all. I'm
> not even sure what you mean. Are you talking about the post subject
> line (which I have never touched in any post)? If you're talking about
> the
Would anybody explain to me what needs to be done to have a DB-API 2.0
layer for this ?
And how many lines of code we are talking ?
http://httpd.apache.org/docs/2.2/mod/mod_dbd.html
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am new to Python programming. So, kindly excuse me if I don't use
correct terminology here below.
I am trying to write an extension function that returns an array of
bytes as shown in the example below:
static PyObject* GetByteBuffer(PyObject* self, PyObject* args)
{
char byteBuff
Troels Thomsen:
> The discussion of words is silly. My surprise about "else following a for
> loop what the heck " lasted excactly as long as it takes to read
> this sentence.
Maybe I don't follow what you are saying, but well chosen words are a
very important part of a well designed API.
Michael Wieher wrote:
> Hello,
>
> I'm trying to design a python-based web-app from scratch, based on a
> standalone MFC application.
> Obviously I'll be wrapping a lot of C++ functionality in custom
> extensions, but is anyone aware of any documentation/techniques that
> could help me "drop" a
On Mar 5, 10:44 pm, "Troels Thomsen" wrote:
> > The primary use case is searching a container:
>
> > prep_tasks()
> > for item in container:
> > if predicate(item):
> > found_tasks()
> > break
> > else:
> > not_found_tasks()
> > follow_up_tasks
>
> I've foun
Apologies for any multiple copies received. We would appreciate it if
you could distribute
the following call for papers to any relevant mailing lists you know
of.
2nd CALL FOR PAPERS
===
Special
I got myself in jam trying to be too fancy with threading.Thread
Docs say / remind to call the base __init__
but I can't fighure out how.
---
def main()
.
ls.listen(5)
key = ' '
#while key != EXITCHARCTER:
while stop_serving == False:
cs, raddr
On Wed, 05 Mar 2008 23:27:21 +, Matthew Woodcraft wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>>On Wed, 05 Mar 2008 19:19:08 +, Matthew Woodcraft wrote:
>>> One advantage is that a dumb syntax highlighter is more likely to cope
>>> well if the content includes an apostrophe.
>
>>
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>On Wed, 05 Mar 2008 19:19:08 +, Matthew Woodcraft wrote:
>> One advantage is that a dumb syntax highlighter is more likely to cope
>> well if the content includes an apostrophe.
> But if the content contains double-quote marks, the "dumb syntax
> h
On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Are you vegetarian?
Some days.
> A little off topic.
Ya think?
> Anyway, if (a,b) is a key in dictionary d, can it guarantee
> that (b,a) is also in it, and maps to the same object?
Do you not know how to run the Python interpreter
On Wed, 05 Mar 2008 14:51:04 -0800, castironpi wrote:
> Anyway, if (a,b) is a key in dictionary d, can it guarantee that (b,a)
> is also in it, and maps to the same object?
It would take you approximately five seconds to answer that question for
yourself.
>>> D = {(1,2): "x"}
>>> D[(2,1)]
Trace
2008/3/5, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> ...
> Anyway, if (a,b) is a key in dictionary d, can it guarantee that (b,a)
> is also in it, and maps to the same object?
> ...
>
Well, it's probably not the most effective way, but one can use something
like:
>>> d={frozenset(("a","b")):7}
>>
Hi,
Is there a way to get the System32 directory from windows through python?
For example, in C++ you do this by calling GetSystemDirectory(). Is there an
equivalent Python function for obtaining windows installation dependent
paths?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 4:00 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I want to hash values to keys. How do the alternatives compare?
>
> http://catb.org/~esr/faqs/smart-questions.html
>
> >>> ... without extending the whole way to
"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes:
> On Wed, 5 Mar 2008 13:38:59 -0800 (PST)
> Mike Driscoll <[EMAIL PROTECTED]> wrote:
> > On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
>
> I'm not sure why you change the address like this but could you
> please include the full address.
It's a misfe
On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> Classes and modules are really similar. In Python they're really
> *really* similar.
Yes they are.
Both are namespaces. The very last line of the Zen of Python says:
>>> import this
...
Namespaces are one honking great idea -- let's do mo
[EMAIL PROTECTED] schrieb:
> On Mar 5, 3:38 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
>>> On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] schrieb:
> I want to hash values t
On Mar 5, 3:58 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 10:50:12 -0800, castironpi wrote:
> > What is a class that is not a module?
>
> Er, all of them?
>
> I'm curious what classes you think are modules.
>
> --
> Steven
Thank you for your time in ent
On Mar 5, 3:49 pm, [EMAIL PROTECTED] wrote:
>
> Classes and modules are really similar. In Python they're really
> *really* similar.
>
> Actually, at this point, that observation may have more of a
> subjective component than I'm used to asserting. I pause here for
> corroboration and others' per
On Wed, 05 Mar 2008 13:52:38 -0800, castironpi wrote:
> On Mar 5, 3:38 pm, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
>> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> >> [EMAIL PROTECTED] schrieb:
You import classes from modules.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 3:38 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] schrieb:
>
> >> > I want to hash values to keys. How do the alternati
On Mar 5, 3:34 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Mar 5, 9:29 am, Nanjundi <[EMAIL PROTECTED]> wrote:
>
> > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote:
>
> > > On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote:
>
> > > > Does seeding ( random.seed ) random with time fi
On Wed, 05 Mar 2008 11:09:28 -0800, castironpi wrote:
> On another note, why do people X, Y, and Z, including me, all hate to
> write a= b(); if a: a.something()?
Is this a guessing game? You want us to guess why YOU hate to do
something? Okay, I'm game for guessing games...
You were traumatiz
On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I want to hash values to keys. How do the alternatives compare?
>>
http://catb.org/~esr/faqs/smart-questions.html
>>
>>> ... without extending the whole way to a full relational database?
>>
>> You didn't bother following the l
On Mar 5, 3:51 pm, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote:
> On Wed, 5 Mar 2008 13:38:59 -0800 (PST)
>
> Mike Driscoll <[EMAIL PROTECTED]> wrote:
> > On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
>
> I'm not sure why you change the address like this but could you please
> include the full addr
On Wed, 05 Mar 2008 19:19:08 +, Matthew Woodcraft wrote:
> <[EMAIL PROTECTED]> wrote:
>> Why is """ the preferred delimiter for multi-line strings?
>
> One advantage is that a dumb syntax highlighter is more likely to cope
> well if the content includes an apostrophe.
But if the content cont
On Wed, 05 Mar 2008 10:50:12 -0800, castironpi wrote:
> What is a class that is not a module?
Er, all of them?
I'm curious what classes you think are modules.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 3:38 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] schrieb:
>
> >> > I want to hash values to keys. How do the alternati
On Wed, 5 Mar 2008 13:38:59 -0800 (PST)
Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
I'm not sure why you change the address like this but could you please
include the full address. Those of us who identify the time wasters
would also like to drop the re
> > > > What is a class that is not a module?
>
> > I'm willing to address convention, in serial or parallel--- (change
> > subject to 'what goes on newsgroups'?), but it's not clear from fact
> > what assumption who has made.
>
> Since you did not elaborate on what your efforts were and the extent
>
> The primary use case is searching a container:
>
> prep_tasks()
> for item in container:
> if predicate(item):
> found_tasks()
> break
> else:
> not_found_tasks()
> follow_up_tasks
>
I've found myself mimicing this again and again in c, and was pleased
On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
> What is a class that is not a module?
Why is a raven like a writing desk?
As for Python class information, I would recommend reading the
following sites:
http://docs.python.org/tut/node11.html
http://www.diveintopython.org/object_oriented_framework/
On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
> On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] schrieb:
>>
>> > I want to hash values to keys. How do the alternatives compare?
>>
>> http://catb.org/~esr/faqs/smart-questions.html
>
> ... without exte
On Mar 5, 2:25 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi All
>
> Is there a simple way to twiddle the bits of a float? In particular, I
> would like to round my float to the n most significant bits.
>
> For example - 0.123 in binary is 0.00011
> Rounding to 4 bits I get 0.0001.
>
"Marcelo de Moraes Serpa" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| I'd like a certain function to generate a method for another class and
this
| new method to be called in the context of the "new" class. Is it possible
| with Python?
Yes.
(Assuming I understand your questi
On Mar 5, 2:04 pm, [EMAIL PROTECTED] wrote:
> On Mar 5, 1:29 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
>
> > On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
>
> > > What is a class that is not a module?
>
> > Please stop posting these one-liner beginner questions. If you can
> > type it in one line
On Mar 5, 3:25 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I can pack and unpack a float into a long
> e.g.
> struct.unpack('I',struct.pack('f',0.123))[0]
> but then I'm not sure how to work with the resulting long.
>
> Any suggestions?
One alternative to using struct is to use math.ldexp
On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> thanks for the reply but I'm still unsure as to how to
> continue. Using the bitwise operators will help me deal with
> integers but I really want to work with floats.
In your original post, you said that you've got the values as
integ
On Mar 5, 10:48 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-03-05, Grant Edwards <[EMAIL PROTECTED]> wrote:
>
> > On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >> Any suggestions?
>
> > Just use the bitwise and/or/not operators: & | ~
>
> Oh, I forgot to mention the shift
On 2008-03-05, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Any suggestions?
>
> Just use the bitwise and/or/not operators: & | ~
Oh, I forgot to mention the shift operators << and >>
--
Grant Edwards grante
On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Is there a simple way to twiddle the bits of a float? In particular, I
> would like to round my float to the n most significant bits.
>
> For example - 0.123 in binary is 0.00011
> Rounding to 4 bits I get 0.0001.
>
> I can pack and
On Mar 5, 9:29 am, Nanjundi <[EMAIL PROTECTED]> wrote:
> On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote:
>
> > On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote:
>
> > > Does seeding ( random.seed ) random with time fix this? It should.
>
> > I suppose that depends on how long it take
gideon <[EMAIL PROTECTED]> wrote:
> In the context of a master's thesis I'm currently looking into
> Python's operational semantics. Even after extensive searching on the
> web, I have not found any formal model of Python. Therefore I am
> considering to write one myself. To make a more informed d
Hi All
Is there a simple way to twiddle the bits of a float? In particular, I
would like to round my float to the n most significant bits.
For example - 0.123 in binary is 0.00011
Rounding to 4 bits I get 0.0001.
I can pack and unpack a float into a long
e.g.
struct.unpack('I',struct.pack('f
I'd like a certain function to generate a method for another class and this
new method to be called in the context of the "new" class. Is it possible
with Python?
Thanks,
Marcelo.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
> > I want to hash values to keys. How do the alternatives compare?
>
> http://catb.org/~esr/faqs/smart-questions.html
... without extending the whole way to a full relational database?
--
http://mail
On Mar 5, 1:29 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
>
> > What is a class that is not a module?
>
> Please stop posting these one-liner beginner questions. If you can
> type it in one line, you can enter it on the Google.com or Ask.com
> query
gideon <[EMAIL PROTECTED]> writes:
> In the context of a master's thesis I'm currently looking into
> Python's operational semantics. Even after extensive searching on the
> web, I have not found any formal model of Python. Therefore I am
> considering to write one myself.
I doubt if anything ser
I am using Python in an application that cannot depend on an existing
Python installation or require Python to
be installed. The application itself should not have an install
procedure, but rather should be runnable from any
location in the file system.
Ideally I would prefer not to embed at all,
On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
> What is a class that is not a module?
Please stop posting these one-liner beginner questions. If you can
type it in one line, you can enter it on the Google.com or Ask.com
query page and get a wealth of *existing* information, from tutorials,
documen
<[EMAIL PROTECTED]> wrote:
> Why is """ the preferred delimiter for multi-line strings?
One advantage is that a dumb syntax highlighter is more likely to cope
well if the content includes an apostrophe.
-M-
--
http://mail.python.org/mailman/listinfo/python-list
Python 3.0 might end up better, but converting all those scripts will
be a chore.
I'd be curious to know how that will be done.
--
http://mail.python.org/mailman/listinfo/python-list
I came across this post on the net and wanted to know what was meant
by down-level module.
So, how can we change the User-Agent? If we don't want to change the
headers using a lower-level module such as httplib, the solution is
quite easy
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> I want to hash values to keys. How do the alternatives compare?
http://catb.org/~esr/faqs/smart-questions.html
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 6:12 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > if (match = re.search('(\w+)\s*(\w+)', foo)):
>
> Caveat #1: use a raw string here
> Caveat #2: inline assignment is verboten
>
> match = re.search(r'(\w+)\s*(\w*+)', foo)
> if match:
>
> > field1 = match.group(1)
> > field
I want to hash values to keys. How do the alternatives compare?
--
http://mail.python.org/mailman/listinfo/python-list
What is a class that is not a module?
--
http://mail.python.org/mailman/listinfo/python-list
Gerard Brunick wrote:
> I really don't understand the following behavior:
>
> >>> class C(object):
> ... def __init__(self, s): self.s = s
> ... def __str__(self): return self.s
> ...
> >>> cafe = unicode("Caf\xe9", "Latin-1")
> >>> c = C(cafe)
> >>> print "Print using c.s:", c.s
> Prin
I really don't understand the following behavior:
>>> class C(object):
... def __init__(self, s): self.s = s
... def __str__(self): return self.s
...
>>> cafe = unicode("Caf\xe9", "Latin-1")
>>> c = C(cafe)
>>> print "Print using c.s:", c.s
Print using c.s: Café
>>> print "Print using
[EMAIL PROTECTED] wrote:
> It includes three corrections to grammar.txt (imagnumber, xor_expr and
> and_expr) that I've reported.
Make that four corrections. Add augop.
--
http://mail.python.org/mailman/listinfo/python-list
D'Arcy J.M. Cain wrote:
> Where did you see that? The only place I saw it was the style guide
> and it was only talking about docstrings.
PEP 8 and 257, and you're right, they are both about docstrings.
Also, I'd never seen an example of the triple apostrophe form until I
dove
into the formal
Dennis Lee Bieber wrote:
> On Tue, 4 Mar 2008 20:06:38 -0500, Tommy Grav <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
>> SV = "Svar" is the Norwegian word for Reply.
>>
> Ah, good... In my working life, "SV" => "Space Vehicle", often used
> to differentiate between th
> Because it is NOT 0x10007... It is OCTAL 010007 -- which just
> happens to map to hexadecimal 0x1007
> --
> WulfraedDennis Lee Bieber KD6MOG
> [EMAIL PROTECTED] [EMAIL PROTECTED]
> HTTP://wlfraed.home.netcom.com/
>
Hello,
I'm trying to design a python-based web-app from scratch, based on a
standalone MFC application.
Obviously I'll be wrapping a lot of C++ functionality in custom extensions,
but is anyone aware of any documentation/techniques that could help me
"drop" an ActiveX control into a webpage, and j
Monica Leko wrote:
> Hi!
>
> Does Python has some testing frameworks for testing Web applications
> (like Cactus and HttpUnit for Java), generating requests and checking
> if the response is correct?
mechanize and webunit come to my mind.
Yet the most powerful will be selenium together with sel
Hello Rod,
> I have a set of CGI scripts set up and in one page (which is stored in
> an HTML file then printed via a python CGI) there is an image. However
> the image never displays, can anyone recommend a way round this
> problem?
We need more information, can you post a code snippet? error pag
On 5 Mar 2008 07:36:37 -0800, Aahz <[EMAIL PROTECTED]> wrote:
> For anyone who hasn't heard, E. Gary Gygax died yesterday. Some people
> think we should build a tomb in his honor. ;-)
Yeah, I just saw a tribute on Order of the Stick:
http://www.giantitp.com/comics/oots0536.html
--
http://mail
Hi!
Does Python has some testing frameworks for testing Web applications
(like Cactus and HttpUnit for Java), generating requests and checking
if the response is correct?
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 124 matches
Mail list logo