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: Finding user's home dir

2005-02-03 Thread Lars
Works great with Python 2.3.4 on... dare I say it... windows xp >>> getHomeDir() 'C:\\Documents and Settings\\Lars' Regards Lars Nemesis wrote: > (..) > Please, could you test it on your systems and tell me what you got? > (..) -- http://mail.python.org/mailman/listinfo/python-list

Re: goto, cls, wait commands

2005-02-13 Thread Lars
You sir are a troll for sure. QBasic?! When was the last time you did any programming, 1989? Gave me a laugh though. Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Alternative to raw_input ?

2005-02-13 Thread Lars
Then may I suggest the keeping-it-simple approach: def myGetch(): raw_input("Press Enter to continue") (sorry about the dots, I'm using google groups) Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Stable GUI

2005-02-16 Thread Lars
why you really need lightspeed widget rendering ? Stability goes without saying:) Regards Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Stable GUI

2005-02-17 Thread Lars
ue, and having an event check the output buffer every second or so. The Tcl/TK crowd probably have more extensive experience with using Tk and Tix for bigger long running apps, maybe you can ask them for more info? Good luck with your app! Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Shift Confusion

2005-02-25 Thread Lars
Hi Kamilche, Aside from the 7bit confusion you should take a look at the 'struct' module. I bet it will simplify your life considerably. #two chars >>> import struct >>> struct.pack('cc','A','B') 'AB' #unsigned short + two c

Re: ZoDB's capabilities

2005-03-01 Thread Lars
Quote Larry Bates: > There is a VERY large website that uses Zope/ZODB that takes up to > 9000 hits per second when it gets busy. What's the url? I just got curious to see it a big site on Zope in action. - Lars "Pythonfan stuck with c sharp" -- http://mail.python

Re: Appeal for python developers

2005-03-07 Thread Lars
nt Python. Maybe this is what your looking for: freeBasic : http://sourceforge.net/projects/fbc/ libertyBasic: http://lbpp.sourceforge.net/ I tested the first one and it took me back 15 years in a flash. Cheers, Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing the screen

2004-12-24 Thread Lars
#for unix Not the most advanced solution though. --- Happy holidays! ~Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Track keyboard and mouse usage

2006-07-18 Thread Lars
Diez B. Roggisch wrote: > will make the devices world readable. While I haven't thought about any > security implications that might have (and am not especially > knowledgeable in such things to be honest), I'm convinced it is way less > likely to introduce any exploitable holes than suid root w

Re: write eof without closing

2006-08-19 Thread Lars
cage wrote: > I want to use a program that has a 'pipe' mode, in which you can use > stdin to send commands to the program. I found out that, when in pipe > mode and you are using the keyboard as input source you can do Ctrl-D to > 'signal' the program that you have finished typing your command.

Re: Put a file on an ftp server over ssl

2005-05-11 Thread Lars
Daniel, Why don't you just use the 'sftp' command line program, it's available for all unixes and I bet you can find a build for windows to? Then you could just do an os.system(..) and be done with it. Cheers! Lars -- http://mail.python.org/mailman/listinfo/python-list

Problem building extension under Cygwin (ImportError: Bad address)

2006-05-04 Thread Lars
-L /usr/local/lib/ -lpython2.4 -lc python -c'import hello;q = hello.message("Lars");print q' Hello, Lars But doing a similar compile under Cygwin doesn't work so well: (same options, but the output is called hello.dll and the directories are a bit different) $ python -

Re: Problem building extension under Cygwin (ImportError: Bad address)

2006-05-04 Thread Lars
ImportError: Bad address --- -Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem building extension under Cygwin (ImportError: Bad address)

2006-05-04 Thread Lars
Great! Thanks for the advice. Lars -- http://mail.python.org/mailman/listinfo/python-list

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

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

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

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

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

Re: Nufox : Xul + Python

2005-10-01 Thread Lars Heuer
Hi, > Oops: > http://artyprog.noip.org:8080 Again Oops: :)) http://artyprog.no-ip.org:8080 Best regards, Lars -- http://semagia.com -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.4: tarfile tell() and seek() seem to be broeken

2005-06-30 Thread Lars Gustäbel
On Thu, 02 Jun 2005 19:52:24 +0200, N. Volbers wrote: > Thanks for taking care of it ;-) I submitted patch #1230446 today which ought to fix the problem. -- Lars Gustäbel [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: psp & php integration

