Re: urllib getting SSL certificate info

2008-08-19 Thread Ghirai
On Sunday 17 August 2008 20:15:47 John Nagle wrote: > If you really need details from the SSL cert, you usually have to use > M2Crypto. The base SSL package doesn't actually do much with certificates. > It doesn't validate the certificate chain. And those strings of > attributes you can get

Re: who to call a list of method inside the class itself

2008-08-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : [EMAIL PROTECTED] wrote: Hi, Is the following code is ok. who to call all method. It is working but the call to m() without a reference to self seems strange Thanks for your help class CustomMethod: def method1(self): def method2(self):

Re: AOP in Python

2008-08-19 Thread Bruno Desthuilliers
Hussein B a écrit : Hey, AOP is build in Groovy language via many means, does Python support AOP out of the box without the need for such tools: http://pythonsource.com/open-source/aspect-oriented-frameworks Thanks. See the use of @decorators in most Python frameworks. When functions are first

Re: You advice please

2008-08-19 Thread Bruno Desthuilliers
Hussein B a écrit : On Aug 15, 10:05 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: Hussein B a écrit : (snip) But this critisim looks so serious: http://en.wikipedia.org/wiki/Ruby_programming_language#Criticism Most of what's written here could apply to Python too - all the part which mo

Re: urllib getting SSL certificate info

2008-08-19 Thread Jean-Paul Calderone
On Tue, 19 Aug 2008 23:06:30 +0300, Ghirai <[EMAIL PROTECTED]> wrote: On Sunday 17 August 2008 20:15:47 John Nagle wrote: If you really need details from the SSL cert, you usually have to use M2Crypto. The base SSL package doesn't actually do much with certificates. It doesn't validate the

Re: Handling Property and internal ('__') attribute inheritance and creation

2008-08-19 Thread Bruno Desthuilliers
Rafe a écrit : On Aug 16, 1:22 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: Rafea écrit : Hi, I've been thinking in circles about these aspects of Pythonic design and I'm curious what everyone else is doing and thinks. There are 3 issues here: 1) 'Declaring' attributes There's nothing l

Good approximate static function call analyzer

2008-08-19 Thread Dan Yamins
I'm looking for a reasonable static function call analysis tool for python functions -- something that will look at code (and possibly import the module it's in) and return a reasonable guess at the functions that might be called by the code. For my purposes, approximations are totally fine -- e.g

Re: urllib getting SSL certificate info

2008-08-19 Thread Ghirai
On Wednesday 20 August 2008 00:05:47 Jean-Paul Calderone wrote: > I don't know about M2Crypto. Here's some sample code for PyOpenSSL: > > from socket import socket > from OpenSSL.SSL import Connection, Context, SSLv3_METHOD > s = socket() > s.connect(('google.com', 443)) > c = Connectio

Grandchildren of TestCase don't work

2008-08-19 Thread Gustavo Narea
Hello, everyone. Why do unitest.TestCase grand-grandchildren not work? I've created a unittest.TestCase descendant, which contains the setUp() and tearDown() for testing some components of a web framework. Every application based on this framework should subclass this base class once, and the res

Re: displaying my randomly selected numbers in a colorful interface.

2008-08-19 Thread Goksie Aruna
Mike Driscoll wrote: On Aug 19, 1:02 am, Goksie Aruna <[EMAIL PROTECTED]> wrote: dear all, i have arrays of number of size lets say 4000 i.e. 201000..2013999 now i want to do the following. first print all the numbers to a colorful console. be it wx, tk, or web based. then pick a winni

Re: who to call a list of method inside the class itself

2008-08-19 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Is the following code is ok. who to call all method. It is working but the call to m() without a reference to self seems strange The reference to self is bound to the methods by the way you look them up. class CustomMethod: def method1(self): d

Tkinter and TableList - Configure the Temporary Embedded Widgets

