Re: Making module content available in parent module

2010-11-23 Thread Gregor Horvath
Hi, On Tue, 23 Nov 2010 11:36:05 +0100 Ulrich Eckhardt wrote: > Now, my problem is I have a directory containing test scripts which I > all want to run. I used to run them individually and manually, but > want to avoid this overhead in the future. > > tests/ >foo.py # defines TestFoo1 and

Re: polymorphic function question

2010-09-21 Thread Gregor Horvath
Am Tue, 21 Sep 2010 11:35:14 -0700 (PDT) schrieb joblack : > Let's say I've got a function with > > def doesSomething(A='bla'): > ... > > and I try to call it with a non existent variable with > > doesSomething(DoesNotExist) > > What will happen? Will it throw an exception or will it take the

Re: Encode HTML CDATA name token

2010-09-20 Thread Gregor Horvath
Am Mon, 20 Sep 2010 21:36:46 +1200 schrieb Lawrence D'Oliveiro : > In message <20100920104546.3699e...@valun>, Gregor Horvath wrote: > > > Is there a encoder / decoder in Python that can convert arbitrary > > text to and from this encoding in an readable manner? >

Encode HTML CDATA name token

2010-09-20 Thread Gregor Horvath
Hi, ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). [1] Is there a encoder / decoder in Python that can convert arbitrary text to and from this encoding in an re

Re: Python 3 put-downs: What's the point?

2010-07-06 Thread Gregor Horvath
Am Mon, 05 Jul 2010 14:32:13 -0500 schrieb Tim Chase : > On 07/05/2010 02:50 AM, Gregor Horvath wrote: > > Am Sun, 04 Jul 2010 18:51:54 -0500 > > schrieb Tim Chase: > > > >> I think it's the same venting of frustration that caused veteran > >> VB6 dev

Re: Python 3 put-downs: What's the point?

2010-07-05 Thread Gregor Horvath
Am Sun, 04 Jul 2010 18:51:54 -0500 schrieb Tim Chase : > I think it's the same venting of frustration that caused veteran > VB6 developers to start calling VB.Net "Visual Fred" -- the > language was too different and too non-backwards-compatible. > VB6 -> VB.NET and Python 2 -> 3 is not a vali

Re: How to pass a global variable to a module?

2009-09-29 Thread Gregor Horvath
Hi, Am Tue, 29 Sep 2009 09:40:29 -0700 (PDT) schrieb Mars creature : > I just start to use python and love this language. I met this > problem when I try to save my functions in a separate file. > The question is how I can pass a global variable to a function which > is saved in another file. I

Re: Business issues regarding adapting Python

2009-09-27 Thread Gregor Horvath
Hi, Am Sun, 27 Sep 2009 00:13:47 -0700 (PDT) schrieb Nash : > I'm a big time python fan and it has helped me write code fast and > push it out quickly. We have a medium sized telecom product written > 90% in Python and 10% in Java. The problem is, in the place where we > work (Pakistan), we can't

logging sound / speech handler?

2009-09-09 Thread Gregor Horvath
Hi, For an application in an industrial environment where the workers are not always sitting in front of the monitor, but are within earshot of the PC I would need an sound / speech handler for the standard logging system. It should beep or better say the logging message. (with standard filtering

Re: win32ui DLL Load Failed

2009-09-01 Thread Gregor Horvath
Am Mon, 31 Aug 2009 12:43:04 -0700 (PDT) schrieb MikeC : > I have a python executable that's failing to load on a user's machine > running Windows XP. My developer machine is also running Windows XP. I > have determined that it is failing when it attempts to load win32ui. > > I have Python 2.6 on

Re: Overwriting property-> can't set attribute

2008-08-22 Thread Gregor Horvath
Gregor Horvath schrieb: why is this code failing? OK I answer myself :-) Because there is not fset function definied in the property. I have to del the attr before rebinding the attributename to another object. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Overwriting property-> can't set attribute

2008-08-22 Thread Gregor Horvath
Hi, why is this code failing? class B(object): pass B.testattr = property(lambda s:"hallo") b = B() b.testattr = "test" Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) /tmp/python-14202ViU.py in () 14 B.testattr = property(lambda s:"hallo") 15 b = B() ---> 16 b.testattr = "tes

Re: getattr nested attributes