2005-07-26 Thread Lars Heuer
Hi Jon, [ PHP / Python ] > If not, is there any other way in Python (or PHP) to achieve this? I'm not sure if it helps, but here is package that integrates the Python into PHP: http://www.csh.rit.edu/~jon/projects/pip/ Best regards, Lars -- http://semagia.com -- http://mail.py

Re: problems with tarfile.open and tar.bz2

2005-08-28 Thread Lars Gustäbel
t; stream mode: tar_archive = tarfile.open(mode="r|bz2", fileobj=StringIO.StringIO(attach)) for tarinfo in tar_archive: print tarinfo.name print tar_archive.extractfile(tarinfo).read() tar_archive.close() -- Lars Gustäbel [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: change date format

2005-08-31 Thread Lars Gustäbel
[Xah Lee] > Apache by default uses the following format for date: > 30/Aug/2005 > > is there a module that turn this directly into mmdd? Use time.strptime() and time.strftime(). Not a single occurrence of the f**k word. You're making progress. Keep it up! -- Lars Gustäbel

Re: determine if os.system() is done

2005-09-07 Thread Lars Gustäbel
[Fredrik Lundh] > han har försökt, men hans tourette tog överhanden: IMHO it's more likely an Asperger's syndrome. http://en.wikipedia.org/wiki/Asperger_Syndrome -- Lars Gustäbel [EMAIL PROTECTED] Any sufficiently advanced technology is indistinguishable from magic. (Art

Re: sys.stdin.read question

2004-12-07 Thread Lars Tengnagel
her so the problem so far is unsolved for my point. But the newline command would explain my problems with the program. Can it be a problem under windows since I'm using XP and the winpython Hopefully Lars "Caleb Hattingh" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PRO

converting textobject to name of other object.

2004-12-07 Thread Lars Tengnagel
self.seqnr=0 self.basenr=0 self.dict = {} Thanks Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Path problem

2004-12-12 Thread Lars Yencken
t depends internally on the file someScript.r, and can't find it. I've found a pathconf module posted earlier to this group, which does half the job. Unfortunately, when I call get_rootdir() it returns '/usr/bin' instead of my project's root directory ;( Lars -- http://mail.python.org/mailman/listinfo/python-list

Path problem

2004-12-12 Thread Lars Yencken
ifferent on every workspace I check out from the repository. If there's a way that I can get the directory of the module file itself, then that's all I need to fix this for good. Thanks, Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: Path problem

2004-12-13 Thread Lars Yencken
and Limodou for your help. Lars -- http://mail.python.org/mailman/listinfo/python-list

Re: HTML editor component?

2005-03-20 Thread Lars Heuer
Hi skol, > Is there any HTML WYSIWYG editor component available for > Python/wxPython? Thanks. There is wxMozilla: http://wxMozilla.sf.net/ Best regards, Lars -- http://semagia.com -- http://mail.python.org/mailman/listinfo/python-list

Re: HTML editor component?

2005-03-20 Thread Lars Heuer
be difficult, though. If you'll like to see wxMozilla Editor in action you may take a look at http://www.eclass.net/ Best regards, Lars -- http://semagia.com -- http://mail.python.org/mailman/listinfo/python-list

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: 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 : 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: merits of Lisp vs Python

2006-12-13 Thread Lars Brinkhoff
Bill Atkins <[EMAIL PROTECTED]> writes: > the macro is just a friendlier syntax for expressing an idea. I like that phrase! -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to determine if a certain PID is still running

2006-02-03 Thread Lars Gustäbel
you from getting false positives with reused pids. The IMO better way is to use the subprocess module that comes with Python 2.4. How to replace os.spawn* calls is described here: http://www.python.org/doc/2.4.2/lib/node244.html -- Lars Gustäbel [EMAIL PROTECTED] To a man with a hammer, ev

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

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

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

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

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

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

2006-04-18 Thread Lars Yencken
= uw + 1# user win > Try adding into the first line of your win function: global uw, cw Then Python knows to look outside your function to find those variables. Lars -- 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: 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: 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: 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: 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: 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

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

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

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

definition of sub-functions in the hotshot profiler

2006-03-23 Thread Lars Woetmann
7;, 'calls') stats.print_stats() --output 195 function calls in 0.005 CPU seconds Ordered by: internal time, call count ncalls tottime percall cumtime percall filename:lineno(function) 1 0.0010.0010.0050.005 /home/lars/skole/scriptsprog/rapport/code/m/kw/K

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

pexpect and logging integration

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

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

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

  1   2   >