On Jul 10, 12:43 pm, Piet van Oostrum p...@cs.uu.nl wrote:
Chris Rebert c...@rebertia.com (CR) wrote:
CR On Fri, Jul 10, 2009 at 9:13 AM, Bryanbryanv...@gmail.com wrote:
I am trying to automate rsync to backup server A from server B. I
have set up a private/public key between the two
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 avoid
On Jun 24, 9:25 am, Tim Golden m...@timgolden.me.uk 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. __main__.Account
Foo.__class__.__name__ gives me
On Apr 28, 11:16 pm, Arnaud Delobelle arno...@googlemail.com wrote:
Kay Schluehr kay.schlu...@gmx.net writes:
On 29 Apr., 05:41, Ross ross.j...@gmail.com 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
On Apr 28, 11:16 pm, Arnaud Delobelle arno...@googlemail.com wrote:
Kay Schluehr kay.schlu...@gmx.net writes:
On 29 Apr., 05:41, Ross ross.j...@gmail.com 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
Bryan Silverthorn bc...@cornell.edu added the comment:
Well, there's no Python bug per se, hence no test case; this patch just
adds a single additional assert that might catch a particular extension
implementation mistake. It was prompted by tracking down the bug in
pygtk mentioned above.
I've
Changes by Bryan Silverthorn bc...@cornell.edu:
Removed file: http://bugs.python.org/file8998/bcs_typeobject_assert.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1662
Bryan Blackburn b...@users.sourceforge.net added the comment:
FYI, I'm able to avoid this by using PYTHONHOME=$(DESTDIR)$(prefix)
before $(RUNSHARED) when running BuildApplet.py and $(BUNDLEBULDER) in
Mac/Makefile.in, Mac/IDLE/Makefile.in, and Mac/PythonLauncher/Makefile.in
New submission from Bryan Blackburn b...@users.sourceforge.net:
With Python 2.6.1 currently installed and attempting to install 2.6.2 into
a DESTDIR location, and having a different configuration for the new one
(2.6.1 built with default Unicode settings, 2.6.2 with UCS4),
BuildApplet.py
scriptomatic output.
Cheers,
Bryan Rasmussen
On Sat, Feb 28, 2009 at 8:15 PM, Tim Golden m...@timgolden.me.uk 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 wmi stuff, and putting
my output
(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
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
rasmussen.br...@gmail.com wrote:
Maybe
On Feb 17, 12:34 am, Gabriel Genellina gagsl-...@yahoo.com.ar
wrote:
En Fri, 13 Feb 2009 20:17:35 -0200, Bryan bryanv...@gmail.com escribió:
On Feb 13, 1:52 pm, Jason Scheirer jason.schei...@gmail.com wrote:
On Feb 13, 12:42 pm, Bryan bryanv...@gmail.com wrote:
I have a Python v2.5.2
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
On Feb 13, 1:52 pm, Jason Scheirer jason.schei...@gmail.com wrote:
On Feb 13, 12:42 pm, Bryan bryanv...@gmail.com 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
A list is an ordered collection, for example.
True.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
in 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
. 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
Paul Rubin wrote:
Bryan Olson fakeaddr...@nowhere.org 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
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 you can advance
or not is defined
with * and ** arguments.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
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 solutions.
--
--Bryan
--
http://mail.python.org/mailman
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
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 instance
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
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, but I
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
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
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 sockets.
--
--Bryan
--
http
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'd say the reason to use
:
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 strategy of doing everything
the hard way.
--
--Bryan
--
http
()] 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
])
assert s1 == s2
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
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
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
/',
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
.
The reactor pattern describes event-driven I/0, not parallel processing.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-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.
--
--Bryan
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.
--
--Bryan
--
http
a race condition even if the side you want to win almost
always does.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
().
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
a
million locks.
--
--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 generally work
reach the limit.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
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 firewalls
() 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
in.
--
--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 newsgroup
sys.version_info[0] 2, sys.version_info
Traceback (most recent call last):
File stdin, line 1, in ?
AssertionError: (2, 4, 5, 'final', 0)
Thanks. Yes, that's better.
To verify that the running version of Python is 3 or higher,
import sys
assert sys.version_info[0] = 3
--
--Bryan
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, careful here (I made
argument. Perhaps that's what you want?
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
)
| 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
class be 'heap types', which
the native dict is not.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
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 prescribed by Congress within its
constitutional authority.
--
--Bryan
--
http
.
--
--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 .Net land is expensive.
Actually catching
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 user for fixing.
Raising exceptions seems
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 moment, but I can make a couple of
quick
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']
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
' 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
Bryan Bingham [EMAIL PROTECTED] added the comment:
Installing tcl 8.5 from activestate gets rid of that error but then the
following happens on my pretty clean iMac:
Traceback (most recent call last):
File /usr/local/bin/idle, line 5, in module
main()
File
/Library/Frameworks
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
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
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
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
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
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
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
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
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
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
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
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, 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
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
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
Obviously. Please refrain from replying to the 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 None (null)?
at all occasions.
Cheers,
Bryan Rasmussen
On Thu, Apr 24, 2008 at 5:34 PM, Tim Arnold [EMAIL PROTECTED] wrote:
hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to
create CHM files. That application really hates xhtml, so I need to convert
self-ending tags (e.g. br
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 that need to be fed to MS HTML Workshop
[EMAIL PROTECTED] wrote:
On 13 Apr, 19:19, Bryan Oakley [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
mapq = PhotoImage(file = 'C:\Users\saftarn\Desktop\elmapovic.gif')
w.create_image(10, 10, image = mapq, anchor = NW)
after doing this is there any possibility of getting
[EMAIL PROTECTED] wrote:
so my little calculator works perfectly now. just having some trouble
with the layout.
this whole tkinter-thing seems to be more tricky than it should be.
how can i make the 4 column of buttons have the same distance and
size between them as the other 3 columns?
and
Ivan Illarionov wrote:
You don't need to envoke another interpreter.
Python can interpret arbitrary python code with exec statement.
Wrap user's string inside function definition, and exec it.
You might want to disable words like `import`, `exec` and `eval` in
user's code because it's a
[EMAIL PROTECTED] wrote:
mapq = PhotoImage(file = 'C:\Users\saftarn\Desktop\elmapovic.gif')
w.create_image(10, 10, image = mapq, anchor = NW)
after doing this is there any possibility of getting the
characteristics of the GIF-picture(or bitmap if i use that)?
it would be very helpfull if
[EMAIL PROTECTED] wrote:
ok but i have trouble using grid. if i try to use a Label witht he
text answer in the following code it doenst work very well.
Can you describe have trouble? What sort of trouble -- syntax errors,
the text never shows up, etc?
Following is my attempt to use a label
is that it doesn't play nice with select().
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
of zero, will raise socket.error. The
errno in the exception's (errno, string) value should be
EAGAIN or EWOULDBLOCK. If a socket has a non-zero timeout,
and that timeout expires, the operation raises socket.timeout.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
+ ' ' + usrHome)
#I know that I can't optimize the line below further... or... can I?
sys.exit(Thanks for using pyDirFixr...)
Given the Unixy nature of your code, you probably want to sys.exit(0)
for success and 1 or 2 for failure.
Happy hacking,
--
--Bryan
--
http://mail.python.org/mailman/listinfo
. I'll see if it make a great load average and/or
I/O time.
Hmmm... you might try increasing the buffer size.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
Arnaud Delobelle wrote:
Bryan Olson wrote:
We mean that the party supplying the keys deliberately chose
them to make the hash table inefficient. In this thread the goal
is efficiency; a party working toward an opposing goal is an
adversary.
There are situations where this can happen I
.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
John Machin wrote:
On Mar 22, 1:11 am, [EMAIL PROTECTED] wrote:
A collision sequence is not so rare.
[ hash( 2**i ) for i in range( 0, 256, 32 ) ]
[1, 1, 1, 1, 1, 1, 1, 1]
Bryan did qualify his remarks: If we exclude the case where an
adversary is choosing the keys
()
myNewVar = q.get()
assert myNewVar == myVar
print len(myNewVar), bytes piped around.
Great, it works, thank you Bryan !
Could you explain me why you use a queue instead of a simple array for
getting the piped var ?
The call to q.get() will block until an item is in the queue
Arnaud Delobelle wrote:
Bryan Olson wrote:
[...]
Arnaud Delobelle offered a good Wikipedia link, and for more background
look up amortized analysis.
Hrvoje Niksic provided the link :).
Oops, careless thread-following. Hrvoje Niksic it was.
I still think two unrelated
things are being
ESPN show the world championship of a game at
which I usually beat my friends. There are levels beyond
levels beyond my level. And I'm a pro.
It is to the shame of my alma mater that they denied
tenure to Dr. Sasaki.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
working example, I hope you'll
post it.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
dicts for such things, as in:
def multiples(lst):
h = {}
for x in lst:
h[x] = h.get(x, 0) + 1
return set([x for x in h if h[x] 1])
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
, but if I'm wrong I'd be grateful for a
link to further details.
Arnaud Delobelle offered a good Wikipedia link, and for more background
look up amortized analysis.
--
--Bryan
--
http://mail.python.org/mailman/listinfo/python-list
301 - 400 of 824 matches
Mail list logo