Re: Mutable objects inside tuples - good or bad?

2014-04-07 Thread Paul Kölle
Am 06.04.2014 09:25, schrieb Gary Herron: On 04/05/2014 11:53 PM, John Ladasky wrote: I find this programming pattern to be useful... but can it cause problems? No. What kind of problems are you considering? It won't break Python. It's perfectly legal code. The tuple c is still immutable,

Re: Mutable objects inside tuples - good or bad?

2014-04-07 Thread Paul Kölle
Am 07.04.2014 17:44, schrieb Chris Angelico: On Tue, Apr 8, 2014 at 1:26 AM, Paul Kölle pkoe...@gmail.com wrote: It seems a tuple's immutability is debatable, or is this another instance of the small-integer-reuse-implementation-detail-artifact? Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48

Re: Kivy for Python 3.3

2013-07-12 Thread Paul Kölle
Am 11.07.2013 16:26, schrieb fronag...@gmail.com: [scnipp] C:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Python33\include -IC:\Python33\include -c kivy\graphics\vertex_instructions.c -o build\temp.win32-3.3\Release\kivy\grap hics\vertex_instructions.o In file included from

Re: Kivy for Python 3.3

2013-07-11 Thread Paul Kölle
Am 11.07.2013 11:09, schrieb fronag...@gmail.com: Hello, first time poster here, and general newbie to Python. I'm looking to write a program in Python, (and have in fact written most of it by now,) and am trying to put together a GUI for it. Kivy looks very nice, particularly with the fact

Re: Apache and suexec issue that wont let me run my python script

2013-06-02 Thread Paul Kölle
Am 01.06.2013 07:30, schrieb Νικόλαος Κούρας: [snipp] [Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] suexec failure: could not open log file [Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] fopen: Permission denied [Thu May 30 15:29:33 2013] [error] [client 46.12.46.11]

Re: accessing an OLE Automation (IDispatch) server from python which requires the use of out params

2012-12-11 Thread Paul Kölle
Hi, Am 10.12.2012 20:13, schrieb bitbucket: I have an existing Windows application which provides an OLE Automation (IDispatch) interface. I'm not able to change that interface. I'd like to call it from a scripting language. I figure this would provide a nice quick way to invoke on the app.

Re: Help accessing COM .dll from Python

2012-12-01 Thread Paul Kölle
Hi, Am 01.12.2012 10:51, schrieb Steve Simmons: First time post - be gentle with me :-) I am trying to write a Python script to access a scanning device. I have an SDK for the scanner but the documentation is a bit limited and the supplier doesn't support Python (but Python is the best option

Re: Constructing JSON data structures from non-string key python dictionaries

2012-11-22 Thread Paul Kölle
Am 21.11.2012 17:04, schrieb hfo...@gmail.com: Thanks for your reply, but the javascript function expects option names to be unquoted, otherwise it won't work. Others have shown you how to solve this, but I would like to note that the function does NOT expect JSON but a simple javascript object

Re: Forking simplejson

2011-10-27 Thread Paul Kölle
Am 26.10.2011 19:34, schrieb Nathan Rice: Since this happily went off to the wrong recipient the first time... The python json module/simpljson are badly in need of an architecture update. The fact that you can't override the encode method of JSONEncoder and have it work reliably without

Re: Need advice on Web / Database framework...

2011-09-03 Thread Paul Kölle
Hi, Am 03.09.2011 16:11, schrieb Benjamin Schollnick: Folks, I need some advice on a python web database framework to use...? Hardest question ever ;) I have handcrafted a sqllite3 python script, that is a basic web application, interfacing with a sqlite3 database... But I am concerned

Re: Installing WebDAV server

2011-08-31 Thread Paul Kölle
Hi, Am 30.08.2011 22:00, schrieb Fokke Nauta: Hi all, I am completely new to Python, but I'm confronted with a problem I can't solve. Welcome to python. This is my question: [snip] I installed Python 3.2.1 and extracted the packages PyWebDAV and PyXML. Now I have a working Python app and

Re: Installing WebDAV server

2011-08-31 Thread Paul Kölle
Hi, answers below... Am 31.08.2011 14:18, schrieb Fokke Nauta: Paul Köllep...@subsignal.org wrote in message news:mailman.595.1314780791.27778.python-l...@python.org... Hi, Am 30.08.2011 22:00, schrieb Fokke Nauta: Hi all, I am completely new to Python, but I'm confronted with a problem I

Re: Methods on file-like objects can only used once on one object?

2011-08-23 Thread Paul Kölle
Am 23.08.2011 16:21, schrieb Yingjie Lin: Hi Python users, [snip] There are quite a few methods for file-like objects that can only be used once on one object. If I prefer to use some of these methods on one object, one after another, like: f.readlines() f.read() ... What should I do?

Re: Order of addresses returned by socket.gethostbyname_ex()

2011-08-22 Thread Paul Kölle
Am 22.08.2011 13:37, schrieb Roy Smith: In article c4163eeb-c306-49d1-9337-0eb9f47df...@s12g2000yqm.googlegroups.com, Tomas Lidéntomas.liden.pri...@gmail.com wrote: A cross-platform deterministic order would be excellent for us. A cross-platform deterministic X would be excellent is a true

Re: Please code review.

2011-08-02 Thread Paul Kölle
Am 02.08.2011 13:45, schrieb Karim: Hello, I need a generator to create the cellname in a excell (using pyuno) document to assign value to the correct cell. The following code does this but do you have some optimizations on it, for instance to get the alphabetic chars instead of hard-coding

Re: How to build an application in Django which will handle Multiple servers accross network

