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: 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: 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: 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: 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: for a 'good python'

2023-04-13 Thread Lars Liedtke
Lars Liedtke Software Entwickler [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 [Logo Solute] Marken der solute GmbH | brands of solute GmbH [Marken] [Advertising P

Re: 转发: How to exit program with custom code and custom message?

2023-03-13 Thread Lars Liedtke
and to the output you want and not implicitly rely on adfdtitional parameters of exit. Yes, not all functions work this way. But that does not mean they shouln't ;-) Cheers Lars On 13.03.23 11:18, scruel tao wrote: Chris: It doesn't actually take a list of arguments; the squar

Re: Fast lookup of bulky "table"

2023-01-15 Thread Lars Liedtke
ulfil. All I am trying to say is to reconsider where you really could improve and how far you have to improve. Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe G

Re: How to enter escape character in a positional string argument from the command line?

2022-12-21 Thread Lars Liedtke
Or you could have "native" bash ($SHELL) with WSL. But I assume not everyone is using it. Cheers Lars Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 K

Re: sqlite3 double quote behavior

2022-12-13 Thread Lars Liedtke
t you could let it build the queries for you. Of course, I know that this would mean a dependency and additional complexity. I just could not leave it unmentioned ;-) Cheers Lars Lars Liedtke Software Entwickler [Tel.] +49 721 98993- [Fax] +49 721 98993- [E-Mail]l...@solute.de<

Re: Superclass static method name from subclass

2022-11-11 Thread Lars Liedtke
est.py yay Cheers Lars Lars Liedtke Software Entwickler [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 [Logo Solute] Marken der solute GmbH | brands of solute GmbH [Mark

Re: How to replace an instance method?

2022-09-18 Thread Lars Liedtke
change the old method to call the new method but with the parameters the new method expects. If you explain this in the docstrings as well. Then you do not need to actually replace the method. Or you had a completely different use-case in mind, that I missed. Cheers Lars Lars Liedtke Software

Re: problem downloading python

2022-09-14 Thread Lars Liedtke
maybe some more windows savvy people than me might chime in to offer better advice ;-) . Cheers Lars Lars Liedtke Software Entwickler [Tel.] [Fax] +49 721 98993- [E-Mail]l...@solute.de<mailto:l...@solute.de> solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany [Logo Solute]

Re: Question about learning Python

2022-09-07 Thread Lars Liedtke
ely starting to learn how to program. Please correct me if I am wrong. So you can definitely learn how to program with learning Python and you can learn C afterwards if you need to. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 9

Re: Trying to understand nested loops

2022-08-05 Thread Lars Liedtke
ongly, so if you could try to formulate in words what this loop does, I or other people on this list, will be pleased to show you where you might have got things wrong and how it really works. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 989

Re: why function throws an error?

2022-06-28 Thread Lars Liedtke
Hey, Which error does it throw? Could you please send the stacktrace as well? Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe

Re: Logging into single file from multiple modules in python when TimedRotatingFileHandler is used

2022-06-22 Thread Lars Liedtke
aring. -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany Marken der solute GmbH | brands of solute GmbH billiger.de | Shoppi

Re: Logging into single file from multiple modules in python when TimedRotatingFileHandler is used

2022-06-22 Thread Lars Liedtke
-- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany Marken der solute GmbH | brands of solute GmbH billiger.de | Shopping.de

Re: Python & nmap

2022-05-20 Thread Lars Liedtke
Ansible has got a shell module, so you could run custom commands on all hosts. But it gets more difficult in parsing the output afterwards. -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15

Re: Python & nmap

2022-05-19 Thread Lars Liedtke
you start developing something like that in Python, you could as well write an ansible module and combine both, because Ansible itself is written in Python. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de s

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: Why no list as dict key?

2022-04-25 Thread Lars Liedtke
Thx, didn't see it that way yet. -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15 76185 Karlsruhe Germany Marken der solute GmbH | brands of solute

Re: Why no list as dict key?

2022-04-25 Thread Lars Liedtke
ll fail to see the application for that, which is most propably to ignorance rather than criticism. Cheers Lars -- Lars Liedtke Software Entwickler Phone: Fax:+49 721 98993- E-mail: l...@solute.de solute GmbH Zeppelinstraße 15

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-14 Thread Lars Liedtke
Additionally, which datatype would you expect them to be returned in? One could argument for int or float (Decimal?),  both could be valid datatypes, depending on how exact you might want them, while the second is the time base of SI units. Cheers Lars -- Lars Liedtke Software Entwickler

How do you log in your projects?

2022-02-08 Thread Lars Liedtke
course you shouldn't leak secrets... - How do you decide, which kind of log message goes into which level? - How do you prevent logging cluttering your actual code? Maybe there are some questions I forgot, so please feel free to add whatever you think might help finding the best way of logging (tm)

Re: Best way to check if there is internet?

2022-02-07 Thread Lars Liedtke
P.S.: for ping a startingpoint can be icmplib, for dns dnspython and for http requests. But consider as well if you want to check for IPv4 and/or IPv6 Connectivity. Am 07.02.22 um 13:47 schrieb Lars Liedtke: Each Browser is doing it differently and even Windows or Linux-Desktopmanagers

Re: Best way to check if there is internet?

2022-02-07 Thread Lars Liedtke
tatus 200. Each with its own Errorhandling and if you have got all three, then it is propable that you have "Internet". Cheers Lars Am 07.02.22 um 10:33 schrieb Abdur-Rahmaan Janhangeer: Popular browsers tell: No internet connection detected. A function that goes in the same sense.

Re: Why dict.setdefault() has value as optional?

2022-02-02 Thread Lars Liedtke
t that can have multiple keys with each different values of different types? Have fun in the rabbithole ;-) Cheers Lars Am 02.02.22 um 13:54 schrieb Marco Sulla: Just out of curiosity: why dict.setdefault() has the default parameter that well, has a default value (None)? I used setdefault i

Re: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-10 Thread Lars Liedtke
balancing seemed like overkill to me. Still, I guess if it has to be, then it has to be. Skip -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Mannheim 108285 Geschäftsführer: Jürgen Egeling

Re: Gunicorn - HTTP and HTTPS in the same instance?

2022-01-10 Thread Lars Liedtke
for only this functionality are less than 10. So it's may seem complicated at first, but is way less oncxe you got used to it. Cheers Lars Am 08.01.22 um 17:25 schrieb Skip Montanaro: Thanks all. I was hoping to get away without something more sophisticated like NGINX. This is just a p

Re: Call julia from Python: which package?

2021-12-17 Thread Lars Liedtke
n/ > > Even if you go the Julia route, it's probably still best to profile your > Python code to identify the slow ("hot") spots, and rewrite only them. -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https

Re: Create a contact book

2021-10-26 Thread Lars Liedtke
😂 > Here at Homeworks Anonymous, the first step is admitting that what you > have is a homework problem. :) > > ChrisA -- punkt.de GmbH Lars Liedtke .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109 500 https://infrastructure.punkt.de i...@punkt.de AG Man

