inherit from data type

2010-05-11 Thread Richard Lamboj
Hello, i want to inherit from a data type. How can i do this? Can anyone explain more abou this? How knows python that it is a float, or a string? Kind Regards Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: inherit from data type

2010-05-11 Thread Richard Lamboj
Am Tuesday 11 May 2010 10:47:35 schrieb Ulrich Eckhardt: Richard Lamboj wrote: i want to inherit from a data type. How can i do this? Can anyone explain more abou this? Other than in e.g. C++ where int and float are special types, you can inherit from them in Python like from any other

Re: inherit from data type

2010-05-11 Thread Richard Lamboj
Am Tuesday 11 May 2010 11:38:42 schrieb Ulrich Eckhardt: Richard Lamboj wrote: How knows python that it is a float, or a string? Sorry this was bad expressed. I want to create a new data type, which inherits from float. I just know the dir function and the help function to get more

Re: inherit from data type

2010-05-11 Thread Richard Lamboj
Am Tuesday 11 May 2010 20:16:50 schrieb Terry Reedy: On 5/11/2010 7:51 AM, Richard Lamboj wrote: I just want to test what is possible with python and what not. There is no problem that i need to solve. This is what i'am searching for: http://docs.python.org/reference/datamodel.html

importing modules

2010-05-07 Thread Richard Lamboj
Hello, I have a question about importing python modules. I have modul package, with submodules. So how can a submodul access a modul that is on level upper? Is there something like import ../../blah? I don't mean something like this: import bla.blub.moep Kind Regards, Richi --

Re: importing modules

2010-05-07 Thread Richard Lamboj
Am Friday 07 May 2010 13:50:15 schrieb Jean-Michel Pichavant: Richard Lamboj wrote: Hello, I have a question about importing python modules. I have modul package, with submodules. So how can a submodul access a modul that is on level upper? Is there something like import

Classes: nested functions vs. private methodes

2010-05-06 Thread Richard Lamboj
Hello, what should i take: - nested functions: class MyClass(object) def blah(self): def blub(var1, var2): do something... blub(1, 5) or class MyClass(object) def blah(self): def _blub(var1, var2): do something... _blub(1, 5) - private functions: class

Re: Classes: nested functions vs. private methodes

2010-05-06 Thread Richard Lamboj
Am Thursday 06 May 2010 12:02:47 schrieb Steven D'Aprano: On Thu, 06 May 2010 11:24:49 +0200, Richard Lamboj wrote: Hello, what should i take: - nested functions: class MyClass(object) def blah(self): def blub(var1, var2): do something... blub(1, 5

win32 - catch events(wmi?)

2010-05-03 Thread Richard Lamboj
Hello, i want catch the following events: - registry has chanced - file has chanced - outgoing network connection - programm start and i want to be able to allow, or deny this requests. Kind Regards Richi -- http://mail.python.org/mailman/listinfo/python-list

dynamic function add to an instance of a class

2010-04-29 Thread Richard Lamboj
Hello, i want to add functions to an instance of a class at runtime. The added function should contain a default parameter value. The function name and function default paramter values should be set dynamical. Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic function add to an instance of a class

2010-04-29 Thread Richard Lamboj
Am Thursday 29 April 2010 09:59:22 schrieb Xavier Ho: On Thu, Apr 29, 2010 at 5:55 PM, Richard Lamboj richard.lam...@bilcom.atwrote: Hello, i want to add functions to an instance of a class at runtime. The added function should contain a default parameter value. The function name

Re: dynamic function add to an instance of a class

2010-04-29 Thread Richard Lamboj
Am Thursday 29 April 2010 10:13:01 schrieb Peter Otten: Richard Lamboj wrote: i want to add functions to an instance of a class at runtime. The added function should contain a default parameter value. The function name and function default paramter values should be set dynamical. class

winreg - access mask

2010-04-28 Thread Richard Lamboj
Hello, if i want to read, write a key and set a value, does i only need to set KEY_WRITE, or does i need to set KEY_READ, KEY_WRITE and KEY_SET_VALUE? This questions is related to the OpenKey Function. http://docs.python.org/py3k/library/winreg.html - The other Access modes are missing in

function name

