-- how efficiently
a web app gets invoked is not among them. It's not a language issue."
Bruno disagreed when it comes to PHP. But obviously Bruno and I don't
communicate all that well.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
> Bryan a écrit :
>
> > Bruno Desthuilliers wrote:
> >> Nope. I want to keep all my settings parsed, my librairies loaded, all
> >> my connections opened etc. That is, all the time consuming stuff at app
> >> startup - which, with
didn't say when that was, but PHP caching has come a long way.
Google is your friend.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Bruno wrote:
> Bryan a écrit :
> > I think you guys got some incorrect info about PHP. A variety of
> > execution options are available, such as FastCGI and in-server
> > modules.
>
> mod_php, yes, but that doesn't change anything to the fact that it has
> to
atures --
how efficiently a web app gets invoked is not among them. It's not a
language issue. What was the theory here? Did we think the PHP
community too stupid to understand FastCGI?
--
--Bryan Olson
--
http://mail.python.org/mailman/listinfo/python-list
I'll suggest the
generalization:
def partition(target, predicate):
result = {}
for item in target:
result.setdefault(predicate(item), []).append(item)
return result
> true, false = [1,2,3,4].partition(lambda x: x >1)
>
> print true, false
&g
On Feb 22, 3:00 pm, "Diez B. Roggisch" wrote:
> Am 22.02.10 23:48, schrieb Bryan:
>
>
>
> > On Feb 22, 2:16 pm, "Diez B. Roggisch" wrote:
> >> Am 22.02.10 22:29, schrieb Bryan:
>
> >>> On Feb 22, 10:57 am, "Alf P. Steinbach&q
On Feb 22, 2:16 pm, "Diez B. Roggisch" wrote:
> Am 22.02.10 22:29, schrieb Bryan:
>
>
>
> > On Feb 22, 10:57 am, "Alf P. Steinbach" wrote:
> >> * Bryan:
>
> >>> I am looping through a list and creating a regular dictionary. From
>
On Feb 22, 10:57 am, "Alf P. Steinbach" wrote:
> * Bryan:
>
>
>
> > I am looping through a list and creating a regular dictionary. From
> > that dict, I create an ordered dict. I can't think of a way to build
> > the ordered dict while going through
On Feb 22, 9:19 am, MRAB wrote:
> Bryan wrote:
> > I am looping through a list and creating a regular dictionary. From
> > that dict, I create an ordered dict. I can't think of a way to build
> > the ordered dict while going through the original loop. Is there a
&g
I am looping through a list and creating a regular dictionary. From
that dict, I create an ordered dict. I can't think of a way to build
the ordered dict while going through the original loop. Is there a
way I can avoid creating the first unordered dict just to get the
ordered dict? Also, I am
I am writing a small script to manage my ipod. I am using the python
bindings for libgpod. I have never used swig, or used python to
program against a c/c++ library.
I can get the library to find my ipod, and parse its DB format, but
I'm not sure how to interact with the types that some of the f
On Dec 11, 10:17 am, Robert Kern wrote:
> On 2009-12-11 12:03 PM, Bryan wrote:
>
> > When a user submits a request to update an object in my web app, I
> > make the changes in the DB, along w/ who last updated it and when. I
> > only want to update the updated/updatedBy
When a user submits a request to update an object in my web app, I
make the changes in the DB, along w/ who last updated it and when. I
only want to update the updated/updatedBy columns in the DB if the
data has actually changed however.
I'm thinking of having the object in question be able to re
On Nov 13, 9:34 am, "Diez B. Roggisch" wrote:
> Bryan schrieb:
>
>
>
> > I have several properties on a class that have very similar behavior.
> > If one of the properties is set, all the other properties need to be
> > set to None. So I wanted t
I have several properties on a class that have very similar behavior.
If one of the properties is set, all the other properties need to be
set to None. So I wanted to create these properties in a loop like:
class Test(object):
for prop in ['foo', 'bar', 'spam']:
# Attribut
as tons of useful libraries bla bla
bla.
This post describes the IDS vs language divide that I crossed over:
http://osteele.com/archives/2004/11/ides
Python can do everything you ask in your post, and their are many
resources to help you do those things. I just wanted to give you some
advice for the bigger picture.
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
I'm designing a system and wanted to get some feedback on a potential
performance problem down the road while it is still cheap to fix.
The system is similar to an accounting system where a system tracks
"Things"
which move between different "Buckets". The system answers these
questions:
- How ma
I'm a python n00b and so pardon me in advance if this is really stupid
question.
I have my suspicions but why does the following not work the way I'm
anticipating it will?
(python 2.4.4)
>>> import os
>>> if (os.system('echo test')):
...print 'success'
... else:
...print 'failed'
...
tes
On Jul 24, 2:11 pm, Bryan wrote:
> I have a backup script that runs fine when I run it manually from the
> command line. When I run it with cron, the script stops running at
> random points in the source code.
>
> The script calls rsync with the subprocess module, which in tur
I have a backup script that runs fine when I run it manually from the
command line. When I run it with cron, the script stops running at
random points in the source code.
The script calls rsync with the subprocess module, which in turn uses
ssh to backup files from a box on my lan. It also uses
On Jul 10, 12:03 pm, mgi...@motorola.com (Gary Duzan) wrote:
> In article
> <3af970b1-b454-4d56-a33f-889ecfaca...@l28g2000vba.googlegroups.com>,
>
> Bryan wrote:
>
> >rsyncExec = '/usr/bin/ssh'
> >source = 'r...@10.0.45.67:/home/bry/jquery.lookup&
On Jul 10, 12:43 pm, Piet van Oostrum wrote:
> >>>>> Chris Rebert (CR) wrote:
> >CR> On Fri, Jul 10, 2009 at 9:13 AM, Bryan wrote:
> >>> I am trying to automate rsync to backup server A from server B. I
> >>> have set up a private/public k
I am trying to automate rsync to backup server A from server B. I
have set up a private/public key between the two servers so I don't
have to enter a password when using rsync. Running rsync manually
with the following command works fine:
rsync -av --dry-run -e "/usr/bin/ssh -i /home/bry/keys/bry
On Jun 24, 9:25 am, Tim Golden wrote:
> Bryan wrote:
> > Given a class:
>
> > class Foo(object):
> > pass
>
> > How can I get the name "Foo" without having an instance of the class?
>
> > str(Foo) gives me more than just the name Foo. &q
Given a class:
class Foo(object):
pass
How can I get the name "Foo" without having an instance of the class?
str(Foo) gives me more than just the name Foo. "__main__.Account"
Foo.__class__.__name__ gives me "type"
I don't want to do:
Foo().__class__.__name__ if possible. I would rather a
ouching that horrible mouse contraption.
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 28, 11:16 pm, Arnaud Delobelle wrote:
> Kay Schluehr writes:
> > On 29 Apr., 05:41, Ross wrote:
> >> If I have a list x = [1,2,3,4,5,6,7,8,9] and another list that is a
> >> subset of x: y = [1,4,7] , is there a quick way that I could return
> >> the complementary subset to y z=[2,3,
On Apr 28, 11:16 pm, Arnaud Delobelle wrote:
> Kay Schluehr writes:
> > On 29 Apr., 05:41, Ross wrote:
> >> If I have a list x = [1,2,3,4,5,6,7,8,9] and another list that is a
> >> subset of x: y = [1,4,7] , is there a quick way that I could return
> >> the complementary subset to y z=[2,3,
from scriptomatic output.
Cheers,
Bryan Rasmussen
On Sat, Feb 28, 2009 at 8:15 PM, Tim Golden wrote:
> bryan rasmussen wrote:
>>
>> Maybe there's a more specific list I should ask this question on but I
>> don't know what it is. I'm using Tim Golden's w
oh I noticed the problem with the
BuildNumber = et.SubElement(oper.BuildNumber)
instead of
BuildNumber = str(oper.BuildNumber)
and fixed it. No improvement in results however.
Best Regards,
Bryan Rasmussen
On Sat, Feb 28, 2009 at 6:38 PM, bryan rasmussen
wrote:
> Maybe there's a more
y.text = str(oper.WindowsDirectory)
At the end of that thhe only text node thaht comes out is
ComputerName, WMI is running - Am I using the wrong names for things
here? When I try to get the same values using WScript and WQL to
extract from Win32_OperatingSystem I get all the values.
Best Regards,
Bryan Rasmussen
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 17, 12:34 am, "Gabriel Genellina"
wrote:
> En Fri, 13 Feb 2009 20:17:35 -0200, Bryan escribió:
>
>
>
> > On Feb 13, 1:52 pm, Jason Scheirer wrote:
> >> On Feb 13, 12:42 pm, Bryan wrote:
>
> >> > I have a Python v2.5.2 server running
On Feb 13, 1:52 pm, Jason Scheirer wrote:
> On Feb 13, 12:42 pm, Bryan wrote:
>
> > I have a Python v2.5.2 server running and I found some undesirable
> > behavior in the xmlrpclib module that is included with that version of
> > Python. The xmlrpclib version that is
s for the
formencode library. It is kind of scary upgrading my Python server
install without being sure all my libraries will work. Experiences??
Bryan
--
http://mail.python.org/mailman/listinfo/python-list
terms of the key order.
"Ordered Dictionaries" are a bit fuzzy. :)
A few bits fuzzy. Is the following True or False if dict is insert-ordered?
dict(a=6, b=7) == dict(b=7, a=6)
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
s really not.
http://en.wikipedia.org/wiki/Ordered_set
A list is an ordered collection, for example.
True.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
Bryan Olson writes:
An object's __dict__ slot is *not* mutable; thus we could gain some
efficiency by protecting the object and its dict with the same lock. I
do not see a major win in Mr. Banks' point that we do not need to lock
the object, just its dict.
I
Python's extended call syntax. Great.
I think I grock the extended call syntax, and when the question came up
I was surprised not to be able to find where I learned it. Mark, where
exactly does one look to see this "full description"?
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
kt83...@gmail.com wrote:
Thank you very much Bryan.
It does look like this is out of my league.
As Peter Pearson noted, "It is out of *everyone's* league." And Peter
used to work for Cryptography Research, a small company that scored as
high in this league as anyone. Maybe
extended call syntax whether or not is defined
with * and ** arguments.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
Bryan Olson wrote:
Paul Rubin wrote:
Bryan Olson writes:
BTW, class instances are usually immutable and thus don't require a
mutex in the system I described.
Then you are describing a language radically different from Python.
That one threw me for a minute too,
Carl Banks wrote:
Paul Rubin wrote:
Bryan Olson writes:
BTW, class instances are usually immutable and thus don't require a
mutex in the system I described.
Then you are describing a language radically different from Python.
That one threw me for a minute too, but I think the idea is
Paul Rubin wrote:
Bryan Olson writes:
BTW, class instances are usually immutable and thus don't require a
mutex in the system I described.
Then you are describing a language radically different from Python.
That one threw me for a minute too, but I think the idea is that the
class ins
Carl Banks wrote:
[...]
BTW, class instances are usually immutable and thus don't require a
mutex in the system I described.
Then you are describing a language radically different from Python.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
whopping bunch of other techniques going vastly beyond that
description.
Look up DRM technology companies, such as CloakWare, Macrovision, and
Cryptography Research.
If you have a modest number of customers, hardware solutions and/or
strict contractual commitments might offer practical sol
don't know of any open-source implementation.
Do you plan to have just one public key for verifying the downloaded
Python scripts, hard-coded into the extension?
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
uggestions would be much appreciated.
Is it possible you keep accumulating MySQLdb connection or cursor
objects and don't close() them? (I don't know the innards of MySQLdb,
but it's something to check.)
One thing you might try is to regularly log the filno() of your sock
Gabriel Genellina wrote:
James Mills escribió:
Bryan Olson wrote:
I thought a firewall would block an attempt to bind to any routeable
address, but not to localhost. So using INADDR_ANY would be rejected.
No.
My understanding is that firewalls block network traffic, not system
calls
Gabriel Genellina wrote:
Bryan Olson escribió:
Gabriel Genellina wrote:
greyw...@gmail.com escribió:
[...]
A simple server:
from socket import *
myHost = ''
Try with myHost = '127.0.0.1' instead - a firewall might be blocking
your server.
Just a nit: I
ide = slc.indices(len)
if stride < 0:
return (start >= index > stop) and ((start-index) % -stride == 0)
else:
return (start <= index < stop) and ((index-start) % stride == 0)
(Hint: help(slice) is your friend.)
I should really think about abandoning my st
nd is insignificant. My out-dated Pentium 4 desktop can create and
destroy a few thousand threads per second under WinXP; more under recent
Linux.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
tead of the empty
string is that a firewall might *not* be blocking your server.
The Python sockets module interprets the empty string as INADDR_ANY,
which means to bind to all available adapters including the loopback,
A.K.A localhost, A.K.A '127.0.0.1'.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
for i in range(-3, n + 5) if inslice(i, slc, n)]
s2 = sorted(range(n)[slc])
assert s1 == s2
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
and recv()] are atomic, so one process
gets the new connection; what happens in the other depends on whether we
use a blocking or non-blocking socket, and clearly we want non-blocking.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
;t immediately followed by another '/' with '* 1.0 /',
that might work... or maybe someone fill find counter-examples.
Python 3 does what you want. The / operator is float division. The //
operator is still integer division.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
ready list, invoking the corresponding callbacks one by one. After the
last callback returns, the framework loops back to select() again.
select() is not the only call to do multi-source I/O, and I'm not an
expert on these frameworks, so take the above as a simplified general
description
reads.
The reactor pattern describes event-driven I/0, not parallel processing.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
successfully started a listening socket
initiate a connection.
I'd swear James copied my response, except his came first. Even the
formatting came out similar. I hadn't seen his response when I wrote
mine, and wouldn't have bothered posing the same thing again.
--
--Br
duce performance but keep the number of lock objects to a
> minumum.
That's probably a reasonable strategy whether or not you can create a
million locks.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
all to listen() returns,
but before he calls accept().
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
It's still a race condition even if the side you want to win almost
always does.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
d
could easily reach the limit.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Emanuele D'Arrigo wrote:
Bryan Olson wrote:
Software firewalls will often simply refuse incoming connections. The
basic protection of the garden-variety home router comes from "network
address translation" (NAT), in which case TCP connections initiated from
the inside will
Emanuele D'Arrigo wrote:
Hey Bryan, thank you for your reply!
Bryan Olson wrote:
Is it possible then to establish both a server and a client in the
same application?
Possible, and not all that hard to program, but there's a gotcha.
Firewalls, including home routers and software
l. SocketServer is built on
top of 'socket', which has the list() and accept() calls to create the
queue and get connections from it, respectively. The traditional listen
queue size, and sometimes the system maximum, is 5.
If you want to use SocketServer, read about ThreadingMixIn and ForkingMixIn.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
e running version of Python is 3 or higher,
import sys
assert sys.version_info[0] >= 3
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Bryan Olson wrote:
[EMAIL PROTECTED] wrote:
This message is not about the meaningless computer printout called
More importantly, it's not about Python. I'm setting follow-ups to
talk.politics.
I set the follow-ups header appropriately, as per established
field's declared type. sqlite3 is different; it will try to make an
exception to the field's declared type and store the object as the type
with which it came in.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
ial Proceedings of every other State. And
the Congress may by general Laws prescribe the Manner in which such
Acts, Records and Proceedings shall be proved, and the Effect thereof."
These haters seek to make Obama prove his records in ways others have
not had to, and beyond any manner pr
newly-assigned class be 'heap types', which
the native dict is not.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
ess?
A: Use zip()!
| >>> a2, b2 = zip(*z)
| >>> a2
| (1, 2, 3)
| >>> b2
| (4, 5, 6)
zip as its own inverse might be even easier to comprehend if we call zip
by its more traditional name, "transpose".
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
value argument. Perhaps that's what you want?
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Scott David Daniels wrote:
Bryan Olson wrote:
... I think that's good behavior, except that the error message is likely
to end beginners to look up the obscure buffer interface before they
find they just need mystring.decode('utf8') or bytes(mystring, 'utf8').
Oops,
MD5 has fallen and SHA-1 is falling. Python's hashlib also
includes the stronger SHA-2 family.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Sun, 02 Nov 2008 09:33:41 -0800, Bryan wrote:
>
> > I'm coming from a .Net background, and yes, one of the reasons I did not
> > consider raising exceptions was to avoid the overhead of an exception
> > handler clause, which in .N
On Nov 1, 6:57 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Sat, 01 Nov 2008 17:12:33 -0700, Bryan wrote:
> > The list of validation error descriptions is returned instead of raising
> > exceptions so clients can show the errors to the us
Steven D'Aprano wrote:
> On Fri, 31 Oct 2008 11:26:19 -0700, Bryan wrote:
>
> > I want my business objects to be able to do this:
> [snip code]
>
> The code you show is quite long and complex and frankly I don't have the
> time to study it in detail at the
I want my business objects to be able to do this:
class Person(base):
def __init__(self):
self.name = None
@base.validator
def validate_name(self):
if not self.name: return ['Name cannot be empty']
p = Person()
print p.invalid # Prints ['Name cannot be empty']
p.name
on using unit testing
in system administration?
thanks,
--
Bryan W. Berry
Technology Director
OLE Nepal, http://www.olenepal.org
--
http://mail.python.org/mailman/listinfo/python-list
As per the subject, anyone know of a version of fcgi.py out there
somewhere that works on windows yet.
Best Regards,
Bryan Rasmussen
--
http://mail.python.org/mailman/listinfo/python-list
0]'.
I'm thinking I should just avoid using 'bytes' in Python 2.6. If there's
another Python release between 2.6 and 3.gold, I'd advocate removing
the pre-defined 'bytes', or maybe defining it as something else.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
I know this isn't the right mailing list, but it saves me the hassle
of signing up for another one if someone on here knows. I have never
used pyGoogle before, and I just read that google isn't giving out
license keys anymore? If that is the case, can I still get pygoogle to
work another wa
I am just wondering how you get an integer value for how many items there
are in a list, preferably w/o a for loop.
--
http://mail.python.org/mailman/listinfo/python-list
Okay, so i am trying to have some sort of formatting going on in a
textbox, and I need left margins. I see that there are two, one for
the first line and th other for every line but that line. My program
gives a word and a list of definitions for the word. So my question is
how can I make t
Hey guys. I am having trouble understanding the get() method from the
Tkinter Text() widget. It isn't like the entry.get() one I am used to.
I know you have to put tags in, or at least I read. I tried this but
it didn't work. I think I was putting the tags in wrong but I am not
sure. I just
I know this is possible so someone out there should be able to help
me! Okay, I have a program that uses Tkinter, and BeautifulSoup. I
don't think it should be a problem. I want to create an exe of it. I
have py2exe but I don't really know how to work it. I read their
tutorial thing and did
Okay, so i don't really understand the Yield thing and i know it is
useful. I've read a few things about it but it is all programming
jargon and so basically it is hard for me to understand. So can anyone
give me a description or link me to a site that has a good definition
and/or examples
Ya, I tried your code, it still did the same thing :[. I mean it worked like
before. Some extra info about it, I am using BeautifulSoup to get
definitions of words and well, the problem is it doesn't get links or
anything in bold or italics. So the think #6 actually was, was italics. So I
am still
I am having a problem with a list value that is empty. I have a list of
definitions called mainList. the 5th value in the list doesn't have anything
in it. In this case, the values are definitions; also, in this case just the
word cheese is defined. Here is my output to the console:
5. a sprawl
Okay, so I am having issues figuring anything out about this and have
read the "missing manual" about it so please don't send me that link
again. To put it simply I want to be able to input a word and get the
definition from dictionary.com. Now I found a work-around for
searching for the wo
I have never used the urllib class and I need to use it for an app I
am working on. I am wondering if anyone has any good sites that will
fill me in on it(especially the urllib.urlopen module). Or better yet,
an example of how you would submit a search term into the search field
on a site,
So I need to start learning about the urllib class, and am wondering
where is a good place to start. I really don't want to go buy a book
about it, but I was wondering if there is any good online tutorials or
anything like that, that will help me out on connecting apps to the
web, that spec
Okay, so what I want to do is connect to dictionary.com and send the
website a word, and later receive the definition. But for now, I want
to focus on sending the word. A good guy from this mailing list said I
should look into the code and then figure out what the word you want
to be define
I had a guy on this mailing list tell me that pyQT is much better than
Tkinter, and after looking into it a bit I think he is right. However,
I can't find much on it. I want to know if there are any good books or
online tutorials that would be helpful. I doubt there is one, but if
there is
Okay, well I wouldn't be creating the app, so, any hints on how to
figure out the API of a web app I don't know super well?
--
http://mail.python.org/mailman/listinfo/python-list
Okay, this is my first post to this mailing list, so first off if I
shouldn't be sending something here, PLEASE correct me. Okay, so I
want to create an app that has a GUI (most likely Tkinter) and will
prompt the user to choose files and such and then will upload those
files, either regula
I guess it didn't because I was reading through Google Mail, and it
wasn't filtered.
Best Regards,
Bryan Rasmussen
On Fri, Jun 20, 2008 at 9:42 AM, Aspersieman <[EMAIL PROTECTED]> wrote:
> Michael Torrie wrote:
>
> Aspersieman wrote:
>
>
> SPAM
>
>
>
This set of codes works:
>>> x = range(5)
>>> x.reverse()
>>> x
[4, 3, 2, 1, 0]
But this doesn't:
>>> x = range(5).reverse()
>>> print x
None
Please explain this behavior. range(5) returns a list from 0 to 4 and
reverse just reverses the items on the list that is returned by
range(5). Why is x
wow, that's pretty nice there.
Just to know: what's the performance like on XML instances of 1 GB?
Cheers,
Bryan Rasmussen
On Thu, Apr 24, 2008 at 9:55 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Tim Arnold wrote:
> > hi, I've got lots of xhtml pages
201 - 300 of 754 matches
Mail list logo