Re: memory consumption

2021-03-29 Thread Lars Liedtke
e? I know that there can be (good) reasons to care, but as long as your tasks run fine, without clogging your system, in my opinion there might be nothing to worry about. Cheers Lars Am 29.03.21 um 12:12 schrieb Alexey: > Hello everyone! > I'm experiencing problems with memory consumptio

Re: Pip standard error warning about dependency resolver

2021-02-24 Thread Lars Liedtke
without error, even though there might be output on stderr. That said. As far as I know you could try the commandline option for using the new resolver explicitly. I don't know if there is an option for "silent" Cheers Lars Am 23.02.21 um 17:48 schrieb adam@gmail.com: > I s

Re: tarfile : secure extract?

2016-02-12 Thread Lars Gustäbel
members that > have absolute filenames starting with "/" or filenames with two dots > "..". > > My program has to extract tar archives from untrusted sources :-} Read the discussion in this issue on why this might be a bad idea: http://bugs.python.org/issue21109 -

Re: tarfile : read from a socket?

2016-02-12 Thread Lars Gustäbel
On Fri, Feb 12, 2016 at 09:35:40AM +0100, Antoon Pardon wrote: > On 02/11/2016 06:27 PM, Lars Gustäbel wrote: > > What about using an iterator? > > > > def myiter(tar): > > for t in tar: > > print "extracting", t.name > >

Re: tarfile : read from a socket?

