moving methods from class to instance of other class

2012-06-28 Thread lars van gemerden
or or b.do() prints "A.do: self.name = a", so the self parameter of a.do is stored somehow in the method. In other words, how do i unbind 'do' from a/A and bind it to b (the instance)? Cheers, Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: moving methods from class to instance of other class

2012-06-28 Thread lars van gemerden
On Jun 28, 9:22 am, Benjamin Kaplan wrote: > On Wed, Jun 27, 2012 at 11:59 PM, lars van gemerden > > > > > > > > > > wrote: > > Hi all, > > > I have some trouble with the following question: Let say i have the > > following cl

Re: Re: code review

2012-07-06 Thread lars van gemerden
ver used* (and a couple that I haven't). > > I understand why Python does it, and it certainly is nice in that it > matches typical mathematical notation, but the surprise quotient is > *very* high in the PL world IMO. > > Evan Avoiding suprises would mean we cannot improve languages, just reshuffle features? Cheers, Lars -- http://mail.python.org/mailman/listinfo/python-list

use of exec()

2012-10-18 Thread lars van gemerden
i_test.py", line 13, in __call__ self._func_ = self._creat_func_() File "D:\Documents\Code\Eclipse\workspace\FlowWare_1\toolshed\tests\mini_test.py", line 25, in _creat_func_ return function NameError: name 'function' is not defined which seems an odd error,

Re: use of exec()

2012-10-18 Thread lars van gemerden
On Thursday, October 18, 2012 1:49:35 PM UTC+2, Chris Angelico wrote: > On Thu, Oct 18, 2012 at 10:41 PM, lars van gemerden > > wrote: > > > NameError: name 'function' is not defined > > > > > > which seems an odd error, but i think some global v

Re: use of exec()

2012-10-18 Thread lars van gemerden
On Thursday, October 18, 2012 4:29:45 PM UTC+2, Chris Angelico wrote: > On Fri, Oct 19, 2012 at 1:07 AM, lars van gemerden > wrote: > > > Thanks, Chris, > > > > > > That works like a charm (after replacig "return ns.function" with "return &

Re: use of exec()

2012-10-19 Thread lars van gemerden
On Thursday, October 18, 2012 5:16:50 PM UTC+2, Chris Angelico wrote: > On Fri, Oct 19, 2012 at 2:00 AM, lars van gemerden > wrote: > > > I get your point, since in this case having the custom code option makes > > the system a whole lot less complex and flexible, i

Re: use of exec()

2012-10-20 Thread lars van gemerden
On Saturday, October 20, 2012 4:00:55 AM UTC+2, Chris Angelico wrote: > On Sat, Oct 20, 2012 at 10:43 AM, lars van gemerden > > wrote: > > > Do you have any ideas about to what extend the "lambda" version of the code > > (custom code is only the 'bod

deepcopy questions

2012-11-27 Thread lars van gemerden
27;: 0, '_items_': [], '_name_': 'main'} {'_active_': False, 'init': {}, '_id_': 0} Two items are missing in the copy. Maybe i am missing something obvious, but i cannot figure out how this could happen. Can anyone tell me how this is possible? Cheers, Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: deepcopy questions

2012-11-28 Thread lars van gemerden
On Wednesday, November 28, 2012 12:59:38 AM UTC+1, lars van gemerden wrote: > Hi, > > > > I get a very strange result when using deepcopy. The following code: > > > > def __deepcopy__(self, memo): > > independent = self.independent() &g

weird isinstance/issubclass behavior?

2012-11-29 Thread lars van gemerden
, but in my case a strange gotcha. My question is: Is this intended, inevitable or a bug? Cheers, Lars PS: this is somewhat simpler than the actual case i've encountered, and i haven't tested this exact case, but for now i hope this is enough to get some of your insight. -- http://mail.

Re: weird isinstance/issubclass behavior?

2012-11-29 Thread lars van gemerden
On Thursday, November 29, 2012 3:59:37 PM UTC+1, lars van gemerden wrote: > Hi, > > > > I have encountered some strange behavior of isinstance(/issubclass): > depending on the import path used for classes i get different output, while > the classes i compare

finding abc's

2013-01-25 Thread lars van gemerden
use abstract base classes are not always in the mro() of classes. My question is: is there a way to obtain the abc's of a class or otherwise a way to make the function above take abc's into account (maybe via a predefined function)? Cheers, Lars -- http://mail.python.org/mailman/li

Re: finding abc's

2013-01-25 Thread lars van gemerden
On Friday, January 25, 2013 8:04:32 PM UTC+1, Ian wrote: > On Fri, Jan 25, 2013 at 10:40 AM, lars van gemerden > > wrote: > > > Hi all, > > > > > > i was writing a function to determine the common base class of a number > > classes: > > &g

Re: finding abc's

2013-01-25 Thread lars van gemerden
On Friday, January 25, 2013 8:08:18 PM UTC+1, Peter Otten wrote: > lars van gemerden wrote: > > > > > Hi all, > > > > > > i was writing a function to determine the common base class of a number > > > classes: > > > > &g

Re: finding abc's

2013-01-25 Thread lars van gemerden
ake classes in the mro() into account (which might include abc's), the first gives all common base classes, the second recursively reduces further to one single class (the latter might not make to much sense, but in my program it is a safe bet for rare cases). Thanks again for the help, Chee

Re: windows 11 what is wrong?

2022-04-27 Thread Lars Martin Hambro
Repair passed but pip3 and pip did not find pip.exe and missing modules. Lars Martin hambro Fra: Lars Martin Hambro Sendt: onsdag 27. april 2022, 21:31 Til: python-list@python.org Emne: windows 11 what is wrong? [cid:image001.png@01D85A7E.07A48030

Re: how to bypass firewall

2005-11-15 Thread Lars Kellogg-Stedman
> I need some help regrading byassing firewalls. You'll need to go to comp.lang.perl for help with that problem. -- Lars -- Lars Kellogg-Stedman <[EMAIL PROTECTED]> This email address will expire on 2005-11-22. -- http://mail.python.org/mailman/listinfo/python-list

Re: Auto Install Linux Rpm's

2005-11-16 Thread Lars Kellogg-Stedman
ou roll your own. If I were you, I would probably just use Yum to do all the heavy lifting, rather than trying to re-implement it. Then your work boils down to: IF (installed version of package) != (version of package in config file) THEN yum -y install END IF -- Lars -- Lars Kell

Re: Hot to split string literals that will across two or more lines ?

2005-11-17 Thread Lars Kellogg-Stedman
> print "a string whcih is very very looo\ > ng." print "a string which is very loo" \ + "ong." -- Lars -- Lars Kellogg-Stedman <[EMAIL PROTECTED]> This email address will expire

Re: Zope vs Php

2005-11-17 Thread Lars Kellogg-Stedman
> And finally - got a URL? This got me to the right place pretty quickly: http://www.google.com/search?q=python+kid+template -- Lars -- Lars Kellogg-Stedman <[EMAIL PROTECTED]> This email address will expire on 2005-11-23. -- http://mail.python.org/mailman/listinfo/python-list

Re: Hot to split string literals that will across two or more lines ?

2005-11-17 Thread Lars Kellogg-Stedman
> Minor pedantry, but the plus sign is redundant. Thanks for catching that...I haven't been working with Python as much as I was a year or so ago and I'm forgetting some of the details. -- Lars -- Lars Kellogg-Stedman <[EMAIL PROTECTED]> This email address will expire on 20

Re: Zope vs Php

2005-11-17 Thread Lars Kellogg-Stedman
n here: http://kid.lesscode.org/language.html There's a standlone Python TAL implementation here: http://www.owlfish.com/software/simpleTAL/ -- Lars -- Lars Kellogg-Stedman <[EMAIL PROTECTED]> This email address will expire on 2005-11-23. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on linux

2005-11-18 Thread Lars Kellogg-Stedman
> Hi i wanted to know how can i find disk size on linux platform using > python. You could use python to drive the 'sfdisk' command through a pipe, which will probably do much of what you want. -- Lars -- Lars Kellogg-Stedman <[EMAIL PROTECTED]> This email address wil

Re: os.popen('alias')

2005-11-18 Thread Lars Kellogg-Stedman
;alias' However, even if /bin/sh is actually bash, dotfiles such as .profile and .bashrc aren't read when using the '-c' option. If you really want to do something to your bash aliases with python, you could pipe them into a python command: $ alias | python myscript.py -- Lars

pickling instances of metaclass generated classes

2011-12-29 Thread lars van gemerden
__new__ of the metaclass to add the new class under the right name in the right module/place, so pickle can find it. Is this the right approach? Can anyone explain to me where/how to add these classes for pickle to find and maybe why? Thanks in advance, Lars -- http://mail.python.org/mailman/listinfo

Re: pickling instances of metaclass generated classes

2011-12-30 Thread lars van gemerden
On Dec 29, 8:55 pm, Ian Kelly wrote: > On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden > wrote: > > > Hello, > > > Can someone help me with the following: > > > I am using metaclasses to make classes and these classes to make > > instances. Now I want

Re: pickling instances of metaclass generated classes

2011-12-30 Thread lars van gemerden
On Dec 29, 8:55 pm, Ian Kelly wrote: > On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden > wrote: > > > Hello, > > > Can someone help me with the following: > > > I am using metaclasses to make classes and these classes to make > > instances. Now I want

Re: pickling instances of metaclass generated classes

2011-12-30 Thread lars van gemerden
On Dec 30, 12:16 pm, lars van gemerden wrote: > On Dec 29, 8:55 pm, Ian Kelly wrote: > > > > > > > > > > > On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden > > wrote: > > > > Hello, > > > > Can someone help me with the f

Re: pickling instances of metaclass generated classes

2011-12-30 Thread lars van gemerden
On Dec 30, 4:56 pm, lars van gemerden wrote: > On Dec 30, 12:16 pm, lars van gemerden wrote: > > > > > > > > > > > On Dec 29, 8:55 pm, Ian Kelly wrote: > > > > On Thu, Dec 29, 2011 at 2:55 AM, lars van gemerden > > > wrote: > >

Re: pickling instances of metaclass generated classes

2012-01-03 Thread lars van gemerden
On Dec 29 2011, 10:55 am, lars van gemerden wrote: > Hello, > > Can someone help me with the following: > > I am using metaclasses to make classes and these classes to make > instances. Now I want to use multiprocessing, which needs to pickle > these instances. > > P

multiple inheritance from list and other class

2012-01-07 Thread lars van gemerden
error to the example classes) Can anyone help/explain? Cheers, Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple inheritance from list and other class

2012-01-08 Thread lars van gemerden
On Jan 8, 7:42 am, Steven D'Aprano wrote: > On Sat, 07 Jan 2012 17:16:22 -0800, lars van gemerden wrote: > > Hello, > > > I have an error message i do not understand: > > > My code is in essence: > > The code you give works fine. It does not show the error yo

Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-17 Thread Lars Rune Nøstdal
hi, everyone thinks youreoay faggot and that youreh stupid .. now go fugkght yourselfes peasse out .. yo! -- http://mail.python.org/mailman/listinfo/python-list

Re: logo design

2006-11-01 Thread Lars Rune Nøstdal
often on it. I'm not totally serious; but maybe some way of donating money to further improvement of SBCL/Slime/something-cool-and-universally-needed-here would be OK or something. ..I need a new t-shirt anyways; the Ubuntu t-shirt has gone missing.. :( -- Lars Rune Nøstdal http://l

Re: logo design

2006-11-01 Thread Lars Rune Nøstdal
On Thu, 02 Nov 2006 06:08:00 +0100, Lars Rune Nøstdal wrote: > On Wed, 01 Nov 2006 20:48:12 -0800, Geoffrey Summerhayes wrote: > >> Picture this: Hey, I'm switching to COBOL because its new >> logo looks great on t-shirts and mugs. > > Maybe the extra funding

Re: merits of Lisp vs Python

2006-12-09 Thread Lars Rune Nøstdal
f you are > willing to write your own libraries. *lol* Good luck with that attitude: http://redwing.hutman.net/~mreed/warriorshtm/troglodyte.htm ..or did you forget to add "in theory"; which is of course what everyone already knows as they see their compilers do it every day. --

Re: merits of Lisp vs Python

2006-12-22 Thread Lars Rune Nøstdal
education. > > Mark Kill this frakkin thread; Lisp rules -- while Python is boring (but better than many other alternatives). E.O.F. -- Lars Rune Nøstdal http://nostdal.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: merits of Lisp vs Python

2006-12-26 Thread Lars Rune Nøstdal
On Sat, 23 Dec 2006 12:38:30 -0800, Fuzzyman wrote: > > Lars Rune Nøstdal wrote: >> On Fri, 08 Dec 2006 03:07:09 -0800, Mark Tarver wrote: >> >> > How do you compare Python to Lisp? What specific advantages do you >> > think that one has over the other? &g

Re: implementation for Parsing Expression Grammar?

2008-05-10 Thread Lars Rune Nøstdal
Hi, Finite automata works for "nested things". http://en.wikipedia.org/wiki/Automata_theory -- Lars Rune Nøstdal http://nostdal.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: A Lambda Logo Tour

2006-04-05 Thread Lars Rune Nøstdal
I bet the ∑-book also has some λ-stuff in it. If it doesn't, it probably uses some other greek letters that aren't mentioned on the cover. It's such a shame, really ... :( -- Lars Rune Nøstdal http://lars.nostdal.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Best practices for using super()

2023-07-05 Thread Lars Liedtke via Python-list
Hey, When you have multiple inheritance and you e.g. want to explicitely call __init__ of one of the classes inherited from, that is not the first in the list of classes to inherit from. Cheers, Lars Lars Liedtke Senior Software Developer [Tel.] +49 721 98993- [Fax] +49 721 98993- [E

Re: pip-sync

2023-07-24 Thread Lars Liedtke via Python-list
This email contains a secure message that can be read by opening the attachment. Lars Liedtke Senior Software Developer [Tel.] [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute gmbh Zeppelinstraße 15 76185 Karlsruhe Germany [Logo Solute] Mark

Re: pip-sync

2023-07-24 Thread Lars Liedtke via Python-list
Did maybe pip-sync create the venv with --system-site-packages (at least that's the commandline option for pip) I only saw behaviour like this so far, when my venv was with --system-site-packages and a package was installed by the system. Sorry for the first mess. Cheers Lars Lars Li

Re: Using a background thread with asyncio/futures with flask

2024-03-22 Thread Lars Liedtke via Python-list
Hey, As far as I know (might be old news) flask does not support asyncio. You would have to use a different framework, like e.g. FastAPI or similar. Maybe someone has already written "flask with asyncio" but I don't know about that. Cheers Lars Lars Liedtke Lead Developer

Re: Using a background thread with asyncio/futures with flask

2024-03-22 Thread Lars Liedtke via Python-list
Sorry, must have missed that :-/ Lars Liedtke Lead Developer [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany [Marken] Geschäftsführer | Managing Director: Dr. Thilo Gans,

Re: How to check whether audio bytes contain empty noise or actual voice/signal?

2024-10-28 Thread Lars Liedtke via Python-list
There are also the concepts of Cepstrum (https://en.wikipedia.org/wiki/Cepstrum) and Quefrency, which are derivatives of Spectrum and Frequency, with which you can even do speaker-recognition, but also detection of events. Lars Liedtke Lead Developer [Tel.] +49 721 98993- [Fax] +49 721

<    1   2