[EMAIL PROTECTED] a écrit :
(snip)
>
> That reminds me: Is there a generic 'relation' pattern/recipie, such
> as finding a computer that's "paired" with multiple users, each of who
> are "paired" with multiple computers, without maintaining dual-
> associativity?
>
Yes : use a relational databas
On 5 Mar, 06:12, Michael Torrie <[EMAIL PROTECTED]> wrote:
> Does anyone have any recommended ideas/ways of implementing a proper
> control and status protocol for communicating with threads? I have a
> program that spawns a few worker threads, and I'd like a good, clean way
> of communicating the
Hello!
Here's my implementation of a function that executes some command and
drains stdout/stderr invoking other functions for every line of
command output:
def __execute2_drain_pipe(queue, pipe):
for line in pipe:
queue.put(line)
return
def execute2(command, out_f
On 5 Mar, 10:33, "Dmitry Teslenko" <[EMAIL PROTECTED]> wrote:
> Hello!
> Here's my implementation of a function that executes some command and
> drains stdout/stderr invoking other functions for every line of
> command output:
>
> def __execute2_drain_pipe(queue, pipe):
> for line in pipe:
Hi,
can anyone help me with MySQL.
I've got Mac OSX Leopard and I'm trying to install MySQLdb for
Python.
I'm running build and it goes withous any errors and install.
But when I'm typing : import MySQLdb in IDLE I've got this:
Traceback (most recent call last):
File "", line 1, in
impor
I seem to fall into this trap (maybe my Perl background) where I want
to simultaneously test a regular expression and then extract its match
groups in the same action. For instance:
if (match = re.search('(\w+)\s*(\w+)', foo)):
field1 = match.group(1)
field2 = match.group(2)
...
(com
On Wed, Mar 5, 2008 at 1:34 PM, <[EMAIL PROTECTED]> wrote:
> The Queue.get method by default is blocking. The documentation is not
> 100% clear about that (maybe it should report
> the full python definition of the function parameters, which makes
> self-evident the default value) but if you d
Michael Torrie <[EMAIL PROTECTED]> wrote:
>I'm currently using popen2.Popen4. Is there a way to properly specify a
>particular working directory when launching a process in python?
Switch to using subprocess.Popen and specify the cwd argument.
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org
> 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)
> field2 = match.group(2)
This should then work more or less. However, since y
Mike a écrit :
> I seem to fall into this trap (maybe my Perl background) where I want
> to simultaneously test a regular expression and then extract its match
> groups in the same action.
> For instance:
>
> if (match = re.search('(\w+)\s*(\w+)', foo)):
> field1 = match.group(1)
> field2
Tro a écrit :
> Hi, list.
>
> I've got a simple asyncore-based server. However, I've modified the asyncore
> module to allow me to watch functions as well as sockets. The modified
> asyncore module is in a specific location in my project and is imported as
> usual from my classes.
>
> Now I'd
>
> Inserting delay in the beginning of the loop causes feeling of command
> taking long to start and delay at the end of the loop may cause of
> data loss when both thread became inactive during delay.
time.sleep() pauses ony the thread that executes it, not the
others. And queue objects can hol
There is a macpython list that you can consult at
http://www.nabble.com/Python---pythonmac-sig-f2970.html. When you
search for your problem
http://www.nabble.com/forum/Search.jtp?forum=2970&local=y&query=mysqldb
you have the solution
http://www.nickshanny.com/2007/10/os-x-105-python-and-mysqldb.ht
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 one myself. To make a more informed decision, I
would like to ask
On 5 Mar, 13:40, [EMAIL PROTECTED] wrote:
> There is a macpython list that you can consult
> athttp://www.nabble.com/Python---pythonmac-sig-f2970.html. When you
> search for your
> problemhttp://www.nabble.com/forum/Search.jtp?forum=2970&local=y&query=mysqldb
>
> you have the
> solutionhttp://ww
Hi,
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?
Kind regards,
rod
--
http://mail.python.org/mailman/listinfo/python-list
I previously posted a link to an improved, HTML-based, hyperlinked
grammar.txt. Discard that one. This one is much better.
http://www.martinrinehart.com/articles/python-grammar.html
If you find it useful, thank Gabriel Genellina for encouraging me to
get it really right.
It includes three correc
On Wed, Mar 5, 2008 at 3:39 PM, <[EMAIL PROTECTED]> wrote:
> time.sleep() pauses ony the thread that executes it, not the
> others. And queue objects can hold large amount of data (if you have
> the RAM),
> so unless your subprocess is outputting data very fast, you should not
> have data los
Why is """ the preferred delimiter for multi-line strings?
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 5 Mar 2008 06:56:24 -0800 (PST)
[EMAIL PROTECTED] wrote:
> Why is """ the preferred delimiter for multi-line strings?
Where did you see that? The only place I saw it was the style guide
and it was only talking about docstrings. Even there they used """ as
an example but the text talked a
On Mar 5, 9:56 am, [EMAIL PROTECTED] wrote:
> Why is """ the preferred delimiter for multi-line strings?
Is it ? FWIW, I use single quotes whenever I can and double whenever I
have to (i.e. rarely).
George
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 4, 11:12 pm, Michael Torrie <[EMAIL PROTECTED]> wrote:
> Does anyone have any recommended ideas/ways of implementing a proper
> control and status protocol for communicating with threads? I have a
> program that spawns a few worker threads, and I'd like a good, clean way
> of communicating
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 takes factorint() to
> process a number. If the seed is reset befor
For anyone who hasn't heard, E. Gary Gygax died yesterday. Some people
think we should build a tomb in his honor. ;-)
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
"All problems in computer science can be solved by another level of
indirection." --Butler La
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
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
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
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,
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
> 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/
>
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
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
[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
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
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
What is a class that is not a module?
--
http://mail.python.org/mailman/listinfo/python-list
I want to hash values to keys. How do the alternatives compare?
--
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
[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
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
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
<[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
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
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,
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
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
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
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
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
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
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
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 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 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, [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, 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 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
"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: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.
>
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, 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/
>
> 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
> > > > 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
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
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, 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: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 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 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 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 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
You import classes from modules.
--
http://mail.python.org/mailman/listinfo/python-list
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:
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 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
[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 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
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
"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 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
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
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}
>>
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
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
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 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.
>
>>
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
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
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
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
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.
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
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
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
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 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
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
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
> 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
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
1 - 100 of 124 matches
Mail list logo