2016-02-11 Thread Lars Gustäbel
ting", t.name yield t sfo = sock.makefile('r') taro = tarfile.open(fileobj=sfo,mode='r|') taro.extractall(members=myiter(taro),path=edir) Cheers, -- Lars Gustäbel l...@gustaebel.de -- https://mail.python.org/mailman/listinfo/python-list

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: 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
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

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: Tarfile and usernames

2012-12-31 Thread lars
ing a generator as some kind of filter for the extractall() method. Just rewrite the example so that every tarinfo is patched with the required user and group name information before being yielded: def filter(members): for tarinfo in members: tarinfo.uname = "root" t

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

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: 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

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: 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

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-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-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

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: 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

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

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: 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

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: 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

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

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 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

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: Inconsistencies between zipfile and tarfile APIs

2011-07-22 Thread Lars Gustäbel
ython 4000 rolls out. > > That's just step one people, we have a long way to go! archive.py is no new idea. Unfortunately, to this day, nobody had the time to come up with an implementation. Let me say it again: less false pathos, more code. Please. -- Lars Gustäbel l...@gustaebel.de To a man with a hammer, everything looks like a nail. (Mark Twain) -- http://mail.python.org/mailman/listinfo/python-list

Re: [PyWart 1001] Inconsistencies between zipfile and tarfile APIs

2011-07-22 Thread Lars Gustäbel
o odd things myself from time to time, I think the stdlib as a whole is great, usable and powerful. The stdlib surely needs our attention. Instead of answering your post, I should have been writing code and fixing bugs ... -- Lars Gustäbel l...@gustaebel.de Seek simplicity, and distrust it. (Alfred North Whitehead) -- http://mail.python.org/mailman/listinfo/python-list

Python mode: make emacs use existing *Python* frame, and not open a new one

2011-06-16 Thread Lars Bungum
get around this? --lars -- http://mail.python.org/mailman/listinfo/python-list

Re: English Idiom in Unix: Directory Recursively

2011-05-21 Thread Lars Enderin
2011-05-21 11:54, Lars Enderin skrev: > 2011-05-21 11:52, Lars Enderin skrev: >> >> Please include attributions, in this case for Peter Moylan and rusi! > > Just Peter Moylan, sorry! Ignore the above. -- http://mail.python.org/mailman/listinfo/python-list

Re: English Idiom in Unix: Directory Recursively

2011-05-21 Thread Lars Enderin
2011-05-21 11:52, Lars Enderin skrev: > > Please include attributions, in this case for Peter Moylan and rusi! Just Peter Moylan, sorry! -- http://mail.python.org/mailman/listinfo/python-list

Re: English Idiom in Unix: Directory Recursively

2011-05-21 Thread Lars Enderin
2011-05-21 10:32, Jonathan de Boyne Pollard skrev: >> The supposed inefficiency of recursive implementations is based >> largely on the properties of hardware that is now obsolete. With >> modern processors there's no great efficiency hit. In some of the >> smaller microcontrollers, it's true, you

Re: tarfile and progress information

2010-07-14 Thread Lars Gustäbel
, "w:gz") for filename in filenames: tarinfo = tar.gettarinfo(filename) fobj = FileProxy(open(filename, "rb"), callback) tar.addfile(tarinfo, fobj) fobj.close() I hope this helps. Regards, -- Lars Gustäbel l...@gustaebel.de The power of accurate observation

Re: pexpect and logging integration

2010-03-11 Thread Lars Stavholm
It works like a charm, thank you! /Lars Jean-Michel Pichavant wrote: > Lars Stavholm wrote: >> Hi all, >> >> has anyone managed to integrate pexpect and logging? >> >> I.e., I'd like to be able to pick up the dialog, >> commands sent and responses

pexpect and logging integration

2010-03-09 Thread Lars Stavholm
brary. Any thoughts appreciated /Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tarfile.TarFile.gzopen is not in the online documentation?

2010-02-26 Thread Lars Gustäbel
On Fri, Feb 26, 2010 at 09:28:04AM +0100, Baptiste Lepilleur wrote: > 2010/2/24 Lars Gustäbel > > > On Wed, Feb 24, 2010 at 09:37:19AM +0100, Baptiste Lepilleur wrote: > > > I stumbled uppon this and find it somewhat odd: some class methods of > > > TarFile and Ta