2008-08-15 Thread Gregor Horvath
Peter Otten schrieb: make your own function that loops over the attributes, or spell it reduce(getattr, "a.test".split("."), B) 'test' Thank's, but this does not work for this case: class A(object): test = "test" class B(object): a = [A(),] In [70]: reduce(getattr, "a[0].test".s

getattr nested attributes

2008-08-15 Thread Gregor Horvath
Hi, class A(object): test = "test" class B(object): a = A() In [36]: B.a.test Out[36]: 'test' In [37]: getattr(B, "a.test") --- Traceback (most recent call last) / in () : type object 'B' has no attribut

Re: Why is None <= 0

2008-04-25 Thread Gregor Horvath
D'Arcy J.M. Cain schrieb: On Fri, 25 Apr 2008 20:27:15 +0200 Gregor Horvath <[EMAIL PROTECTED]> wrote: >>> None <= 0 True Why? Why not? Because, from http://www.python.org/dev/peps/pep-0020/ : Errors should never pass silently. In the face of ambiguity, refuse

Why is None <= 0

2008-04-25 Thread Gregor Horvath
Hi, >>> None <= 0 True Why? Is there a logical reason? Gregor -- http://mail.python.org/mailman/listinfo/python-list

Re: Python code-writing for the blind. Was (Re: newbie: stani's python editor if-else)

2007-09-11 Thread Gregor Horvath
madzientist schrieb: > > Is Python a bad choice for the blind programmer, as a result of a > tight linkage between visual aspects of the code and its function ? I > wish the site blindprogramming.com weren't so lifeless... There was a thread regarding blind people and python indentation shortly:

Re: newbie: stani's python editor if-else

2007-09-11 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > I agree with Steve. I have yet to see an IDE for Python (or anything > else) that unindents statements. Even IDLE, the Official IDE for > Python, doesn't do that. emacs in python-mode Just hit TAB and it unindents "else" in the given example. Hit TAB again and it cy

Re: Class design (information hiding)

2007-09-09 Thread Gregor Horvath
Alex Martelli schrieb: > > Why, thanks for the pointer -- I'm particularly proud of having written > """ > The only really workable way to develop large software projects, just as > the only really workable way to run a large business, is a state of > controlled chaos. > """ Yes, indeed a good sa

Re: Class design (information hiding)

2007-09-07 Thread Gregor Horvath
Alexander Eisenhuth schrieb: > > I'm wodering how the information hiding in python is ment. As I > understand there doesn't exist public / protected / private mechanism, > but a '_' and '__' naming convention. > > As I figured out there is only public and private possible as speakin in > "C+

Re: advice about `correct' use of decorator

2007-09-03 Thread Gregor Horvath
Gerardo Herzig schrieb: > > @is_logued_in > def change_pass(): >bla >bla > > And so on for all the other functions who needs that the user is still > loged in. > > where obviosly the is_logued_in() function will determine if the dude is > still loged in, and THEN execute change_pass().

Re: Why PHP is so much more popular for web-development

2007-07-25 Thread Gregor Horvath
walterbyrd schrieb: > Don't get me wrong: I am not saying that PHP is better than Python for > web-development. But, I sometimes think that Python could learn a few > things from PHP. Yes, indeed we can learn that popularity is not superiority. ;-) Gregor -- http://mail.python.org/mailman/listi

Re: The best platform and editor for Python

2007-07-05 Thread Gregor Horvath
Kay Schluehr schrieb: > The problem is simply that the Python community has failed in this > respect. There are many platform dependent and ideology driven ways to > do deal with code editing / debugging but not actually a recommend or > "pythonic" way. Other than Smalltalk, Python has not created

Re: The best platform and editor for Python

2007-07-05 Thread Gregor Horvath
kimiraikkonen schrieb: > My another aim is: Can i develop graphical applications (like in > Windows) which contain menus, interactive dialog boxes etc. using > Ptyhon? > > I got it quite but not sure. I don't know Ptyhon's capability skills > for creating interactive softwares like in Windows's c

Re: The best platform and editor for Python

2007-07-05 Thread Gregor Horvath
Kay Schluehr schrieb: > That's what I love most about the Python community. Whenever there is > just a non-standard, platform-dependent or crappy implementation of a > feature you get told that you don't need it. When printf was good for > little David print is good enough for me. > That's a pro

Re: What's the best way to iniatilize a function

2007-05-28 Thread Gregor Horvath
Jack schrieb: > I didn't call del explicitly. I'm expecting Python to call it when > the program exits. I put a logging line in __del__() but I never > see that line printed. It seems that __del__() is not being called > even when the program exits. Any idea why? > > http://effbot.org/pyfaq/my-

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > opposed. But dismissing the fact that Outlook and other quite common > tools may have severe problems with code seems naive (or disingenuous, > but I don't think that's the case here). Of course there is broken software out there. There are even editors that mix tab

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Gregor Horvath
Paul Boddie schrieb: > Perhaps, but the treatment by your mail/news software plus the > delightful Google Groups of the original text (which seemed intact in > the original, although I don't have the fonts for the content) would > suggest that not just social or cultural issues would be involved.

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Gregor Horvath
Istvan Albert schrieb: > On May 17, 2:30 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: > >> Is there any difference for you in debugging this code snippets? > >> class Türstock(object): > > Of course there is, how do I type the ü ? (I can copy/paste for &

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-18 Thread Gregor Horvath
Hendrik van Rooyen schrieb: > I suppose that this "one language track" - mindedness of mine > is why I find the mix of keywords and German or Afrikaans so > abhorrent - I cannot really help it, it feels as if I am eating a > sandwich, and that I bite on a stone in the bread. - It just jars. Ple

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > With the second one, all my standard tools would work fine. My user's > setups will work with it. And there's a much higher chance that all > the intervening systems will work with it. > Please fix your setup. This is the 21st Century. Unicode is the default in Pyt

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Gregor Horvath
Istvan Albert schrieb: > > After the first time that your programmer friends need fix a trivial > bug in a piece of code that does not display correctly in the terminal > I can assure you that their mellow acceptance will turn to something > entirely different. > Is there any difference for you

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Gregor Horvath
Martin v. Löwis schrieb: > I've reported this before, but happily do it again: I have lived many > years without knowing what a "hub" is, and what "to pass" means if > it's not the opposite of "to fail". Yet, I have used their technical > meanings correctly all these years. That's not only true f

Re: Declaring variables

2007-05-17 Thread Gregor Horvath
HMS Surprise schrieb: > > #~~ > createdIncidentId = 0 > . > . > . > #attempt to change varialbe > createdIncidentID = 1 > . > . > . > if createdIncidentId == 1: >... > test.py is your code above $ pychecker -v test.py Processing test... Warnings... test.py:7: Variable

Re: Sending a JavaScript array to Python script?

2007-05-17 Thread Gregor Horvath
placid schrieb: > Just wondering if there is any way of sending a JavaScript array to a > Python cgi script? A quick Google search didn't turn up anything > useful. http://mochikit.com/doc/html/MochiKit/Base.html#json-serialization http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.3/docs/i

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-17 Thread Gregor Horvath
Hendrik van Rooyen schrieb: > I can sympathise a little bit with a customer who tries to read code. > Why that should be necessary, I cannot understand - does the stuff > not work to the extent that the customer feels he has to help you? > You do not talk as if you are incompetent, so I see no rea

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > On May 16, 12:54 pm, Gregor Horvath <[EMAIL PROTECTED]> wrote: >> Istvan Albert schrieb: >> >> So the solution is to forbid Chinese XP ? >> > > It's one solution, depending on your support needs. > That would be

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: >> 2) Create a way to internationalize the standard library (and possibly >> the language keywords, too). Ideally, create a general standardized way >> to internationalize code, possibly similiar to how people >> internationalize strings today. > > Why? Or more acurate

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
Istvan Albert schrieb: > Here is something that just happened and relates to this subject: I > had to help a student run some python code on her laptop, she had > Windows XP that hid the extensions. I wanted to set it up such that > the extension is shown. I don't have XP in front of me but when I

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
Eric Brunel schrieb: > > The point is that today, I have a reasonable chance of being able to > read, understand and edit any Python code. With PEP 3131, it will no > more be true. That's what bugs me. That's just not true. I and others in this thread have stated that they use German or other

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
Eric Brunel schrieb: > Highly improbable in the general context. If I stumble on a source code > in Chinese, Russian or Hebrew, I wouldn't be able to figure out a single > sound. If you get source code in a programming language that you don't know you can't figure out a single sound too. How i

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
Hendrik van Rooyen schrieb: > It is not so much for technical reasons as for aesthetic > ones - I find reading a mix of languages horrible, and I am > kind of surprised by the strength of my own reaction. This is a matter of taste. In some programs I use German identifiers (not unicode). I and o

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > code on the (GUI-less) production servers over a terminal link. They > have to use all kinds of environments where they can't install the > latest and greatest fonts. Promoting code that becomes very hard to > read and debug in real situations seems like a sound nega

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
René Fleschenberg schrieb: >> I love Python because it does not dictate how to do things. >> I do not need a ASCII-Dictator, I can judge myself when to use this >> feature and when to avoid it, like any other feature. > > *That* logic can be used to justify the introduction of *any* feature. >

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-16 Thread Gregor Horvath
René Fleschenberg schrieb: > today, to the best of my knowledge. And "in some form or another" > basically means that the PEP would create more possibilities for things > to go wrong. That things can already go wrong today does not mean that > it does not matter if we create more occasions were th

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Gregor Horvath
Ross Ridge schrieb: > non-ASCII identifiers. While it's easy to find code where comments use > non-ASCII characters, I was never able to find a non-made up example > that used them in identifiers. If comments are allowed to be none English, then why are identifier not? This is inconsistent becau

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-15 Thread Gregor Horvath
René Fleschenberg schrieb: > > We all know what the PEP is about (we can read). The point is: If we do > not *need* non-English/ASCII identifiers, we do not need the PEP. If the > PEP does not solve an actual *problem* and still introduces some > potential for *new* problems, it should be rejected

Re: howto check is object a func, lambda-func or something else?

2007-04-29 Thread Gregor Horvath
dmitrey schrieb: > howto check is object Arg1 > - a func, lambda-func > - something else? > > I tried callable(Arg1), but callable(lambda-func) returnes False I don't understand your problem: >>> callable(lambda:0) True Please post your relevant code. Greg -- http://mail.python.org/mailman

Re: Complex HTML forms

2007-02-18 Thread Gregor Horvath
George Sakkis schrieb: > I'd like to gather advice and links to any existing solutions (e.g. > libraries, frameworks, design patterns) on general ways of writing > complex web forms, as opposed to the typical {name:value} flat model. > A particular case of what I mean by complex is hierarchical for

Re: Can Python help?

2006-12-26 Thread Gregor Horvath
Lad schrieb: > On my website I allow users to upload files. I would like a user to see > how much time is left before a file is uploaded. So, I would like to > have a progress bar during a file uploading. Can Python help me with > that?Or how can be a progress bar made? > Thank you for ideas. > L

Re: What do I look for in a shared Python host?

2006-11-17 Thread Gregor Horvath
walterbyrd schrieb: > > What other "gotchas" would I look for? > Maybe this is helpfull for you: http://docs.turbogears.org/1.0/Hosting -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: The fastest search

2006-10-21 Thread Gregor Horvath
Fulvio schrieb: > > Is there some trick to apply the best search in wise use of resources while > using the above said methods? > measure it: http://docs.python.org/lib/module-timeit.html Regarding your debugger question in the seperate thread I don't know since I am not using a debugger at a

Re: Good Form

2006-10-21 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > Would you normally write methods to retrive and set your class > variables or just refrence them directly? > you start by referencing them directly and ONLY if you need you can add getters and setters later on without breaking any client code. see the property functi

Re: Webprogr: Link with automatic submit

2006-10-20 Thread Gregor Horvath
Bruno Desthuilliers schrieb: > yes : replace the link with another submit button, then in your > controller check which submit has been successful and take appropriate > action. Thanks ! -- Servus, Gregor -- http://mail.python.org/mailman/listinfo/python-list

Webprogr: Link with automatic submit

2006-10-20 Thread Gregor Horvath
Hi, As I am no expert web programmer I thought I'd better ask the experts if there is a simpler or better solution to my problem than the one I am thinking of. (using TurboGears) The problem --- I have a form. Ok. you can submit, validate it etc. Now I have a link on that form to another

Re: Scope of decorator argument

2006-10-17 Thread Gregor Horvath
Gregor Horvath schrieb: > > Is there any other solution, probably with metaclasses ? > I've found this one: class mymeta(type): def __new__(meta, class_name, bases, new_attrs): new_attrs["edit"] = adecorator(new_attrs['xy'])(bases[0].edit)

Scope of decorator argument

2006-10-16 Thread Gregor Horvath
Hi, this: class base(object): @adecorator(xy) def edit(self): print "edit" class child(base): xy = 3 obviously fails because "xy" is not bound at class creation time of the base object. One solution could be delegation: class base(object): @classmethod def edit(se

Re: python's OOP question

2006-10-15 Thread Gregor Horvath
neoedmund schrieb: > python use multiple inheritance. > but "inheritance" means you must inherite all methods from super type. > now i just need "some" methods from one type and "some" methods from > other types, > to build the new type. > Do you think this way is more flexible than tranditional in

Re: Web Hosting

2006-10-15 Thread Gregor Horvath
Sir Psycho schrieb: > > Im looking at making a site in Python, however, Im lost as to what ISPs > actually support. Some ISPs say they support Python so does that mean > if I wanted to use TurboGears It would just work anyway? http://docs.turbogears.org/1.0/Hosting?highlight=%28hosting%29 --

Re: Using SVN with Python and .pyc files

2006-10-13 Thread Gregor Horvath
James Stroud schrieb: > project or package. How do people manage this? Do you run a script to > find files with the .pyc extension and delete those before every commit, > or is there a more elegant way? It seems like a lot of wasted bandwidth > an memory on the server side to constantly be dealing

Re: win32 Service: path to .py script

2006-09-19 Thread Gregor Horvath
Larry Bates schrieb: > I believe that your problem is that services run under Local > System account. Normally Local System account would not have > a drive mapping Y:\. You can change the account that a service You are absolutly correct. I moved the script to a local drive instead of a mapped

win32 Service: path to .py script

2006-09-19 Thread Gregor Horvath
Hi, I have a testservice.py (see below). I installed the Windows-Service successfully. (via commandlineoption install) The problem is that it runs only when it is in c:\windows\system32 or in the python path. I added the desired path (Y:\) to the PYTHONPATH environment variable for the system acco

Re: Looking for a text file based wiki system written in Python

2006-08-12 Thread Gregor Horvath
Jack schrieb: > I'd like to set up a wiki system for a project I'm working on. > Since I'm not good at databases, and there's really not much > stuff to put into the wiki, I hope it is text file-based. > I used DokuWiki before, which is very nice but it's written > in PHP. Is there a similar system

Re: Dallas One wire tempreture measurement.

2006-08-09 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > a previous thread > > http://mail.python.org/pipermail/python-list/2002-June/107616.html > > discussed this issue, and Dave Moor kindly pointed to his solution. > However this is no longer a current link, does anyone know if there is > a currently available solution?

Re: Grammar parsing

2006-08-03 Thread Gregor Horvath
Paolo Pantaleo schrieb: > How can I write a pareser for a certain gramamr? I found PyPy that > does it, is thare any other tool? Maybe something built-in the python > interpreter? > http://pyparsing.wikispaces.com/ -- Servus, Gregor http://www.gregor-horvath.com -- http://mail.python.org/

Re: Best way to read, and analyze a log file?

2006-08-01 Thread Gregor Horvath
Hi, [EMAIL PROTECTED] schrieb: > I am reading a log file, and wondering what is the best way to read and > analize this. Look at: http://pyparsing.wikispaces.com/ There is also an example for parsing an apache log. -- Servus, Gregor http://www.gregor-horvath.com -- http://mail.python.or

Interpretation of UnhandledException.rpt

2006-06-06 Thread Gregor Horvath
Hi, in a windows server python application I receive once a week suddenly and not reproducible the following error. UnhandledException.rpt file: //=== Exception code: C090 FLT_INVALID_OPER

Re: Install libraries only without the program itself

2006-05-11 Thread Gregor Horvath
Serge Orlov schrieb: > I believe it's better to keep *everything* on the file server. Suppose Certainly! > your OS is windows and suppose you want to keep everything in s:/tools. > The actions are: > 3. Create little dispatcher s:/tools/win32/client.py: > #!s:/tools/python24-win32/python.exe > i

Install libraries only without the program itself

2006-05-11 Thread Gregor Horvath
Hi, My application is a client/server in a LAN. I want to keep my programs .py files on a central File Server serving all clients. The clients should load those over the LAN every time they start the program since I expect that they are rapidly changing and I dont want to update each client sepera

Re: Protocols for Python?

2006-04-27 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > > Is there a standard way to document protocols in Python? Of should I > come up with something tailored to my needs. > Write unittests or doctest strings. -- Servus, Gregor http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: finding IP address of computer

2006-04-27 Thread Gregor Horvath
Chris schrieb: > How do I find and print to screen the IP address of the computer my > python program is working on? > IP adresses are bound to network interfaces not to computers. One Computer can have multiple network interfaces. -- Servus, Gregor http://www.gregor-horvath.com -- http://

Re: Events in Python?

2006-04-26 Thread Gregor Horvath
[EMAIL PROTECTED] schrieb: > > Does Python have a mechanism for events/event-driven programming? > Probably this is something for you: http://twistedmatrix.com/trac/ -- Servus, Gregor http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: multiline comments

2006-04-19 Thread Gregor Horvath
Edward Elliott schrieb: > On top of that, the expressive power of nested comments seems greater > than an endless string of ^#s. Sometimes it's just easier to see what's > going on. not if you are using grep -- Gregor http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/py

Re: VB to Python

2006-04-14 Thread Gregor Horvath
win32com.client.Dispatch(scopeProgID) scope.Connected = True -- Mit freundlichen Grüßen, Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung Mobil: +43(0)69910879004 Fax: +43(0)1/25330333931 http://www.gregor-horvath.com -- Mit freundlichen Grüßen, Ing. Gregor Horv

Re: Looking for a language/framework

2006-04-11 Thread Gregor Horvath
to avoid having to properly understand the way a von Neumann architecture (or Assembler) works? -- Mit freundlichen Grüßen, Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: About classes and OOP in Python

2006-04-11 Thread Gregor Horvath
Steven D'Aprano schrieb: > I don't know of many other OO languages that didn't/don't have > inheritance, VB4 - VB6 -- Mit freundlichen Grüßen, Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: About classes and OOP in Python

2006-04-10 Thread Gregor Horvath
obgho -- Mit freundlichen Grüßen, Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a language/framework

2006-04-01 Thread Gregor Horvath
better approach. -- Mit freundlichen Grüßen, Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a language/framework

2006-03-31 Thread Gregor Horvath
pliciation the goal is to only have problem or domain specific code. Middelware or ORM is a way to this goal because it encapsulates and hides the technical details of persistence and helps for cleaner code. -- Mit freundlichen Grüßen, Ing. Gregor Horvath, Industrieberatung & Softwareen

Re: How to determine COM objects/functions

2006-03-30 Thread Gregor Horvath
a COM Browser. Or if you have MS-Office installed, there is a COM Browser in the VBA IDE. -- Mit freundlichen Grüßen, Ing. Gregor Horvath, Industrieberatung & Softwareentwicklung http://www.gregor-horvath.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Basic python help

2006-03-13 Thread Gregor Horvath
Kevin Feng schrieb: > More information about this error may be available in the server error log. > > > > Any suggestions? Much thanks. > What does the error log of the webserver say? -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: __del__ not called?

2006-03-13 Thread Gregor Horvath
Duncan Booth schrieb: > First off, never depend on __del__ to do anything critical. The only Thanks to all of you! Everything's clear now! -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: __del__ not called?

2006-03-13 Thread Gregor Horvath
Duncan Booth schrieb: > What is less obvious is that new style classes always include circular > references, so a class is never detroyed until the garbage collector runs. Thanks. I tried the same example with old style classes and A.__del__ gets correctly called. > Of course, if your __del__

Re: __del__ not called?

2006-03-13 Thread Gregor Horvath
Felipe Almeida Lessa schrieb: del B # We'll to tell him to collect the garbage here, but > > ... # usually it should not be necessary. Thanks. If I do del B then the __del__ of A gets called. That surprises me. I thought that B gets del'd by python when it goes out of scope? Do I

__del__ not called?

2006-03-12 Thread Gregor Horvath
Hi, I do not understand why __del__ does not get executed in the following example. test.py: #!/usr/bin/python class A(object): def __init__(self): print "init" def __del__(self): print "del" test1.py #!/usr/bin/python import test class B(object): a = test.A() Running te

Re: _tkinter.TclError: can't set "PY_VAR0": invalid command name "-1210125972check"

2006-03-02 Thread Gregor Horvath
Gregor Horvath schrieb: > if __name__ == "__main__": > t = testtk() > t.var.set("TEST") > > Result: > > _tkinter.TclError: can't set "PY_VAR0": invalid command name > "-1210125972check" > > > Any ideas, wh

_tkinter.TclError: can't set "PY_VAR0": invalid command name "-1210125972check"

2006-03-02 Thread Gregor Horvath
Hi, I searched the web and docs but cannot figure out whats wrong with this code: #!/usr/bin/python import Tkinter as Tk class testtk(Tk.Frame): def __init__(self): self.root = Tk.Tk() Tk.Frame.__init__(self,self.root) self.frame = Tk.Frame(self.root) self.var = Tk.Stri

Logging: Formatter: name of the function

2005-12-23 Thread Gregor Horvath
Hi, Is there a possibility to format a log message to give the function name where the log appears? Example import logging def aTestFunction(): logger.debug("This is a message") The log should read: aTestFunction This is a message. There is a possibilty to format the module namewith %(m

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Gregor Horvath
El Pitonero schrieb: > > The fact that you can override Python's "list()" function can be either > viewed as pro or con. The fact that you can override member variables > can also be viewed as pro or con. > If there is a tool like pyChecker, which can detect such pitfalls and warns but not forb

Re: Will python never intend to support private, protected and public?

2005-09-30 Thread Gregor Horvath
Paul Rubin wrote: > Gregor Horvath <[EMAIL PROTECTED]> writes: >>Someone has a problem and tweaks a private variable as a workaround. > > They should have patched the source instead. > I think they are going to do that. In the meantime our friend has a working sol

Re: Will python never intend to support private, protected and public?

2005-09-29 Thread Gregor Horvath
Paul Rubin schrieb: > Gregor Horvath <[EMAIL PROTECTED]> writes: > >>Real open source live example from yesterdays mailinglists: > > > I don't see any use of name mangling in that example. Someone has a problem and tweaks a private variable as a workaround.

Re: Will python never intend to support private, protected and public?

2005-09-29 Thread Gregor Horvath
Paul Rubin schrieb: > > I don't know of a single program that's actually relying on the > non-enforcement. I've asked for examples but have only gotten > theoretical ones. As far as I can tell, the feature is useless. Real open source live example from yesterdays mailinglists: quick question:

Re: Will python never intend to support private, protected and public?

2005-09-29 Thread Gregor Horvath
Paul Rubin schrieb: > Bill Mill <[EMAIL PROTECTED]> writes: > >>Python is for consenting adults. > > Python might be for consenting adults, but multi-person software > projects are supposed to be done in the workplace, not the bedroom. Are the numerous working python open source projects not mul

Re: Will python never intend to support private, protected and public?

2005-09-29 Thread Gregor Horvath
Paul Rubin schrieb: > > You could have a "friend" declaration like in C++, if you want to let > some class see the private instance variables of another class. Everything is said on this topic. There are two ligitimate solutions to the problem of private instance variables. Its a matter of tas

Re: Will python never intend to support private, protected and public?

2005-09-29 Thread Gregor Horvath
Paul Rubin schrieb: > > If you don't want the compiler to make sure your private instance > variables stay private, then don't declare them that way. You're the > one asking for less flexibility. I want to declare them as privat, but want to give the flexibilty to access them at the users own

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread Gregor Horvath
Paul Rubin schrieb: > > Huh? If my car has a "feature" that lets someone blow it to > smithereens from hundreds of miles away without even intending to, > that's somehow an advantage? I would not accept a car that does constraint my driving directions. I want to drive for myself, because its f

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread Gregor Horvath
Paul Rubin schrieb: > allowed to do that--that's why the variable is private. Is he > supposed to get your permission every time he wants to change how the > private variables in his class work? > No, but the assumption here is that the maintainer / designer of a class alaways knows everything

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread Gregor Horvath
Paul Rubin schrieb: > Gregor Horvath <[EMAIL PROTECTED]> writes: > >>>to be able to share private variables with other classes under certain >>>circumstances, it's better to use something like C++'s "friend" >>>declaration, where you ca

Re: Will python never intend to support private, protected and public?

2005-09-28 Thread Gregor Horvath
Paul Rubin schrieb: > > Name mangling is a poor substitute for private variables. If you want > to be able to share private variables with other classes under certain > circumstances, it's better to use something like C++'s "friend" > declaration, where you can export the variables to a specific

Re: String from File -> List without parsing

2005-09-04 Thread Gregor Horvath
John Machin wrote: >> f = file("I050901.ids").readlines() > > Y3K bug alert :-) but then there is Python 3000 and Hurd, which solves all problems of this universe :-) > Something like this: > > >>> def munch(astrg): > ...return [x[1:-1] for x in astrg.rstrip("\n")[1:-1].split(", ")] T

  1   2   >