[issue21671] CVE-2014-0224: OpenSSL upgrade to 1.0.1h on Windows required

2014-06-05 Thread Chris Lambacher
New submission from Chris Lambacher: http://www.openssl.org/news/secadv_20140605.txt All client versions of OpenSSL are vulnerable so all Windows builds of Python are vulnerable to MITM attacks when connecting to vulnerable servers. -- components: Build, Windows messages: 219828 nosy

[issue19011] Enum should have a __getattr__ that makes all the instances available from an instance

2013-09-13 Thread Chris Lambacher
New submission from Chris Lambacher: The use case for this is that when you are in a template and you want to use the Enum instances in a conditional, then you need to pass the Enum class to the template or start using someenumvariable.__class__.someenumvalue. Instead it would be useful

[issue19011] Enum should have a __getattr__ that makes all the instances available from an instance

2013-09-13 Thread Chris Lambacher
Chris Lambacher added the comment: You are not comparing the same thing. Normally when there is a class parameter, those are available from instances of the class. class Test: ...pass ... Test.this = Test() Test.that = Test() Test.this.that __main__.Test instance at 0x7ff681bd3560

[issue19011] Enum should have a __getattr__ that makes all the instances available from an instance

2013-09-13 Thread Chris Lambacher
Chris Lambacher added the comment: For what it's worth, I was confused by the inability to access the class members from the instance for like 3 or 4 weeks until I realized that the instances were not actually on the class and the implications of that for class attribute access

[issue18635] Enum sets _member_type_ to instantiated values but not the class

2013-08-03 Thread Chris Lambacher
Chris Lambacher added the comment: My use case is a generic mixin for Enums and a generic mixin for Django ORM fields that uses the Enums to generate choices. The Enum mixin has to call cls.__class__._get_mixins_(cls.__bases__) to get the member_type so that it can call the member_type

[issue18635] Enum sets _member_type_ to instantiated values but not the class

2013-08-02 Thread Chris Lambacher
New submission from Chris Lambacher: It would be useful to set the discovered member_type to the Enum class and not just the instance. Attached is a patch to add _member_type_ to the enum_class. -- files: enum_member_type_on_class.patch keywords: patch messages: 194199 nosy: lambacck

[issue18545] enum always runs member_type when use_args is True

2013-07-24 Thread Chris Lambacher
New submission from Chris Lambacher: Starting at line 153 in enum.py there is: 153 if not use_args: 154 enum_member = __new__(enum_class) 155 original_value = value 156 else: 157 enum_member = __new__

[issue18508] enum.Enum population of _value2member_map does not match fallback search

2013-07-19 Thread Chris Lambacher
New submission from Chris Lambacher: When an Enum is being created, the _value2member_map class property is defined to speed lookup of Enum values later on. If the value does not exist then it falls back to a linear search through the _member_map.values() looking for member.value == value

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-04-25 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I am really happy to see this as an option in the Windows installer. This has a potential to really reduce the support burden on training new Windows users to use Python and will really help normalize the experience for new users