2008-08-19 Thread lee . walczak
I actually post a topic relating to my problem here: (http://groups.google.co.uk/group/comp.lang.python/browse_thread/ thread/a073d532c4481bfe?hl=en# ) But I thought it could be useful to place an example of my problem here aswell. This a small piece of testcode that creates a TableList. When the

Re: How to stop iteration with __iter__() ?

2008-08-19 Thread John Machin
On Aug 20, 5:06 am, Terry Reedy <[EMAIL PROTECTED]> wrote: > In your case, the standard Python idiom, as Jon said, is > > it = iter(iterable) > next(it) # 2.6, 3.0 > for for item in iterable: >f(item) or, perhaps, for completeness/paranoia/whatever: it = iter(iterable) try: headings = it.n

Re: exception handling in complex Python programs

2008-08-19 Thread Steven D'Aprano
On Tue, 19 Aug 2008 11:07:39 -0700, [EMAIL PROTECTED] wrote: > def do_something(filename): > if not os.access(filename,os.R_OK): > return err(...) > f = open(filename) > ... You're running on a multitasking modern machine, right? What happens when some other process deletes

Subprocess module question.

2008-08-19 Thread aditya shukla
Hello folks, I am using windows vista and i am trying to communicate with various processes. so when i do import subprocess proc=subprocess.Popen('cmd.exe') --This opens the command prompt But when i do proc=subprocess.Popen('netscan.exe') it gives an error Traceback (most recent call last):

Professional Grant Proposal Writing Workshop (September 2008: British Columbia Institute of Technology - Vancouver Campus)

2008-08-19 Thread Anthony Jones
The Grant Institute's Grants 101: Professional Grant Proposal Writing Workshop will be held at the British Columbia Institute of Technology - Vancouver Campus, September 29 - October 1, 2008. Interested development professionals, researchers, faculty, and graduate students should register as soo

Storing Passwords

2008-08-19 Thread Eric Wertman
I've a number of scripts set up that require a username/password combination to log in elsewhere. It's gotten to the point where I need to keep them in a more secure location, instead of just in the scripts themselves. I did a bit of searching, and haven't come up with a great way to store passwo

IOError: decoder zip not available when using PIL

2008-08-19 Thread YouOverThere
I keep getting the error message "IOError: decoder zip not available" when using the Python Imaging Library. The error has occurred when trying to work with PNGs or JPEGs or when loading the fonts supplied with PIL. I can work with GIFs. I assume that I did something wrong when I built Python and/o

Re: The Jihad Candidate

2008-08-19 Thread thermate2
DUDE, have you gone mad ? The ZIONIST MEDIA never barked that it was a jew or a yank bastard when those fake anthrax letters were mailed. 911 was an inside job. Thermate cutter charges were used by yank bastards themselves. The media never did their job for the people or truth. It did it for the co

Re: Grandchildren of TestCase don't work

2008-08-19 Thread infixum
Gustavo Narea wrote: > Hello, everyone. > > Why do unitest.TestCase grand-grandchildren not work? > > I've created a unittest.TestCase descendant, which contains the setUp() and > tearDown() for testing some components of a web framework. Every > application based on this framework should subclas

Re: Python Query: Related to locking a resource in a multithreaded environment

2008-08-19 Thread Gabriel Genellina
En Tue, 19 Aug 2008 15:58:11 -0300, Nils Oliver Kröger <[EMAIL PROTECTED]> escribi�: My approach what be to write one class for reading and writing to the configuration and make that class thread-safe using the RLock. Then you create one and only one instance of this class and let all your th

Re: Display the results of a query to an html table

2008-08-19 Thread alex23
On Aug 20, 12:35 am, Amie <[EMAIL PROTECTED]> wrote: > how do you display the results of an sql query and display it onto the > html form or html table You might want to give people time to actually respond to the original thread in which you asked this question, rather than spawning a new one thr

Discrete Simulation

2008-08-19 Thread Tim Roberts
Rather than post a question seeking a solution, I thought I would post a recommendation. I needed to run a simulation of a USB device today, trying to decide whether a device we are building could work with an isochronous pipe in unfavorable conditions without overflowing its FIFOs. I was just ab

Re: exception handling in complex Python programs

2008-08-19 Thread eliben
""" between file() and open() in Python 2 and 3, a NameError is thrown with open() in Python 3 and an IOError is thrown in the other three cases . """ This is *exactly* my concern with Python exceptions. You just never know what can be thrown at you. > You want to look up Easier to Ask Forgivness

回复: How to use win32com to co nvert a MS WORD doc to HTML ?

2008-08-19 Thread Lave
HUH! :) It's solved. Thank you all! You saved my life! Thank you very much. I love you! I love Python! 2008/8/20, Simon Brunning <[EMAIL PROTECTED]>: > 2008/8/19 Lave <[EMAIL PROTECTED]>: >> Hi, all ! >> >> I'm a totally newbie huh:) >> >> I want to convert MS WORD docs to HTML, I found python

Re: who to call a list of method inside the class itself

2008-08-19 Thread Gabriel Genellina
En Tue, 19 Aug 2008 11:18:00 -0300, <[EMAIL PROTECTED]> escribi�: Is the following code is ok. who to call all method. It is working but the call to m() without a reference to self seems strange Ok, so you already know it works - and you want to know why! class CustomMethod: def method1(

Re: searching through a string and pulling characters

2008-08-19 Thread Sean DiZazzo
On Aug 19, 6:11 am, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > On Mon, 18 Aug 2008 15:34:12 -0700 (PDT), Alexnb wrote: > > Also, on a side-note, does anyone know a very simple dictionary site, that > > isn't dictionary.com or yourdictionary.com. > > This one is my favourite:http://www.lingro.com/

Re: how to add property "dynamically"?

2008-08-19 Thread Gabriel Genellina
En Tue, 19 Aug 2008 15:02:29 -0300, Rafe <[EMAIL PROTECTED]> escribió: On Aug 17, 5:09 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: akonsu a écrit :> hello, > i need to add properties to instances dynamically during run time. Properties must be class attributes. The only way (the only

Re: Newbie question about sending and receiving data to the command prompt.

2008-08-19 Thread Gabriel Genellina
En Tue, 19 Aug 2008 16:48:26 -0300, aditya shukla <[EMAIL PROTECTED]> escribi�: I am using windows vista and i am trying to send data to the command prompt ,this is what is done. import subprocess proc =subprocess.Popen('cmd.exe',stdin=subprocess.PIPE) proc.communicate('abc') when i run thi

<    1   2