Re: Why tarfile.TarFile.gzopen is not in the online documentation?

2010-02-25 Thread Lars Gustäbel
On Wed, Feb 24, 2010 at 04:29:18PM -0500, Terry Reedy wrote: > On 2/24/2010 5:14 AM, Lars Gustäbel wrote: >> On Wed, Feb 24, 2010 at 09:37:19AM +0100, Baptiste Lepilleur wrote: >>> I stumbled uppon this and find it somewhat odd: some class methods of >>> TarFile an

Re: Why tarfile.TarFile.gzopen is not in the online documentation?

2010-02-24 Thread Lars Gustäbel
en() method is the one that is publicly documented and supposed to be used. It decides which of the three methods to use based on the mode argument and does many more other high-level things as well. Regards, -- Lars Gustäbel l...@gustaebel.de I do not care to belong to a club that acce

Re: finding contents from string

2010-02-16 Thread Lars Behrens
danin wrote: > can anyone please tell me about how to do this. Now come on, you have to give a *bit* more information. What have you done so far? What did you plan? What are the rules for finding the string? -- Cheerz Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: compression level with tarfile (w:gz) ?

2009-08-10 Thread Lars Gustäbel
.PIPE, stdout=fobj) tar = tarfile.open(fileobj=proc.stdin, mode="w|") tar.add(...) tar.close() proc.stdin.close() fobj.close() Cheers, -- Lars Gustäbel l...@gustaebel.de A physicist is an atom's way of knowing about atoms. (George Wald) -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange python script behaviour

2009-08-04 Thread Lars Behrens
editor you used, maybe there is a missing newline... -- Cheerz Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Call function from another class

2009-07-27 Thread Lars
py", line 3629, in Bind id = source.GetId() AttributeError: 'function' object has no attribute 'GetId' My experience with ID is setting it to "-1". So I'm not sure if it is a wrong use of Bind or an wxPython error. /Lars -- http://mail.python.org/mailman/listinfo/python-list

Call function from another class

2009-07-27 Thread Lars
ed something with a global variable, but it would make no difference regarding the function problem. Amongst the other things I've tried is to bind the event of the 2nd/slider window closing (l. 46), but no. Python code at Pastebin: http://pastebin.com/m7c24ec34 So some help on Classes and etc

Re: reading file to list

2009-01-21 Thread Lars Behrens
Lars Behrens wrote: > As a non-native speaker and non-academic, I don't understand the "fittine "fitting", I meant. Sorry ^^ -- Cheerz Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: reading file to list

2009-01-21 Thread Lars Behrens
as a result is pretty self-descriptive. As a non-native speaker and non-academic, I don't understand the "fittine into English language idioms naturally" which is mentioned here in the different subthreads. Could you try to explain that for me? TIA -- Cheerz Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Start Python at client side from web app

2009-01-21 Thread Lars Behrens
l be executed at the client. The signature > prevents others from executing code. My first thought was: Wouldn't it be much easier to start the script via ssh? -- Cheerz Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: open a shell prompt froma python program

2008-10-30 Thread Lars Stavholm
gaurav kashyap wrote: > Dear all, > > Can u tell me a python program that when executed in a shell > prompt,opens another shell prompt. > > Simply i want to open a shell prompt from a python program. I think you're looking for: import os os.system("/bin/sh") -- http://mail.python.org/mailman/l

Split entries from LDAP

2008-10-11 Thread Lars
iption': ['Mail&webserver']})" I've tried different things, but don't quite know to split the tuple. The examples I've seen is with a nice clean list ("a", "b", "z"), and mine is full of special characters and etc., so some direct

Re: equivalent of py2exe in other os

2008-10-07 Thread Lars Stavholm
Almar Klein wrote: > Hi, > I was going to say "try google", but it seems quite hard to find indeed. > Use "freeze" for linux and "py2app" for osx. http://python.net/crew/atuining/cx_Freeze /L > I know of a program called gui2exe which is a gui which uses the three > to compile executables of your

Re: python for *nix system admins

