Re: Automate rsync w/ authentication

2009-07-10 Thread Bryan
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

Get name of class without instance

2009-06-24 Thread Bryan
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

Re: Get name of class without instance

2009-06-24 Thread Bryan
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

Re: complementary lists?

2009-04-29 Thread Bryan
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

Re: complementary lists?

2009-04-29 Thread Bryan
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

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2009-04-27 Thread Bryan Silverthorn
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

[issue1662] [patch] assert tp_traverse in PyType_GenericAlloc()

2009-04-27 Thread Bryan Silverthorn
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

[issue5766] Mac/scripts/BuildApplet.py reset of sys.executable during install can cause it to use wrong modules

2009-04-16 Thread Bryan Blackburn
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

[issue5766] Mac/scripts/BuildApplet.py reset of sys.executable during install can cause it to use wrong modules

2009-04-15 Thread Bryan Blackburn
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

Re: c.Win32_OperatingSystem question.

2009-03-12 Thread bryan rasmussen
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

c.Win32_OperatingSystem question.

2009-02-28 Thread bryan rasmussen
(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

Re: c.Win32_OperatingSystem question.

2009-02-28 Thread 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

Re: Upgrading standard library module

2009-02-17 Thread Bryan
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

Upgrading standard library module

2009-02-13 Thread Bryan
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

Re: Upgrading standard library module

2009-02-13 Thread Bryan
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

Re: Ordered dict by default

2009-02-05 Thread Bryan Olson
A list is an ordered collection, for example. True. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordered dict by default

2009-02-05 Thread Bryan Olson
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

Re: Doc for extended call syntax; was: Re: unzip array of arrays?

2009-01-27 Thread Bryan Olson
. 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

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-27 Thread Bryan Olson
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

Re: Securing a database

2009-01-25 Thread Bryan Olson
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

Doc for extended call syntax; was: Re: unzip array of arrays?

2009-01-24 Thread Bryan Olson
or not is defined with * and ** arguments. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Securing a database

2009-01-23 Thread Bryan Olson
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

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-23 Thread Bryan Olson
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

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-23 Thread Bryan Olson
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

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-23 Thread Bryan Olson
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

Re: Why GIL? (was Re: what's the point of rpython?)

2009-01-23 Thread Bryan Olson
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

Re: Start Python at client side from web app

2009-01-21 Thread Bryan Olson
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

Re: socket send help

2009-01-07 Thread Bryan Olson
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

Re: socket.error 24: too many open files

2009-01-07 Thread Bryan Olson
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

Re: socket send help

2009-01-05 Thread Bryan Olson
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

Re: Testing if an index is in a slice

2009-01-04 Thread Bryan Olson
: 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

Re: select.select and socket.setblocking

2009-01-03 Thread Bryan Olson
()] 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

Re: Testing if an index is in a slice

2009-01-03 Thread Bryan Olson
]) assert s1 == s2 -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: socket send help

2009-01-03 Thread Bryan Olson
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

Re: Doubt on creating threads

2009-01-03 Thread Bryan Olson
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

Re: Very basic question

2008-12-23 Thread Bryan Olson
/', 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

Re: Twisted for non-networking applications

2008-12-22 Thread Bryan Olson
. The reactor pattern describes event-driven I/0, not parallel processing. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Event Driven programming - Doubts

2008-12-22 Thread Bryan Olson
, 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

Re: socket and subprocess problem

2008-12-18 Thread Bryan Olson
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

Re: socket and subprocess problem

2008-12-15 Thread Bryan Olson
a race condition even if the side you want to win almost always does. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: socket and subprocess problem

2008-12-15 Thread Bryan Olson
(). -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread Locking issue - Can't allocate lock (sem_init fail)

2008-12-15 Thread Bryan Olson
a million locks. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Bidirectional Networking

2008-12-14 Thread Bryan Olson
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

Re: Bidirectional Networking

2008-12-14 Thread Bryan Olson
reach the limit. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Bidirectional Networking

2008-12-13 Thread Bryan Olson
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

Re: Bidirectional Networking

2008-12-12 Thread Bryan Olson
() 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

Re: python an sqlite objects

2008-12-04 Thread Bryan Olson
in. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Off Topic: Re: Obama's Birth Certificate - Demand that US presidential electors investigate Obama's eligibility

2008-12-04 Thread Bryan Olson
[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

Re: python an sqlite objects

2008-12-04 Thread Bryan Olson
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

Re: unicode and hashlib

2008-12-02 Thread Bryan Olson
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

Re: Reverse zip() ?

2008-12-02 Thread Bryan Olson
argument. Perhaps that's what you want? -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Reverse zip() ?

2008-12-02 Thread Bryan Olson
) | 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