2010-04-28 Thread Richard Lamboj
Hello, is there any way to get the name from the actual called function, so that the function knows its own name? Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

Python 2.5.x _winreg - rename a subkey

2010-04-27 Thread Richard Lamboj
Hello, is there a way to rename a subkey? Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

WIN32 - get the GUID of a Network Device

2010-04-26 Thread Richard Lamboj
Hello, is there a way to get the GUID from a Network Device? Kind Regard, Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: WIN32 - get the GUID of a Network Device

2010-04-26 Thread Richard Lamboj
Am Monday 26 April 2010 10:14:24 schrieb Tim Golden: On 26/04/2010 09:06, Richard Lamboj wrote: is there a way to get the GUID from a Network Device? Are you talking about the MAC address? If so, here's one way: code import wmi for nic in wmi.WMI ().Win32_NetworkAdapterConfiguration

Re: Python and Regular Expressions

2010-04-08 Thread Richard Lamboj
At the moment i have less time, so its painful to read about parsing, but it is quite interessting. I have taken a look at the different Parsing Modules and i'am reading the Source Code to understand how they Work. Since Yesterday i'am writing on my own small Engine - Just for Fun and

Python and Regular Expressions

2010-04-07 Thread Richard Lamboj
Hello, i want to parse this String: version 3.5.1 { $pid_dir = /opt/samba-3.5.1/var/locks/ $bin_dir = /opt/samba-3.5.1/bin/ service smbd { bin = ${bin_dir}smbd -D pid = ${pid_dir}smbd.pid } service nmbd {

Re: Python and Regular Expressions

2010-04-07 Thread Richard Lamboj
Am Wednesday 07 April 2010 10:52:14 schrieb Chris Rebert: On Wed, Apr 7, 2010 at 1:37 AM, Richard Lamboj richard.lam...@bilcom.at wrote: i want to parse this String: version 3.5.1 {        $pid_dir = /opt/samba-3.5.1/var/locks/        $bin_dir = /opt/samba-3.5.1/bin

libpst - python bindings

2010-03-31 Thread Richard Lamboj
Hello, are there any python bindings for libpst? http://www.five-ten-sg.com/libpst/ https://alioth.debian.org/projects/libpst/ Kind Regards Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: When will Python go mainstream like Java?

2010-02-23 Thread Richard Lamboj
Am Tuesday 23 February 2010 09:07:43 schrieb Krister Svanlund: On Tue, Feb 23, 2010 at 1:01 AM, Edward A. Falk f...@mauve.rahul.net wrote: You mean it's not? --        -Ed Falk, f...@despams.r.us.com        http://thespamdiaries.blogspot.com/ Javas popularity was very much a product

Killing a Thread

2010-01-29 Thread Richard Lamboj
Hello, which Method is better to kill a Thread? Using Thread Events, or a raising a Exception? Maybe someone has a small example for me? Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

starting a thread in a nother thread

2010-01-27 Thread Richard Lamboj
hello, just for _curiosity_. What would be if i start a thread in a nother thread and acquire a lock in the child thread. Is there anything that could go wrong if someone try to start threads in threads? Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: starting a thread in a nother thread

2010-01-27 Thread Richard Lamboj
Am Wednesday 27 January 2010 14:10:13 schrieb Stefan Behnel: Richard Lamboj, 27.01.2010 14:06: just for _curiosity_. What would be if i start a thread in a nother thread and acquire a lock in the child thread. Is there anything that could go wrong if someone try to start threads in threads

Re: starting a thread in a nother thread

2010-01-27 Thread Richard Lamboj
Am Wednesday 27 January 2010 15:30:17 schrieb Stefan Behnel: Richard Lamboj, 27.01.2010 15:23: Am Wednesday 27 January 2010 14:10:13 schrieb Stefan Behnel: Richard Lamboj, 27.01.2010 14:06: just for _curiosity_. What would be if i start a thread in a nother thread and acquire a lock

reading from pipe

2010-01-25 Thread Richard Lamboj
Hello, is there any solution to catch if a pipe has closed? Maybe the signal modul? For Simulation: #!/usr/bin/env python # -*- coding: utf-8 -*- import sys while True: line = sys.stdin.readline() sys.stdout.write(line) sys.stdout.flush() time cat /tmp/proxy.test |