2008-09-28 Thread Lars Stavholm
Thank you all for your input. /Lars Lars Stavholm wrote: > Hi All, > > I'm new to this list and hoping that this is not off-topic. > If it is, please point me in the right direction. > > I seem to recollect a python module or library for *nix sysadmins, > but I can&#x

Re: python for *nix system admins

2008-09-27 Thread Lars Stavholm
km wrote: > import os Thanks, but I'm aware of the standard libraries like os, sys, commands, and whatnot. I'm looking for a non-standard library that acts like a wrapper for the unix commands. I have seen it, I just can't find it again. /L > On Sat, Sep 27, 2008 at 1

python for *nix system admins

2008-09-27 Thread Lars Stavholm
pabilities to the python language. It seemed like a lesser known, perhaps new, python library or module. Any input or ideas appreciated /Lars Stavholm -- http://mail.python.org/mailman/listinfo/python-list

Re: How to process a very large (4Gb) tarfile from python?

2008-07-19 Thread Lars Gustäbel
On Thu, Jul 17, 2008 at 11:41:50PM -0700, Uwe Schmitt wrote: > On 17 Jul., 22:21, Lars Gustäbel <[EMAIL PROTECTED]> wrote: > > > > > Maybe we should post this issue to python-dev mailing list. > > > Parsing large tar-files is not uncommon. > > > > Thi

Re: How to process a very large (4Gb) tarfile from python?

2008-07-17 Thread Lars Gustäbel
s a dirty hack ! > > > > Thanks, Uwe.  That works fine for me.  It now reads through all 2.5 > > million members, in about 30 minutes, never going above a 4M working > > set. > > Maybe we should post this issue to python-dev mailing list. > Parsing large tar-

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: [HELP] SMTPlib not sending my mail

2008-01-29 Thread Lars Johansen
have you checked your mail server logs ? tir, 29.01.2008 kl. 00.24 -0800, skrev ashok.raavi: > Hi, > > I am also facing the same problem, smtplib used to send mail a while > back but it stopped sending mails. > > when i run this in interpreter > >>> import smtplib > >>> s = smtplib.SMTP("localho

Re: Bug writing/reading to file.

2007-12-24 Thread Lars Johansen
e, but i can't read it with the read-function. > > Can this be a problem with file-pointers? And how can i solve it? -- Lars Johansen <[EMAIL PROTECTED]> eZ Systems -- http://mail.python.org/mailman/listinfo/python-list

Re: Rounding

2007-12-18 Thread Lars Johansen
that does not round up.. int(round(6.345)) maybe tir, 18.12.2007 kl. 11.53 +0300, skrev Vladimir Rusinov: > > > On 12/15/07, katie smith <[EMAIL PROTECTED]> wrote: > if i have a number 6.345 and i wanted it to be 6 without > subtracting .345 because it won't always be .345 what do

Any simpler way to do this

2007-12-07 Thread Lars Johansen
quot;return term.color", however this gives a syntax error, are there any clever way to do this ? -- Lars Johansen <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Good Book

2007-10-16 Thread Lars Johansen
HI are there any recommended books for an sysadmin who has been mostly writing shell scripts, but want to move up to create more complex programs. -- http://mail.python.org/mailman/listinfo/python-list

Apache cgi and multiple versions of python

2007-08-12 Thread Lars Wessman
I am running OS X and have Python 2.3 installed with the system and have installed 2.5 using the installer available at pythonmac.org. I am running the system install of Apache 1.3 and I am not using mod_python. When Apache 1.3 runs Python cgi scripts, the cgitb output indicates that the verision

Re: The Modernization of Emacs

2007-06-25 Thread Lars Brinkhoff
David Kastrup <[EMAIL PROTECTED]> writes: > I should think that version 2.3.1 would not even try ftp. Is that > on Multics? Note that the GNU Emacs version jumped directly from 1.12 to 13. See etc/ONEWS.1. -- http://mail.python.org/mailman/listinfo/python-list

Re: Create TarFile using string buffers

2007-03-19 Thread Lars Gustäbel
tarinfo.size attribute. You could let your program write its data to a StringIO object and pass that object to addfile(). http://docs.python.org/lib/tarfile-objects.html -- Lars Gustäbel [EMAIL PROTECTED] Linux is like a wigwam - no Gates, no Windows, Apache inside. -- http://mail.python.org/

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

  1   2   >