Re: Overriding a method at the instance level on a subclass of a builtin type

2008-12-02 Thread Bryan Olson
class be 'heap types', which the native dict is not. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Obama's Birth Certificate - Demand that US presidential electors investigate Obama's eligibility

2008-12-02 Thread Bryan Olson
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

Re: unicode and hashlib

2008-12-01 Thread Bryan Olson
. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: Decorator for validation - inefficient?

2008-11-03 Thread Bryan
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

Re: Decorator for validation - inefficient?

2008-11-02 Thread Bryan
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

Re: Decorator for validation - inefficient?

2008-11-01 Thread Bryan
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

Decorator for validation - inefficient?

2008-10-31 Thread Bryan
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']

Best Unit Testing framework for Linux system administration scripting?

2008-10-26 Thread Bryan Berry
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

fcgi.py on windows?

2008-10-16 Thread bryan rasmussen
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, bytes is str

2008-10-05 Thread Bryan Olson
' 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

[issue4017] IDLE 2.6 broken on OSX (Leopard)

2008-10-02 Thread Bryan Bingham
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

Google License Keys for pyGoogle

2008-08-29 Thread Alex Bryan
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

Simple question, how do you tell how many items in a list?

2008-07-10 Thread Alex Bryan
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

Tkinter Text widget get()

2008-07-05 Thread Alex Bryan
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

Margins in the Tkinter Text widget

2008-07-05 Thread Alex Bryan
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

Creating an .exe with Tkinter involved

2008-07-03 Thread Alex Bryan
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

The Yield statement

2008-06-30 Thread Alex Bryan
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

Testing for Null?

2008-06-28 Thread Alex Bryan
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

Re: Re: Testing for Null?

2008-06-28 Thread Alex Bryan
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

More on Urllib, and Urllib2

2008-06-27 Thread Alex Bryan
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

urllib tutorial or manual

2008-06-26 Thread Alex Bryan
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,

urllib tutorial and help

2008-06-25 Thread Alex Bryan
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

Sending information to a website

2008-06-24 Thread Alex Bryan
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

Going from Tkinter to pyQT

2008-06-23 Thread Alex Bryan
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

Connecting a Desktop App to a Web App

2008-06-21 Thread Alex Bryan
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

Re: Re: Connecting a Desktop App to a Web App

2008-06-21 Thread Alex Bryan
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

Re: don't make it worse! - was Re: SPAM

2008-06-20 Thread bryan rasmussen
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

list.reverse()

2008-04-28 Thread Mark Bryan Yu
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)?

Re: convert xhtml back to html

2008-04-24 Thread bryan rasmussen
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

Re: convert xhtml back to html

2008-04-24 Thread bryan rasmussen
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

Re: tkinter, canvas, get color of image?

2008-04-15 Thread Bryan Oakley
[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

Re: tkinter, annoying grid-problem

2008-04-13 Thread Bryan Oakley
[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

Re: Looking for a way to include Pyhtho scripting INSIDE a python program

2008-04-13 Thread Bryan Oakley
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

Re: tkinter, canvas, get color of image?

2008-04-13 Thread Bryan Oakley
[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

Re: tkinter, overwrite Label-text?

2008-04-11 Thread Bryan Oakley
[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

Re: why does socket.makefile require non-blocking mode?

2008-03-29 Thread Bryan Olson
is that it doesn't play nice with select(). -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I reconnect a disconnected socket?

2008-03-29 Thread Bryan Olson
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

Re: Breaking the barrier of a broken paradigm... part 1

2008-03-25 Thread Bryan Olson
+ ' ' + 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

Re: How to send a var to stdin of an external software

2008-03-25 Thread Bryan Olson
. 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

Re: finding items that occur more than once in a list

2008-03-23 Thread Bryan Olson
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

Re: Testing for an empty dictionary in Python

2008-03-23 Thread Bryan Olson
. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: finding items that occur more than once in a list

2008-03-22 Thread Bryan Olson
[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

Re: How to send a var to stdin of an external software

2008-03-21 Thread Bryan Olson
() 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

Re: finding items that occur more than once in a list

2008-03-21 Thread Bryan Olson
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

Re: What Programming Languages Should You Learn Next?

2008-03-21 Thread Bryan Olson
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

Re: win32: emulating select() on pipes

2008-03-18 Thread Bryan Olson
working example, I hope you'll post it. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list

Re: finding items that occur more than once in a list

2008-03-18 Thread Bryan Olson
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

Re: finding items that occur more than once in a list

2008-03-18 Thread Bryan Olson
, 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

<    1   2   3   4   5   6   7   8   9   >