[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable

2012-04-25 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: The reason for the conditional approach was to attempt to account for the negative consequences of adding enabling this by default. i.e. if you are already a Python developer and install a new version, it will be status quo, but if you

[issue10087] HTML calendar is broken

2011-08-07 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: Senthil: I wasn't advocating the removal of the ability to specify encoding, only stating that avoiding the use of sys.stdout.buffer.write could only sensibly be done if we also removed the ability to specify an encoding (I can see how

[issue10087] HTML calendar is broken

2011-08-06 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: Senthil: I think that would fundamentally make things worse. The HTML calendar apparently always provides a bytes type, but lets assume it provided you with unicode and we used sys.stdout.write on the output. Fundamentally you would get

[issue1626300] 'Installing Python Modules' does not work for Windows

2011-07-18 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I don't think that is the default state. You need to add .py to the PATHEXT environment variable: http://effbot.org/pyfaq/how-do-i-make-python-scripts-executable.htm Maybe Terry did this at some point? My windows box certainly does

[issue1626300] 'Installing Python Modules' does not work for Windows

2011-07-18 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: Now my concern is about packaging: In a typical Windows install, can people run “pysetup3 spam”? The windows installer does not make any additions to the path so it is unlikely that pysetup3 spam will work. There is http

[issue1626300] 'Installing Python Modules' does not work for Windows

2011-07-18 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I am not sure of the difference between 'local script' and 'global command' local script is the setup.py (or for that matter any other script in an arbitrary place in the filesystem. Global command is referring to something installed

[issue1156179] Calls from VBScript clobber passed args

2011-03-24 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: copied to pywin32 bug tracker: http://sourceforge.net/tracker/index.php?func=detailaid=3238774group_id=78018atid=551954 -- nosy: +lambacck ___ Python tracker rep...@bugs.python.org http

[issue969718] BASECFLAGS are not passed to module build line

2011-02-07 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: Antoine said: I don't understand how you can cross-compile using the host Python Makefile. Could you explain? The get_config_vars() function parses the host Makefile to get the values that we are discussing overriding. EXTRA_CFLAGS

[issue969718] BASECFLAGS are not passed to module build line

2011-02-06 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I am not convinced that the minimal patch would work for my original issue. I wanted to be able to override the -march option which shows up in OPT on Fedora. I was cross-compiling to a target architecture that does not support

[issue10087] HTML calendar is broken

2010-12-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: Sorry in advance for the long winded response. Ron, have you looked at my patch? The underlying issue is that the semantics for print() between Python 1 and 3. print() does not accept a bytes type in Python 3. In Python 2 str

[issue10087] HTML calendar is broken

2010-11-23 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I don't think we *need* to have the encoding in the HTML calendar, but I doubt we could remove it at this point, deprecate maybe, but since I don't use the module I don't have a sense for how often the need for encoding comes up

[issue10087] HTML calendar is broken

2010-11-22 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I don't understand what you mean by elides the line breaks in output. They are still there, you just don't see them as \n because print() is no longer implicitly converting the bytes to a string (which appears to actually result

[issue10087] HTML calendar is broken

2010-11-22 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I am attaching a new patch which fixes the majority of the comments raised. 1. Any suggestions about how to test the output of the console program (the case that this bug affects) would be appreciated. 2. Agreed, included in the output

[issue10087] HTML calendar is broken

2010-11-22 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: The test_pydoc method looks workable, but I'll need to come back to it later because I don't have any more time to work on it today. -- ___ Python tracker rep...@bugs.python.org http

[issue969718] BASECFLAGS are not passed to module build line

2010-11-21 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I am attaching a preliminary patch to allow override of $(OPT). I am not sure this is sufficient, but am wary of breaking packages that depend on the existing behaviour. The logic indeed seems wrong, but maybe this is something

[issue1043134] mimetypes.guess_extension('text/plain') == '.ksh' ???

2010-11-21 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: Rafael, There is already a method which returns all the extensions. What is required is a flag (or separate dict) which provides a canonical extension. The questions is whether it is sufficient to rely on the default provided mimetypes

[issue10087] HTML calendar is broken

2010-11-21 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I have attached a patch that conditionally uses sys.stdout.buffer.write to output binary (encoded) data to stdout. -- nosy: +lambacck Added file: http://bugs.python.org/file19768/calendar_bytes_output.patch

[issue6007] distutils tricks you into thinking you can build extensions with mingw

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I just compiled the zope.interface c speedups with MinGW on Python 2.7 and 2.6. There is a patch being tracked in the MinGW patch tracker http://sourceforge.net/tracker/index.php?func=detailaid=2134161group_id=2435atid=302435 related

[issue6007] distutils tricks you into thinking you can build extensions with mingw

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I'm attaching a patch that includes a disclaimer about some extensions not being able to compile and mentioning some of Martin's specifics. I also reorganized the instructions to more directly reflect the current state. This puts

[issue1043134] mimetypes.guess_extension('text/plain') == '.ksh' ???

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: While I agree that getting .ksh is an unfortunate guess, I am not sure how you can guess in the face of many options (especially when the those options are parsed out of a mimetypes file or the windows registry). Perhaps there should

[issue6007] distutils tricks you into thinking you can build extensions with mingw

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: Eric, This documentation is Installing Python Modules which is focused on Distutils, but presumably we would continue to want such a document and account for both Disutils and Disutils2 (once people start using it). I think my patch

[issue6799] mimetypes does not give cannonical extension for guess_extension with text/plain

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: This is a dup of #1043134 -- nosy: +lambacck ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6799

[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: This should be closed as a dup of #1182788 which the OP identified as being the same bug and which is now fixed due to the implementation. of ZIP64. -- nosy: +lambacck ___ Python tracker rep

[issue3636] Managing dual 2.x and 3.0 installations on Windows

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: This seems like a normal file association fight, no different than not being able to have both IE and Firefox associated with .html files. #2375 has been rejected, so I don't think it is a relevant superseder. I don't see how

[issue7858] os.utime(file, (0, 0, )) fails on on vfat, but doesn't fail immediately

2010-11-20 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: win_utime.patch does not apply cleanly on the py3k branch. Adapted, as in the attached win_utime_updated.patch, the solution does fix the problem. I have not added a test because I don't know how to deal with the fat32 requirement

[issue969718] BASECFLAGS are not passed to module build line

2009-10-07 Thread Chris Lambacher
Chris Lambacher ch...@kateandchris.net added the comment: I am running into a problem related to this. I am attempting to cross compile extensions but Fedora includes -march in the OPT variable. Since there is no way to exclude the OPT values the build fails. It seems that forcing OPT to stay

[issue3671] What's New in 2.6 - corrections

2008-09-05 Thread Chris Lambacher
Chris Lambacher [EMAIL PROTECTED] added the comment: In rev66217, the itertools example for With two iterables, 2N-tuples are returned. has a typo: itertools(product([1,2], [3,4], repeat=2) should be: itertools.product([1,2], [3,4], repeat=2) -- nosy: +lambacck

Re: Getting a class name from within main

2007-02-08 Thread Chris Lambacher
On Wed, Feb 07, 2007 at 01:02:39AM -0800, [EMAIL PROTECTED] wrote: Hi, Lets say I have the following class - class MyClass: def __init__(self): print (__name__.split(.))[-1] I would spell this: print self.__class__.__name__ if __name__ == '__main__':

Re: OSS and ALSA

2007-02-02 Thread Chris Lambacher
On Fri, Feb 02, 2007 at 12:08:22AM -0200, Silver Rock wrote: Hi all, I've seen that python comes by default with a module for communication with OSS. I've looked for a ALSA module too (pyalsa) but it seems to handle only limited operations. how about

Re: printing to a redirected stdout from a process that was called with 21 /dev/null

2007-01-30 Thread Chris Lambacher
On Mon, Jan 29, 2007 at 03:12:37PM -0800, Pappy wrote: SHORT VERSION: Python File B changes sys.stdout to a file so all 'prints' are written to the file. Python file A launches python file B with os.popen(./B 2^1 dev/null ). Python B's output disappears into never-never land. LONG

Re: printing to a redirected stdout from a process that was called with 21 /dev/null

2007-01-30 Thread Chris Lambacher
Actually, I got around this problem by using an intermediate process that happens to handle output on its own (bsub). On 1/30/07, Chris Lambacher [EMAIL PROTECTED] wrote: The subprocess module is probably a good starting point: [2]http://docs.python.org/dev/lib/module

Re: Newbie XML SAX Parsing: How do I ignore an invalid token?

2007-01-05 Thread Chris Lambacher
What exactly is invalid about the XML fragment you provided? It seems to parse correctly with ElementTree: from xml.etree import ElementTree as ET e = ET.fromstring( ... cities ... city ... nameTampa/name ... descriptionA great city ^^ and place to live/description ... /city ...

Re: Why does Python never add itself to the Windows path?

2007-01-02 Thread Chris Lambacher
On Sat, Dec 30, 2006 at 04:55:09PM -0800, Ben Sizer wrote: Martin v. L?wis wrote: Ben Sizer schrieb: I've installed several different versions of Python across several different versions of MS Windows, and not a single time was the Python directory or the Scripts subdirectory added

Re: Why does Python never add itself to the Windows path?

2007-01-02 Thread Chris Lambacher
On Tue, Jan 02, 2007 at 09:08:41AM -0800, Ben Sizer wrote: Chris Lambacher wrote: On Sat, Dec 30, 2006 at 04:55:09PM -0800, Ben Sizer wrote: Yet many scripts and applications require parameters, or to be executed from a certain directory. For example, setup.py. Or the various

Re: def index(self):

2006-12-18 Thread Chris Lambacher
On Mon, Dec 18, 2006 at 08:40:13PM +0100, Gert Cuykens wrote: Is there a difference between Yes. The first one causes an exception and the second one doesn't. code class HelloWorld: def index(self): index.exposed = True index is not defined. HelloWorld.index is and self.index is, but

Re: Wrapping classes with pure virtual functions

2006-12-17 Thread Chris Lambacher
On Thu, Dec 14, 2006 at 01:57:10PM -0800, [EMAIL PROTECTED] wrote: Hi, I'm having problems wrapping a hierarchy of classes, actually having problems wrapping the base class. I don't need to use the WrapClass mechanism since I don't want to override classes in Python. My code boils down to:

Re: SOAP Server with WSDL?

2006-12-07 Thread Chris Lambacher
On Thu, Dec 07, 2006 at 12:49:09PM -0800, tobiah wrote: I'm having trouble finding information about writing a SOAP server. I get the client part. There is much information about writing a client, but not so much about writing the server. Are there some good tutorials? I'm checking out:

Re: SOAP Server with WSDL?

2006-12-07 Thread Chris Lambacher
On Thu, Dec 07, 2006 at 01:52:59PM -0800, tobiah wrote: You want ZSI. If you already have a wsdl you then use wsdl2py and wsdl2dispatch to create your server classes. The server classes get used with ZSI.ServiceContainer. Unfortunately there is not much documentation about this.

Re: Programmatically replacing an API for another module

2006-11-22 Thread Chris Lambacher
On Tue, Nov 21, 2006 at 05:00:32PM -0800, Tom Plunket wrote: Bruno Desthuilliers wrote: I've got a bunch of code that runs under a bunch of unit tests. It'd be really handy if when testing I could supply replacement functionality to verify that the right things get called without

Re: Programmatically replacing an API for another module

2006-11-22 Thread Chris Lambacher
I'm just a bit loathe to download and install more stuff when something simpler appears to be near-at-hand. ...especially considering the page describing this module doesn't offer any download links! http://python-mock.sourceforge.net/ How about mini-mock:

Re: PyParsing and Headaches

2006-11-22 Thread Chris Lambacher
On Wed, Nov 22, 2006 at 11:17:52AM -0800, Bytter wrote: Hi, I'm trying to construct a parser, but I'm stuck with some basic stuff... For example, I want to match the following: letter = A...Z | a...z literal = letter+ include_bool := + | - term = [include_bool] literal So I defined

Re: plasTeX doesn't load LaTeX packages

2006-11-15 Thread Chris Lambacher
On Sat, Nov 11, 2006 at 01:23:30PM +0100, giovanni gherdovich wrote: Hello, first of all: Is this the right place to ask plastek-related questions? I would suspect that the plastex-users mailing list would be the right forum for plasTeX related questions:

Re: Help with installing soappy module on Python 2.4.3 (windows machine)

2006-11-08 Thread Chris Lambacher
On Tue, Nov 07, 2006 at 07:30:49AM -0800, [EMAIL PROTECTED] wrote: Hi Folks, I want to install the SOAPpy module on my windows box. I have python 2.4.3 Can you help me with the steps and the URL from where can I get the download..?? http://pywebsvcs.sourceforge.net/ TIA.

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Nov 7)

2006-11-07 Thread Chris Lambacher
On Tue, Nov 07, 2006 at 04:15:39PM -0500, John Salerno wrote: Cameron Laird wrote: Fredrik Lundh collects pyidioms: http://effbot.org/zone/python-lists.htm Not working? perhaps http://effbot.org/zone/python-list.htm ? -- http://mail.python.org/mailman/listinfo/python-list

Re: python2.5 importerror on md5

2006-10-23 Thread Chris Lambacher
On Mon, Oct 23, 2006 at 01:28:46PM -0700, samn wrote: i think the problem is different versions of openssl on the two machines , 0.9.7a and 0.9.8b I second that this is the likely culprit. I got bit by it while trying to do cross compile. The module build process assumes a couple of locations

Re: Where can I find good python code?

2006-10-13 Thread Chris Lambacher
On Sat, Oct 14, 2006 at 01:08:37AM +0900, js wrote: Hi, I've learned basics of Python and want to go to the next step. So I'm looking for good python examples I steal good techniques from. I found Python distribution itself contains some examples in Demo directory. I spent some time to

Re: is there an easy way to create a database on the fly and let the user input values

2006-10-12 Thread Chris Lambacher
I've heard good things about Dabo: http://dabodev.com/ On Wed, Oct 11, 2006 at 09:44:37PM -0700, [EMAIL PROTECTED] wrote: I don't realy care what database I use wx.grid or whatever. I wan't it to look at a line 128 9023 23428 exc and create the database or pick something out of the

Re: Python programs always open source?

2006-09-19 Thread Chris Lambacher
On Tue, Sep 19, 2006 at 09:46:13PM +1000, Ben Finney wrote: Diez B. Roggisch [EMAIL PROTECTED] writes: Ben Finney schrieb: My claim (and IANAL) is that it doesn't matter *what* license Python is distributed under; unless you do something with Python that is a right of the copyright

Re: latex openoffice converter

2006-09-14 Thread Chris Lambacher
http://latex2rtf.sourceforge.net/ -Chris On Thu, Sep 14, 2006 at 08:29:19PM +0200, Fabian Braennstroem wrote: Hi, I would like to use python to convert 'simple' latex documents into openoffice format. Maybe, anybody has done something similar before and can give me a starting point!?

Re: soap comlex data to plain xml

2006-08-25 Thread Chris Lambacher
You would probably get more responses on the pywebsvcs mailing list http://pywebsvcs.sf.net SOAP goes over HTML, so you can use httplib to do what you want. Just go look up the protocol details (hint use Google). You will probably want to use ZSI or SOAPpy to serialize the request body to xml

Re: How to write a Installer for a Python App in Linux

2006-08-11 Thread Chris Lambacher
If you mean that you are building Python2.4 and get an error during the configure step, you need to install libc6-dev. You are likely to find lots of issues unless you install some basic developer tools. There are some metapackages that get the right things for you, but I can't remember what it

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread Chris Lambacher
How is your data stored? (site was not loading for me). test = 'blah = [1,2,3,4,5]' var,val = test.split('=') print var,val blah [1,2,3,4,5] val = val.strip('[] ') print val 1,2,3,4,5 vals = [int(x) for x in val.split(',')] print vals [1, 2, 3, 4, 5] More sophisiticated situations (like

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread Chris Lambacher
There were some mistakes in here. Thats what I get for repurposing existing code for an example. The uncommented lines are changed. On Wed, Aug 09, 2006 at 11:04:32AM -0400, Chris Lambacher wrote: from pyparsing import Suppress, Regex, delimitedList, Forward, QuotedString, Group stringValue

Re: Eval (was Re: Question about using python as a scripting language)

2006-08-09 Thread Chris Lambacher
On Wed, Aug 09, 2006 at 11:51:19AM -0400, Brendon Towle wrote: On 9 Aug 2006, at 11:04 AM, Chris Lambacher wrote: How is your data stored? (site was not loading for me). In the original source HTML, it's like this (I've deleted all but the beginning and the end of the list

Re: Extending/Embedding Confusion

2006-08-08 Thread Chris Lambacher
Depending on what you are trying to do you might be better off to start by using Pyrex, Boost::Python or Swig. http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ http://www.boost.org/libs/python/doc/ http://www.swig.org/ -Chris On Fri, Aug 04, 2006 at 11:51:14AM -0700, jeremito wrote: I

Re: Backup GMAIL Messages with Python

2006-08-08 Thread Chris Lambacher
fetchmail worked for me. You have to be patient though because it takes a while for all of your mail to become available for pop download. -Chris On Sat, Aug 05, 2006 at 08:43:32PM -0400, Gregory Pi?ero wrote: On 8/5/06, Neil Hodgson [EMAIL PROTECTED] wrote: While you can write a script,

Re: Mouse LED Control in Python

2006-07-31 Thread Chris Lambacher
There is not enough information in that post to be able to reimpliment what he did in any language. You will have to try and get in touch with the author. -Chris On Sun, Jul 30, 2006 at 01:26:40PM -0700, [EMAIL PROTECTED] wrote: I found this link that describes the byte arrays to control the

Re: getting debug from urllib2

2006-07-31 Thread Chris Lambacher
On Mon, Jul 31, 2006 at 02:43:36PM +0100, Ben Edwards wrote: Have been experimenting with HTTP stuff in python 2.4 and am having a problem getting debug info. If I use utllib.utlopen I get debug but if I user utllib2 I do not. Below is the probram and the output I am getting. Any insight?

Re: self question

2006-07-26 Thread Chris Lambacher
On Tue, Jul 25, 2006 at 08:08:32PM +0200, Sch?le Daniel wrote: [EMAIL PROTECTED] schrieb: cnt = 1 def foo(): global cnt cnt += 1 return cnt def bar(x=foo()): print x bar() # 2 bar() # 2 bar() # 2 Looks to me like you want to use the

Re: extender method

2006-07-26 Thread Chris Lambacher
On Wed, Jul 26, 2006 at 09:21:10AM -0700, [EMAIL PROTECTED] wrote: 'Learning Python' by Lutz and Ascher (excellent book by the way) explains that a subclass can call its superclass constructor as follows: class Super: def method(self): # do stuff class Extender(Super): def

Re: Using iterators to write in the structure being iterated through?

2006-07-26 Thread Chris Lambacher
I think you are going to need to provide some python minimal code as an example of what is not working for you. -Chris On Wed, Jul 26, 2006 at 11:39:36AM -0400, Pierre Thibault wrote: Hello! I am currently trying to port a C++ code to python, and I think I am stuck because of the very

Re: Python newbie needs constructive suggestions

2006-07-24 Thread Chris Lambacher
On Sat, Jul 22, 2006 at 09:31:26PM +0200, Bruno Desthuilliers wrote: Lawrence D'Oliveiro a ?crit : In message [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: b) give up on using an anonymous function and create a named successor function with def, This is what you have to do.

Re: PySNMP Thread unsafe?

2006-07-24 Thread Chris Lambacher
On Mon, Jul 24, 2006 at 02:21:10AM -0700, [EMAIL PROTECTED] wrote: I'm trying to monitor about 250 devices with SNMP, using PySNMP version 4. I use the threading.Thread to create a threadpool of 10 threads, so devices not responding won't slow down the monitoring process too much. Here

Re: list of indices

2006-07-24 Thread Chris Lambacher
On Mon, Jul 24, 2006 at 08:14:35AM -0700, Julien Ricard wrote: hi, is there any method to get only some elements of a list from a list of indices. Something like: indices=[0,3,6] new_list=list[indices] new_list = [list[x] for x in indicies] which would create a

Re: ConfigParser: what read('non-existent-filename') returns in 2.3.x?

2006-07-21 Thread Chris Lambacher
On Thu, Jul 20, 2006 at 02:01:08PM -0700, Danil Dotsenko wrote: Chris Lambacher wrote: On Thu, Jul 20, 2006 at 10:50:40AM -0700, Danil Dotsenko wrote: Wrote a little user-friedly wrapper for ConfigParser for a KDE's SuperKaramba widget. (http://www.kde-look.org/content/show.php?content

Re: ConfigParser: what read('non-existent-filename') returns in 2.3.x?

2006-07-20 Thread Chris Lambacher
On Thu, Jul 20, 2006 at 10:50:40AM -0700, Danil Dotsenko wrote: Wrote a little user-friedly wrapper for ConfigParser for a KDE's SuperKaramba widget. (http://www.kde-look.org/content/show.php?content=32185) I was using 2.4.x python docs as reference and

Re: WSDL and SOAP?

2006-07-19 Thread Chris Lambacher
If you want to do it in python, pywebsvcs is the place for both SOAPpy and ZSI, two SOAP frameworks. The WSDL defines the service's API. Both SOAPpy and ZSI allow you to use that to construct SOAP messages and handle the conversion from basic python types (int, string, etc) to SOAP encoding of

Re: Python WSDL Generation Tools

2006-07-14 Thread Chris Lambacher
You will probably have more result on the pywebsvcs-talk mailing list. http://pywebsvcs.sf.net/ That said, ZSI will generate code from wsdl. I am not sure what it is you are asking for, but this is probably what you actually want. -Chris On Tue, Jul 11, 2006 at 11:15:45AM +0530, Vedanta

Re: Augument assignment versus regular assignment

2006-07-08 Thread Chris Lambacher
Looks like x=x+[2] creats a new list to me: b = [8,5,6] x = b x = x + [2] print b,x [8, 5, 6] [8, 5, 6, 2] -Chris On Sat, Jul 08, 2006 at 11:56:11AM -0700, nagy wrote: Thanks, Kirk. I considered the += as only a shorthand notation for the assignment operator. Since for lists + is simply a

Re: Problem on win xp and run time error

2006-06-20 Thread Chris Lambacher
On Sat, Jun 17, 2006 at 07:32:34AM +, Michele Petrazzo wrote: Chris Lambacher wrote: On Fri, Jun 16, 2006 at 06:11:53PM +, Michele Petrazzo wrote: Hi list, just found in this moment that my applications stop to work with win xp and receive this error: This application has

Re: Problem on win xp and run time error

2006-06-16 Thread Chris Lambacher
On Fri, Jun 16, 2006 at 06:11:53PM +, Michele Petrazzo wrote: Hi list, just found in this moment that my applications stop to work with win xp and receive this error: This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support

Re: Which compiler will Python 2.5 / Windows (Intel) be built with?

2006-06-15 Thread Chris Lambacher
On Thu, Jun 15, 2006 at 08:36:21PM +0200, Jarek Zgoda wrote: Fredrik Lundh napisa?(a): hint: most people who provide third-party extensions to Python support more than just the latest Python version... We're happy with your support for us, Windows users, but you are an exception to the

Re: TKinter

2006-06-11 Thread Chris Lambacher
- Shri Mataji Nirmala Devi. [1]www.tnsahaj.org. - Original Message From: Chris Lambacher [EMAIL PROTECTED] To: V Sivakumar [EMAIL PROTECTED] Cc: python-list@python.org Sent: Saturday, 10 June, 2006 9:26:38 AM Subject: Re: TKinter GTK+ + Glade [2]http

Re: TKinter

2006-06-10 Thread Chris Lambacher
GTK+ + Glade http://pygtk.org/ WxPython has several GUI editors http://wxpython.org PyQt has the ability to generate code from the Qt GUI designer http://www.riverbankcomputing.co.uk/pyqt/ I personally have used GTK+ and Glade with great success. I found WxPython to be lacking in polish. I

Re: how to switch from os.tmpnam to os.tmpfile

2006-06-08 Thread Chris Lambacher
You should be able to find exactly what you need in the tempfile module. http://docs.python.org/lib/module-tempfile.html os.tmpfile() is no good whether you want the filename or not since on Windows it is likely to break if you are not a privileged user. Its a windows problem, not an actual bug

Re: Python for Visual Basic or C# programmers

2006-06-02 Thread Chris Lambacher
On Fri, Jun 02, 2006 at 10:26:28AM +0200, Laurent Pointal wrote: A.M a ?crit : Hi, I am trying to find the equivalent functions such as vb's str or asc in Python. Is there any resource that help me to find these kinds of functions in Python faster? mode pub=on I've

Re: Add file to zip, or replace file in zip

2006-06-01 Thread Chris Lambacher
Skip over the file in question when you first are zipping the directory. Unfortunately you cannot replace or remove a file from a zip without unzipping and rezipping all the contents. -Chris On Wed, May 31, 2006 at 03:10:53PM +0800, majj81 wrote: hi: Good afternoon. Has this

Re: How to get client's IP address in the threaded case of SimpleXMLRPCServer?

2006-05-07 Thread Chris Lambacher
On Fri, May 05, 2006 at 05:02:57PM -0400, Eirikur Hallgrimsson wrote: Okay, I've banged my head against this for about three days on and off. The client's IP is passed to my handler in the non-threaded case. It's not in the threaded case, which is actually rather different with a couple of

Re: How to doctest if __name__ already used?

2006-05-07 Thread Chris Lambacher
On Fri, May 05, 2006 at 10:33:48PM +, Leo Breebaart wrote: Trigger doctest.testmod() via a --test command-line option, is what I'm thinking. But is that really the best way? That is what I would have suggested. -Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Chris Lambacher
On Sun, May 07, 2006 at 11:57:55AM -0700, Alex Martelli wrote: [1] I'm considering introducing bugs or misdesigns that have to be fixed as part of training for the purposes of this discussion. Also the Actually, doing it _deliberately_ (on training projects for new people just coming

Re: unittest.main-workalike that runs doctests too?

2006-05-06 Thread Chris Lambacher
On Fri, May 05, 2006 at 06:47:26PM +0100, John J. Lee wrote: Jay Parlar [EMAIL PROTECTED] writes: On May 5, 2006, at 6:35 AM, John J. Lee wrote: [...] I know about nose, but it seems just a little too magical for my tastes, and includes stuff I don't really need. [...] nose actually

Re: What is wrong with the Python home page?

2006-05-02 Thread Chris Lambacher
Works for me with FireFox 1.5.2, but I am on WinXP at the moment. -Chris On Tue, May 02, 2006 at 01:43:58PM -0700, fuzzylollipop wrote: I am using FireFox 1.5.2 on OS X 10.4.6 and the www.python.org ends up being only text with just the nasa picture with the guy in the space suit. It looks

Re: Can one query full name (or version) of selected packages at pypi?

2006-04-28 Thread Chris Lambacher
On Thu, Apr 20, 2006 at 02:26:02AM -0700, Caleb Hattingh wrote: I could do these steps myself with normal http access and screen-scraping, but is there already such a system/script somewhere? Alternatively, how do you all keep versions of python addons up-to-date? Manually? I use

Re: Looking for resources for making the jump from Java to Python easier and more productive

2006-04-22 Thread Chris Lambacher
http://dirtsimple.org/2004/12/python-is-not-java.html http://dirtsimple.org/2004/12/java-is-not-python-either.html http://dirtsimple.org/2004/12/python-interfaces-are-not-java.html This link seems to be down at the moment. http://naeblis.cx/rtomayko/2004/12/15/the-static-method-thing The above

Re: 2.5 excitement (was Re: Java Developer Exploring Python)

2006-04-18 Thread Chris Lambacher
At least on windows. PySqlite is statically linked with the sqlite library. This can be done because it is quite small. -Chris On Tue, Apr 18, 2006 at 06:51:24PM +, Jon Ribbens wrote: In article [EMAIL PROTECTED], Aahz wrote: On that front, I think that pysqlite is much more important

Re: using NamedTemporaryFile on windows

2005-12-29 Thread Chris Lambacher
On Thu, Dec 29, 2005 at 12:40:34AM -0500, Peter Hansen wrote: What I don't understand is why you _can't_ reopen the NamedTemporaryFile under Windows when you can reopen the file created by mkstemp (and the files created by TemporaryFile are created by mkstemp in the first place). Basically

Re: SVG rendering with Python

2005-12-16 Thread Chris Lambacher
On Fri, Dec 16, 2005 at 01:58:40PM +1100, richard wrote: Andreas Lobinger wrote: richard wrote: Dennis Benzinger wrote: Does anybody know of a SVG rendering library for Python? Google python svg ... to find what? The answer to the OP's question. The OP's question is ambiguous.

Re: SVG rendering with Python

2005-12-15 Thread Chris Lambacher
You might be able to use AGG (anti grain geometry) to do svg to raster image conversion. I think there are python bindings for AGG. I know matplotlib uses AGG, but not for SVG rendering. -Chris On Wed, Dec 14, 2005 at 10:59:17PM +0100, Dennis Benzinger wrote: Hi! Does anybody know of a SVG

Re: bizarre id() results

2005-12-15 Thread Chris Lambacher
a.m1 returns a bound method which gets freed before you try checking a.m2, which ends up getting the same peice of memory. If you save a reference to the bound methods, they are forced to have separate objects. class A: ... def m1(self): print m1 ... def m2(self): print m2 ... a = A()

Re: improving pypi / setuptools

2005-11-30 Thread Chris Lambacher
On Wed, Nov 30, 2005 at 11:49:14AM +0100, Fredrik Lundh wrote: Alia Khouri wrote: What ideas do people out there have for making the installation of python module more reliable? judging from the support load it's causing me these days, setuptools is a piece of utter crap. if you want

Re: Why doesn't this work? :)

2005-10-28 Thread Chris Lambacher
I think what you really want is: try: # this will fail and be caught # below, w import foobar except ImportError, error: class foobarclass: def __getattr__(*args, **kargs): return None foobar = foobarclass() print

  1   2   >