2011-04-29 Thread Paul Kölle
Hi, Am 29.04.2011 12:01, schrieb Adam Tauno Williams: On Thu, 2011-04-28 at 23:47 -0700, Anurag (anu) Agarwal wrote: Hi All, I want to build an application for one of my client which has following features 1. Client has some driver software which can be installed on Windows and Linux based

Re: [Beginer Question] I heard about python needing somesort of_VariableName_ boiler plate?

2010-11-02 Thread Paul Kölle
Its the entry point if the script is executed directly. This message was sent from my 7 years old Dell D800 (without cables) Am 01.11.2010 19:18, schrieb brad...@hotmail.com: Sorry that is what I mean. What is it for? Sent wirelessly from my BlackBerry. -Original Message- From:

Re: please help explain this result

2010-10-17 Thread Paul Kölle
Am 17.10.2010 13:48, schrieb Steven D'Aprano: On Sun, 17 Oct 2010 03:58:21 -0700, Yingjie Lan wrote: Hi, I played with an example related to namespaces/scoping. The result is a little confusing: [snip example of UnboundLocalError] Python's scoping rules are such that if you assign to a

Re: please help explain this result

2010-10-17 Thread Paul Kölle
Am 17.10.2010 19:51, schrieb TomF: On 2010-10-17 10:21:36 -0700, Paul Kölle said: Am 17.10.2010 13:48, schrieb Steven D'Aprano: On Sun, 17 Oct 2010 03:58:21 -0700, Yingjie Lan wrote: Hi, I played with an example related to namespaces/scoping. The result is a little confusing: [snip

Re: Windows - select.select, timeout and KeyboardInterrupt

2010-05-09 Thread Paul Kölle
Am 09.05.2010 11:59, schrieb Lawrence D'Oliveiro: In messagemailman.2769.1273327083.23598.python-l...@python.org, exar...@twistedmatrix.com wrote: On 07:48 am, l...@geek-central.gen.new_zealand wrote: In messagemailman.2760.1273288730.23598.python-l...@python.org, exar...@twistedmatrix.com

Re: Django as exemplary design

2010-05-09 Thread Paul Kölle
Am 07.05.2010 04:48, schrieb TomF: On 2010-05-06 18:20:02 -0700, Trent Nelson said: I'm interested in improving my python design by studying a large, well-designed codebase. I'll tell you one of the best ways to improve your Python code: attend one of Raymond Hettinger's Code Clinic workshops

Re: Accessing an instance of a class from within instance of another class

2010-04-30 Thread Paul Kölle
Am 30.04.2010 13:05, schrieb Stefan Krastanov: Hello all, [snipp] Here is the problem: I have a class (call it Data) that has a number of NumPy arrays and some methods that get useful information from the arrays (math stuff). I have two other classes (called Viewer1 and Viewer2) (they are

Re: plugin / intra process communication system

2010-02-16 Thread Paul Kölle
Am 15.02.2010 23:12, schrieb Florian Ludwig: On Sun, 2010-02-14 at 18:47 +0100, Diez B. Roggisch wrote: [...] And then of course, this is not really needed. In Python, behavior counts, not type-information. So you can get away without any explicit declared interface. You might chose to not do

Re: plugin / intra process communication system

2010-02-14 Thread Paul Kölle
Am 13.02.2010 10:50, schrieb Florian Ludwig: Hi, I'm looking for a module/plugin/intra-process-communication/hook system for python. Maybe someone here could point me to some project I missed or might have some good ideas if I end up implementing it myself. Most systems I have found are one to

Re: Trying to run a sudo command from script

2010-01-02 Thread Paul Kölle
Am 01.01.2010 23:55, schrieb Kent Tenney: Howdy, Hi Kent, A script running as a regular user sometimes wants to run sudo commands. It gets the password with getpass. pw = getpass.getpass() I've fiddled a bunch with stuff like proc = subprocess.Popen('sudo touch /etc/foo'.split(),

Re: Egg problem (~/.python-eggs)

2006-09-01 Thread paul kölle
Mike Orr wrote: [... snipp ...] Can I make it use a different eggs directory? Any other idea how to install a program using eggs on a server? I had a similar issue with tracd on gentoo. My solution was setting PYTHON_EGG_CACHE=/tmp/.egg_cache in /etc/conf.d/tracd and exporting that var in

Re: Using Python for my web site

2006-08-03 Thread paul kölle
Cliff Wells wrote: For myself, I handle user-installation of TurboGears pretty much like I do all user-installed Python packages: using setuptools. Any user who uses easy_install or 'python setup.py install' gets their packages automatically installed into a subdirectory of their home

Re: Type signature

2006-07-24 Thread paul kölle
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Yacao Wang wrote: However, type signatures are not only a kind of information provided for the compiler, but also for the programmer, or more important, for the programmer. Without it, we have to infer the return type or required

Re: SQLObject connection/transaction blowing up

2006-01-14 Thread paul kölle
[EMAIL PROTECTED] wrote: I'm trying to connect to a mysql database, with autoCommit and caching off, and I'm trying to create a transaction. Why does this blow up? As the traceback is telling you, your connectionString is missing the actual values. Not sure about the cache parameter but:

Re: unittest setup

2005-09-25 Thread paul kölle
Diez B. Roggisch wrote: paul kölle wrote: hi all, I noticed that setUp() and tearDown() is run before and after *earch* test* method in my TestCase subclasses. I'd like to run them *once* for each TestCase subclass. How do I do that. Create a global/test instance flag. I'm not sure if I

Re: Python Digest authentication against MS MapPoint

2005-09-05 Thread paul kölle
[EMAIL PROTECTED] wrote: [problem with digest auth] sorry for giving such a generic advice, but I'd capture the headers of the C# app and compare with the urllib version line by line. Try to reproduce the exact header with python (except the response and cnonce of course). Maybe IIS has its own