Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Heiko Wundram
Am 05.06.2013 10:53, schrieb Νικόλαος Κούρας: I ALSO HAVE GIVEN ROOT ACCESS TO ANOTHER MEMBER OF THIS LIST AND HE IN FACT TRIED TO HELP ME INSTEAD OF DOING WHAT YOU DID. AND FROM 2 OTHER PEOPLE AS SOME OTHER FORUMS TOO. You know what you're saying there? You've given (at least) four people y

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Heiko Wundram
Am 05.06.2013 11:19, schrieb Chris Angelico: Not quite accurate; he can change his root password back as soon as he logs in as the non-root user and cats one little file. I understood that - I rather got the impression that he (as a person) wasn't technically capable of changing it. Alas, the

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Heiko Wundram
Am 05.06.2013 11:33, schrieb Νικόλαος Κούρας: It will remain, if you go away. Look, pal, I work as a programmer for a (medium size) network service provider, and due to that I (should) know my networking security 101. It's generally people like you who are: 1) extremely careless about their

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Heiko Wundram
Am 05.06.2013 12:21, schrieb Νικόλαος Κούρας: I dont care what you do for a living, you never helped me a bit in anything, you just presented to me your self 1 hour ago to join the party. Guess why I did so: you're presently touching a subject (network safety) that I hold dear, and not only b

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Heiko Wundram
Am 05.06.2013 12:30, schrieb Νικόλαος Κούρας: You and Heiko of course would be excluded from the programmer for hire list. Guess what: I have a job. And I don't give a damn. -- --- Heiko. -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Heiko Wundram
Am 05.06.2013 13:07, schrieb Νικόλαος Κούρας: Btw, since history doesnt show me his history comamnds when he logged in from .au(why not really?), how can i tell what exactly did he do when he logged on to the server? As root has full access to your system (i.e., can change file contents and

Re: Apache and suexec issue that wont let me run my python script

2013-06-05 Thread Heiko Wundram
Am 05.06.2013 13:19, schrieb Νικόλαος Κούρας: Is there some logging utility i can use next time iam offering root access to someone(if i do it) or perhaps logging a normal's account activity? Short answer: Not for root, no. Long answer: as I've already said: root can change file contents, or

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-06 Thread Heiko Wundram
Am 05.06.2013 18:44, schrieb MRAB: From the previous posts I guessed that the filename might be encoded using ISO-8859-7: >>> s = b"\305\365\367\336\ \364\357\365\ \311\347\363\357\375.mp3" >>> s.decode("iso-8859-7") 'Ευχή\\ του\\ Ιησού.mp3' Yes, that looks the same. Most probably, his ter

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-06 Thread Heiko Wundram
Am 06.06.2013 12:35, schrieb Νικόλαος Κούρας: ni...@superhost.gr [~/www/data/apps]# ls -l | file - /dev/stdin: ASCII text Did you actually try to understand what I wrote? -- --- Heiko. -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-06 Thread Heiko Wundram
Am 06.06.2013 13:00, schrieb Νικόλαος Κούρας: Heiko, the ssh client i used to 'mv' the .mp3 was putty.Do you mean that putty is responsible for the encoding mess? Exactly. Check the encoding that putty uses for the terminal session. If it doesn't use UTF-8, switch your terminal session to UTF

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-06 Thread Heiko Wundram
Am 06.06.2013 13:24, schrieb Νικόλαος Κούρας: ni...@superhost.gr [~/www/data/apps]# ls *.mp3 | file - /dev/stdin: ASCII text Again, did you actually read (and try to understand) what I wrote? I said to redo the rename after you change your terminal session to UTF-8. -- --- Heiko. -- http://m

Don't feed the troll... (was: Re: A few questiosn about encoding)

2013-06-14 Thread Heiko Wundram
Am 14.06.2013 10:37, schrieb Nick the Gr33k: So everything we see like: 16474 nikos abc123 everything is a string and nothing is a number? not even number 1? Come on now, this is _so_ obviously trolling, it's not even remotely funny anymore. Why doesn't killfiling work with the mailing list

Re: Don't feed the troll...

2013-06-14 Thread Heiko Wundram
Am 14.06.2013 11:32, schrieb Nick the Gr33k: I'mm not trolling man, i just have hard time understanding why numbers acts as strings. If you can't grasp the conceptual differences between numbers and their/a representation, it's probably best if you stayed away from programming alltogether.

Re: Don't feed the help-vampire

2013-06-14 Thread Heiko Wundram
Am 14.06.2013 14:09, schrieb rusi: Since identifying a disease by the right name is key to finding a cure: Nikos is not trolling or spamming; he is help-vampiring. Just to explain the trolling allegation: I'm not talking about him wanting to get his scripts fixed, that's help-vampiring most ce

Re: Don't feed the troll...

2013-06-14 Thread Heiko Wundram
Am 14.06.2013 14:45, schrieb Nick the Gr33k: we are all benefit out of this. Let's nominate you for a nobel prize, saviour of python-list! -- --- Heiko. -- http://mail.python.org/mailman/listinfo/python-list

Re: FSR and unicode compliance - was Re: RE Module Performance

2013-07-29 Thread Heiko Wundram
Am 29.07.2013 13:43, schrieb wxjmfa...@gmail.com: 3.2 timeit.timeit("r = dir(list)") 22.300465007102908 3.3 timeit.timeit("r = dir(list)") 27.13981129541519 For the record, I do not put your example to contradict you. I was expecting such a result even before testing. Now, if you do not un

Re: [Perl Golf] Round 1

2012-02-05 Thread Heiko Wundram
Am 05.02.2012 12:49, schrieb Alec Taylor: Solve this problem using as few lines of code as possible[1]. Pardon me, but where's "the problem"? If your intention is to propose "a challenge", say so, and state the associated problem clearly. -- --- Heiko. -- http://mail.python.org/mailman/listi

Re: [Perl Golf] Round 1

2012-02-05 Thread Heiko Wundram
Am 05.02.2012 23:15, schrieb Neal Becker: Heiko Wundram wrote: Am 05.02.2012 12:49, schrieb Alec Taylor: Solve this problem using as few lines of code as possible[1]. Pardon me, but where's "the problem"? If your intention is to propose "a challenge", say so, and sta

Re: how to read serial stream of data [newbie]

2012-02-07 Thread Heiko Wundram
Am 07.02.2012 14:48, schrieb Antti J Ylikoski: On 7.2.2012 14:13, Jean Dupont wrote: ser2 = serial.Serial(voltport, 2400, 8, serial.PARITY_NONE, 1, rtscts=0, dsrdtr=0, timeout=15) In Python, if you want to continue the source line into the next text line, you must end the line to be continued

Re: Inconsistency between os.getgroups and os.system('groups') after os.setgroups()

2012-03-25 Thread Heiko Wundram
Am 25.03.2012 23:32, schrieb jeff: After the os.setgroups, os.getgroups says that the process is not in any groups, just as you would expect... I can suppress membership in the root group only by doing os.setgid and os.setuid before the os.system call (in which case I wind up in the group of the

Re: "convert" string to bytes without changing data (encoding)

2012-03-28 Thread Heiko Wundram
Am 28.03.2012 11:43, schrieb Peter Daum: ... in my example, the variable s points to a "string", i.e. a series of bytes, (0x61,0x62 ...) interpreted as ascii/unicode characters. No; a string contains a series of codepoints from the unicode plane, representing natural language characters (at l

Re: "convert" string to bytes without changing data (encoding)

2012-03-28 Thread Heiko Wundram
Am 28.03.2012 19:43, schrieb Peter Daum: As it seems, this would be far easier with python 2.x. With python 3 and its strict distinction between "str" and "bytes", things gets syntactically pretty awkward and error-prone (something as innocently looking like "s=s+'/'" hidden in a rarely reached b

Re: Copy-on-write when forking a python process

2011-04-08 Thread Heiko Wundram
Am 08.04.2011 18:14, schrieb John Connor: > Has anyone else looked into the COW problem? Are there workarounds > and/or other plans to fix it? Does the solution I am proposing sound > reasonable, or does it seem like overkill? Does anyone foresee any > problems with it? Why'd you need a "fix" l

Re: Copy-on-write when forking a python process

2011-04-08 Thread Heiko Wundram
Am 08.04.2011 20:34, schrieb jac: > I disagree with your statement that COW is an optimization for a > complete clone, it is an optimization that works at the memory page > level, not at the memory image level. In other words, if I write to a > copy-on-write page, only that page is copied into my

Re: Problem receiving UDP broadcast packets.

2011-04-19 Thread Heiko Wundram
Am 20.04.2011 01:54, schrieb Grant Edwards: > I guess the problem is that I expected to receive a packet on an > interface anytime a packet was received with a destination IP address > that matched that of the the interface. Apprently there's some > filtering in the network stack based on the _sou

Re: Problem receiving UDP broadcast packets.

2011-04-20 Thread Heiko Wundram
Am 20.04.2011 16:30, schrieb Grant Edwards: >> If you need to see the packets regardless, either use a promiscuous mode >> sniffer (i.e., tcpdump, but that's relatively easy to mirror in Python >> using SOCK_RAW, capturing packets at the ethernet level), or add a route >> on your system for the 192

Re: Problem receiving UDP broadcast packets.

2011-04-20 Thread Heiko Wundram
Am 21.04.2011 03:35, schrieb Dan Stromberg: > I think tcpdump and tshark (was tethereal) will put the interface into > promiscuous mode so it can see more traffic; on OSF/1 (Tru64), we had > to do this manually for said programs to see all that was possible > (barring the presence of a switch not r

Re: learnpython.org - an online interactive Python tutorial

2011-04-21 Thread Heiko Wundram
Am 21.04.2011 09:19, schrieb Chris Angelico: > On Thu, Apr 21, 2011 at 5:10 PM, Algis Kabaila wrote: >> False: Python IS strongly typed, without doubt (though the >> variables are not explicitly declared.) > > Strongly duck-typed though. If I create a class that has all the right > members, it ca

Re: is there a difference between one line and many lines

2011-04-21 Thread Heiko Wundram
Am 21.04.2011 11:55, schrieb vino19: > I am asking about what happens in Python interpreter? Why is there a > difference between running one line like "a=1;b=1" and two lines like "a=1 \n > b=1"? Does it decide to locate memory in different types depend on a code? There is no difference between

Re: is there a difference between one line and many lines

2011-04-21 Thread Heiko Wundram
Am 21.04.2011 11:59, schrieb Heiko Wundram: > Am 21.04.2011 11:55, schrieb vino19: >> I am asking about what happens in Python interpreter? Why is there a >> difference between running one line like "a=1;b=1" and two lines like "a=1 >> \n b=1"? Does it d

PyAuthD - beta 6

2005-12-06 Thread Heiko Wundram
= Go to: http://lists.stud.mh-hannover.de/mailman/listinfo/pyauthd and http://mantis.stud.mh-hannover.de and subscribe to the list and the bugtracker. All the rest... === If you require more info or want to join the development effort, just send me a mail or j

Re: dynamic variable referencing

2005-12-06 Thread Heiko Wundram
Michael Williams wrote: > - I don't want to say OBJECT.VAR but rather OBJECT. > ("string") and have it retrieve the variable (not the value of > it) if in fact it exists. . . > > > It's not exactly clear what you're trying to tell us here. Basically, what I guess you want is:

Re: JPEG decoder not available in PIL

2005-12-06 Thread Heiko Wundram
Peter wrote: > At the last moment I managed to solve this problem and I hope it is > worth supplying the details here. First there is a file in the install > directory libImaging/Jpeg.h which has a line: > > #include "jpeglib.h" > > but there is no such header file. On my system I put: > >

Re: can't find socket.ssl() on win32

2005-12-07 Thread Heiko Wundram
ds wrote: > i'm running under win2k trying to implement an ssl socket, and keep > getting the error > File "C:\Code\Python\ssl\NewsSrc.py", line 67, in connect > ssl = socket.ssl(sock, None, None) > AttributeError: 'module' object has no attribute 'ssl' > i'm running this under ActiveState ver

Re: List index question

2005-12-07 Thread Heiko Wundram
questions? wrote: > I want to do list index function. y=['1','2','3','4'] y > ['1', '2', '3', '4'] y.index['2'] > Traceback (most recent call last): > File "", line 1, in ? > TypeError: unsubscriptable object > > It works with y=[1,2,3,4]. Anyone has any hint, what's the reason >

Re: opening a file using a relative path from a subclass in a package

2005-12-07 Thread Heiko Wundram
spike grobstein wrote: > I'd like the packages to define a file path for supporting files > (graphics, etc) that are stored inside the package. The problem is that > the superclass's definition (stored elsewhere) has all of the code for > actually opening the files, so when I use the > os.path.dirn

Re: opening a file using a relative path from a subclass in a package

2005-12-07 Thread Heiko Wundram
spike grobstein wrote: > so, since python supports module packages like it does, you'd think > that it would have ways of making add-on or extension modules to be > more self contained. Errm... You're not quite understanding what the problem is about. A class is just an object. A class object may

Re: calculate system disk space

2005-12-09 Thread Heiko Wundram
PyPK wrote: > I am looking for unix.the recipe is windows specific!! Parse the output of du/df? :-) I guess that would be simplest... ;-) Otherwise, use some combination of os.walk() and os.stat(), whereby you _don't_ use the stat.st_size field to get the file size (on disk) but rather use stat.s

Re: Properties transfer between instances of different classes, without subclassing

2005-12-10 Thread Heiko Wundram
Pierre wrote: > Ideally, 'tabv.cold' would give me 'tabv', masked where the values are > <10. > I don't want to make 'Tabl' a subclass of 'Temp'. I'd like to use it > more generically, so that when I define a 3rd class 'Color', I could > initiate 'Tabv' with an instance of 'Color', accessing the 'C

Re: Need help

2005-03-01 Thread Heiko Wundram
Am Dienstag, 1. März 2005 21:53 schrieb brian: > They tell me the error is Recv Timed Out. This sounds like a socket level (TCP/IP stack) error, which might be caused by a malfunctioning gateway or network device (likely), an error in the operating system or network device driver they use (unlik

Re: Communication between python scripts

2005-03-01 Thread Heiko Wundram
Am Dienstag, 1. März 2005 21:54 schrieb Chris: > Is there a preferred method for having different scripts on different > computers communicate with each other? You have several options at your disposal. 1) Use mail-communication (like you said, a combination of smtplib and poplib/imaplib), 2) h

Re: Help- Simple recursive function to build a list - Sorry for all the noise!

2005-03-01 Thread Heiko Wundram
On Wednesday 02 March 2005 06:03, actuary77 wrote: > It now makes sense if I write it, (simple): > > def rec2(n): > if n == 0: > return [] > else: > return [n] + rec2(n-1) Or, if you're not interested in a recursive function to do this job (which should be way faster..

Re: Using for... for multiple lists

2005-03-06 Thread Heiko Wundram
On Sunday 06 March 2005 13:09, Harlin Seritt wrote: > for i, f in filelist, self.checkbox: >if f.get(): > print i Use: for i, f in zip(filelist,self.checkbox): -- --- Heiko. pgpuQ4Xv4IUj6.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to import a module whose name is contained in a variable?

2005-03-07 Thread Heiko Wundram
On Monday 07 March 2005 11:52, Claudio Grondi wrote: > I try to avoid using any of the > ____() functions if possible > (considering this a good > programming style). This is never good style, at least in the case of exec. exec is evil. What works (beware that the below code is nevertheless u

Re: GOTO (was Re: Appeal for python developers)

2005-03-07 Thread Heiko Wundram
On Sunday 06 March 2005 14:26, Anthra Norell wrote: > Wow, I never thought I'd say this, but this certainly is an ingenious use of goto... But, nevertheless, I don't think this is applicable to Python as a way of justifying goto in the language, as your program doesn't have a split between abs

Re: re - Question about pyFMOD importing

2005-03-07 Thread Heiko Wundram
On Tuesday 08 March 2005 12:38, lior botzer wrote: > Were you able to hack this one ? I haven't seen this error in a long time (as I'm no Windows user for a long time), but from what I gather the only thing that the specified error was telling you is the fact that the dynamic linking library tha

Re: os.system()

2005-03-07 Thread Heiko Wundram
On Monday 07 March 2005 14:10, Diez B. Roggisch wrote: > Showing us what commands actually fail would certainly help. Actually, this sounds like the subshell isn't getting an alias that the normal interactive shell has. Maybe because ~/.bashrc isn't read on os.system(), or something of the like?

Re: os.system()

2005-03-07 Thread Heiko Wundram
On Monday 07 March 2005 14:24, Joerg Schuster wrote: > Well, I can give you the string, but that will not help: > > transduce abc info_dic comp_dic input_file output_file Several variables like PATH "normally" get reset even when running a non-login subshell to the standard values from /etc/profi

Re: shuffle the lines of a large file

2005-03-07 Thread Heiko Wundram
On Monday 07 March 2005 14:36, Joerg Schuster wrote: > Any ideas? The following program should do the trick (filenames are hardcoded, look at top of file): ### shuffle.py import random import shelve # Open external files needed for data storage. lines = open("test.dat","r") lineindex = shelve.

Re: shuffle the lines of a large file

2005-03-07 Thread Heiko Wundram
Replying to oneself is bad, but although the program works, I never intended to use a shelve to store the data. Better to use anydbm. So, just replace: import shelve by import anydbm and lineindex = shelve.open("test.idx") by lineindex = anydbm.open("test.idx","c") Keep the rest as is.

Re: determine directories with wildcard

2005-03-08 Thread Heiko Wundram
On Tuesday 08 March 2005 14:33, Thomas Rademacher wrote: > How can I resolve this problem? python >>> import glob >>> help(glob) or look at the online documentation for glob. -- --- Heiko. pgp6MyvJSQxu3.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Split text file into words

2005-03-08 Thread Heiko Wundram
On Tuesday 08 March 2005 14:43, qwweeeit wrote: > The standard split() can use only one delimiter. To split a text file > into words you need multiple delimiters like blank, punctuation, math > signs (+-*/), parenteses and so on. > > I didn't succeeded in using re.split()... Then try again... ;)

Re: shuffle the lines of a large file

2005-03-08 Thread Heiko Wundram
On Tuesday 08 March 2005 15:28, Simon Brunning wrote: > This has the advantage that every line had the same chance of being > picked regardless of its length. There is the chance that it'll pick > the same line more than once, though. Problem being: if the file the OP is talking about really is 80

Re: shuffle the lines of a large file

2005-03-10 Thread Heiko Wundram
On Tuesday 08 March 2005 15:55, Simon Brunning wrote: > Ah, but that's the clever bit; it *doesn't* store the whole list - > only the selected lines. But that means that it'll only read several lines from the file, never do a shuffle of the whole file content... When you'd want to shuffle the fil

Re: newbie:unique problem

2005-03-17 Thread Heiko Wundram
On Thursday 17 March 2005 20:08, Leeds, Mark wrote: > But, I also want it to get rid of the AAA KP because > there are two AAA's even though the last two letters > are different. It doesn't matter to me which one > is gotten rid of but I don't know how to change > the function to handle this ? I ha

Re: newbie:unique problem

2005-03-17 Thread Heiko Wundram
On Thursday 17 March 2005 23:31, Brian van den Broek wrote: > Am I not > right in thinking that with the dict approach there is no guarantee > that the order from the original list will be preserved? Yup, absolutely right that the original ordering will not be preserved. But, I wonder whether thi

Re: For loop extended syntax

2005-03-20 Thread Heiko Wundram
On Sunday 20 March 2005 20:47, George Sakkis wrote: > Not always. Say for example that you're doing some 2D geometry stuff, and > later you have to extend it to 3D. In this case you may have to deal with > both 2D and 3D objects, and map the former to the latter when necessary. But this rather sou

Re: simultaneous copy to multiple media

2005-03-20 Thread Heiko Wundram
On Sunday 20 March 2005 17:16, Claudio Grondi wrote: > Is there maybe a way to use a direct DMA > transfer to multiple target destinations > (I copy to drives connected via USB ports) ? Think about what USB stands for. Then reconsider whether you'll ever have the chance of writing truly simultane

Re: For loop extended syntax

2005-03-20 Thread Heiko Wundram
Am Sonntag, 20. März 2005 22:22 schrieb George Sakkis: > Once more, the 2D/3D example was just that, an example; my point was not to > find a specific solution to a specific problem. And my point being: it's simple enough to give a general recipe (which my example was) without extending Python's

Re: simultaneous copy to multiple media

2005-03-20 Thread Heiko Wundram
Am Sonntag, 20. März 2005 23:16 schrieb Claudio Grondi: > 2) if I understand it right, an USB controller is connected to > to the PCI bus and there can be many separate USB > controller on one PC Yes, there may be more than one USB-controller in a PC, but this doesn't matter, they are all connect

Re: winapi32.GetFileVersionInfo() - problem

2005-03-25 Thread Heiko Wundram
> Do you actually think anybody will reply to your mail if you keep reposting at this frequency? It'll rather make most people here kill-file you. One post is enough; we've seen your problem, and it seems as though nobody here has a better solution than what Dennis Lee Bieber has already offer

Re: mysteriously nonfunctioning script - very simple

2005-03-26 Thread Heiko Wundram
Am Samstag, 26. März 2005 19:47 schrieb Sean McIlroy: > Why not try the following: >>> import datetime >>> x = datetime.datetime.now() >>> x datetime.datetime(2005, 3, 26, 21, 48, 13, 495765) >>> y = datetime.datetime(2005,3,26,21,50) # Wake me up today at 21:50 >>> y datetime.datetime(2005, 3,

Re: Embedding Python

2005-03-26 Thread Heiko Wundram
Am Samstag, 26. März 2005 20:43 schrieb Mark Tolonen: > On my system, for whatever reason, the .so library isn't present. I have > the python-devel package installed. I actually can't believe this; do ldconfig -p|grep "python" as root and look for any output. And remember that the shared librar

Re: Embedding Python

2005-03-26 Thread Heiko Wundram
Am Samstag, 26. März 2005 21:36 schrieb Mark Tolonen: > I also (before I originally posted) did a "find / -name libpython*" with no > success. Looks like Redhat 9 ships with a statically linked version of > python. Hmm... Sorry to have thought otherwise... RedHat is braindead. :-) -- --- Heiko.

Re: How to use "__new__"?

2005-03-29 Thread Heiko Wundram
Am Mittwoch, 30. März 2005 03:27 schrieb could ildg: > Thank you. > I'm clear after I read the doc: > If __new__() returns an instance of cls, then the new instance's > __init__() method will be invoked like "__init__(self[, ...])", where > self is the new instance and the remaining arguments are t

Re: How to use "__new__"?

2005-03-29 Thread Heiko Wundram
Am Mittwoch, 30. März 2005 04:36 schrieb Heiko Wundram: > You could extend the above example quite easily to deal with deallocation > (a reference to each created singleton is retained using the above class, > always, as long as the program is running) and also to make it threadsaf

Re: Simple thread-safe counter?

2005-04-02 Thread Heiko Wundram
Am Samstag, 2. April 2005 22:28 schrieb Paul Rubin: > I'm starting to believe the GIL covers up an awful lot of sloppiness > in Python. I wonder if there could be a decorator approach: > > @synchronized > def counter(): >t = itertools.count() >while True: > yield t

Re: Simple thread-safe counter?

2005-04-02 Thread Heiko Wundram
Am Sonntag, 3. April 2005 00:57 schrieb Heiko Wundram: > > or Make that: create_counter = syncronized_iterator(itertools.count) and counter = create_counter() to create the actual counter regardless of iterator. -- --- Heiko. pgpuQ5CRv1IKe.pgp Description: PGP signature --

Python Cookbook

2005-04-03 Thread Heiko Wundram
Hi all! I've received my copy of the Python Cookbook two days ago, and just thought that I might independently commend all you editors and recipe designers out there to an excellent book! I've thoroughly enjoyed reading the introductions in each chapter, and although I've been programming in Py

Re: Raise Error in a Module and Try/Except in a different Module

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 12:11 schrieb Issa-Ahmed SIDIBE: Try: > import ModuleA > ... > class(): >... >try: a = ModuleA.FUNC1() ^^ <-- Actually call the method. >except ModuleA.EXCP1: print 'catch' HTH! -- --- Heiko. see you at: http://www.stud.mh-hann

Re: import and scope inconsistency?

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 12:23 schrieb Jim: > I can call MyFiles methods inside methods of the Brances classes. > I cannot call Numeric methods inside methods of the Brances classes. > > 1. I was surprised I could call MyFiles methods in Branches methods. > 2. Since I was used to using modules impo

Re: import and scope inconsistency?

2005-04-04 Thread Heiko Wundram
You're putting a Reply-To header in your posts to the mailing-list, but the Reply-To address bounces. Please correct: on't put in a Reply-To header, or at least put in some address that doesn't bounce. -- --- Heiko. listening to: aenima_15_Third Eye.mp3 see you at: http://www.stud.mh-hannove

Re: boolean -> DNF

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 15:08 schrieb Alex Polite: > I'd like to skip BoolStuff and do it all in python but I have no idea > where to start. Anyone out there with a PhD in computer science that > can give me a starting point? I once wrote a library which implemented parsing boolean expressions (w

Re: setup distributed computing for two computer only

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 21:27 schrieb [EMAIL PROTECTED]: > Google for: Python Remote Objects or Python XMLRPC -- --- Heiko. listening to: Nine Inch Nails - The Downward Spiral see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/ pgpbsPKhjKOEY.pgp Description: PGP signature --

Re: help with python-devel!!!

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 20:54 schrieb John Ridley: > The OP mentioned that urpmi couldn't find a package by that name. So it > might be worth querying for "libpython" if that fails: This is why why I don't use a binary distribution... :-) (Differences in) Naming makes getting at devel-packages a

Re: Changing TEXT color from python

2005-04-04 Thread Heiko Wundram
Am Montag, 4. April 2005 21:59 schrieb GujuBoy: > how can i do this...and hopefully without including any external > modules. It depends. Under *NIX, have a look at the curses module. Under Windows, Google for ANSI.SYS and read up on Escape Sequences, or check out the curses for Windows impleme

Re: setup distributed computing for two computer only

2005-04-05 Thread Heiko Wundram
Am Dienstag, 5. April 2005 11:22 schrieb Irmen de Jong: > > Python Remote Objects > > ^^^ what Heiko said :) *biggrin* -- --- Heiko. listening to: Tool - Lateralus - 1 The Grudge.mp3 see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/ pgpKv3ALoPbZi.pgp Description: PGP signature

Python backend binding to PAM, NSS or pppd

2005-04-06 Thread Heiko Wundram
Hey all! Before I start hacking away, I'm looking for a Python backend binding for libpam or libnss, or a python binding for the pppd plugin mechanism. I'm trying to set up an SQL authentication scheme for virtual user accounts used for mail and PPTP-VPN-access, and I'd love to do the authentic

Re: How to check whether a list have specific value exist or not?

2005-04-09 Thread Heiko Wundram
Am Samstag, 9. April 2005 11:37 schrieb Michael Spencer: > praba kar wrote: > > I want to check a list have specific > > value or not. So If any one know regarding this > > mail me > A minute of two experimenting, would then lead you to: > >>> l = [1,2,3,4,5] > >>> l.index(3) > > 2 Or, if it

Re: change the date string into timestamp

2005-04-09 Thread Heiko Wundram
Am Samstag, 9. April 2005 11:38 schrieb praba kar: > In Php strtotime() will change a date > string into timestamp. I want to know which > python function will change a date string > into timestamp. You want the standard library function strptime from the time module (in case it's a timesta

Re: change the date string into timestamp

2005-04-09 Thread Heiko Wundram
Am Samstag, 9. April 2005 12:10 schrieb Fredrik Lundh: > >>> from email.Utils import parsedate_tz > >>> parsedate_tz(formatdate(x, localtime=1)) > > (2005, 4, 8, 14, 22, 14, 0, 1, 0, 7200) Very cool! Learning something new every day! -- --- Heiko. listening to: Pearl Jam - Dissident see you at

Re: question about functions

2005-04-14 Thread Heiko Wundram
Am Freitag, 15. April 2005 06:44 schrieb chris patton: > In other words, can I call the arguments from a list? Yes. >>> def testfunc(*args): ... print args[0] ... print args[1] ... >>> testfunc("this is","a test") this is a test Read up on positional and keyword arguments (the latter are som

Re: Writing to log file when script is killed

2005-04-30 Thread Heiko Wundram
Am Samstag, 30. April 2005 14:26 schrieb [EMAIL PROTECTED]: > If you run on unix you can use the signal module to intercept a kill - > see http://docs.python.org/lib/node368.html for a quick example You cannot intercept a kill (that's the whole meaning of SIGKILL, rather than SIGTERM)... Read up

Re: Cannot form correctly the FORM part of the header when sending mail

2013-09-04 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 03.09.2013 09:48, schrieb Ferrous Cranus: > Si there a workaround for that please? Yes, use/setup your own mailserver. Google will not allow you to send as ("i.e., From:") an arbitrary address besides the one you've authenticated as. - -- - --- H

Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 16.09.2013 13:21, schrieb Denis McMahon: > If he's trying to prove communication works, he might be better off > using a message subject of "test" and a message body of "this is a > test message". Generally, he might be best off if he didn't use os

Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 16.09.2013 13:37, schrieb Ferrous Cranus: > What i want now is to be able to alter the hostname of my server so > the mails wont indicate that they derive from superhost.gr as they > aare now sen in the mail headers. There is no way to do that, as

Re: Tryign to send mail via a python script by using the local MTA

2013-09-16 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 16.09.2013 14:11, schrieb Ferrous Cranus: > But even so, if we alter for example the hostname of our server to > a different name then wouldn't Google use that to identify the > server thus protecting the real identity(hostname that is) of the > ser

Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 17.09.2013 01:41, schrieb Steven D'Aprano: > I cannot fathom for the life of me a legitimate reason for your > website to use a fake IP address and hostname when sending email. In addition to that: it's amazing that Nikos thinks TCP will still work

Re: Tryign to send mail via a python script by using the local MTA

2013-09-17 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 17.09.2013 13:55, schrieb Joel Goldstick: > At least if you want to add to this nonsense, read each of the > (several?) dozen entries. Actually, I have read each of the troll cycles (just as I read much of clp, although I haven't participated much

Re: Having both if() and for() statements in one liner

2013-09-17 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 17.09.2013 15:21, schrieb Ferrous Cranus: > ... there must be written on soem way. You've already given yourself the answer in the initial post. The Python way to write this is: if person == "George": for times in range(5): ... Why no

Re: I haev fixed it

2013-10-01 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 13:06, schrieb Νίκος: > But it seems you don't want to provide an explanation although i > think you might have a theory. You need a theory? 1) Your password(s) is/are leaked (see the URL referenced somewhere before, and IIRC you also p

Re: I haev fixed it

2013-10-01 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.10.2013 14:06, schrieb Νίκος: > i know about the link you mentioned and i have deleted the source > code from there. Guess what: Google keeps a cache. See here: http://webcache.googleusercontent.com/search?q=cache:http://superhost.gr/~dauwin/cg

Re: JUST GOT HACKED

2013-10-02 Thread Heiko Wundram
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 02.10.2013 13:03, schrieb Νίκος: > I have to make some money and that needs for some reason to happen > now as we speak, so i have no alternative than to hop into a car > and learn to drive during the process, hoping i will not bang-smash > the car.

Re: SSE4a with ctypes in python? (gcc __builtin_popcount)

2011-10-31 Thread Heiko Wundram
Am 31.10.2011 04:13, schrieb est: Is it possible to rewrite the above gcc code in python using ctypes (preferably Win/*nix compatible)? No; the (gcc-injected) functions starting with __builtin_* are not "real" functions in the sense that they can be called by calling into a library, but rathe

Re: Misleading error message of the day

2011-12-08 Thread Heiko Wundram
Am 08.12.2011 15:47, schrieb Robert Kern: Would including the respective numbers help your thought processes? ValueError: too many values to unpack (expected 2, got 3) Not possible in the general case (as the right-hand side might be an arbitrary iterable/iterator...). -- --- Heiko. -- http:

Re: Misleading error message of the day

2011-12-08 Thread Heiko Wundram
Am 08.12.2011 16:42, schrieb Roy Smith: The exception was raised when i() returned it's third value, so saying "expected 2, got 3" is exactly correct. Yes, it is true that it might have gotten more if it kept going, but that's immaterial; the fact that it got to 3 is what caused the Holy Hand

Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Heiko Wundram
Am 02.01.2012 14:25, schrieb Νικόλαος Κούρας: On 23 Δεκ 2011, 19:14, Νικόλαος Κούρας wrote: I dont know why this line host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] fails sometimes and some other times works ok retrieving the hostnames correctly. Please i need some help. My webpa

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Heiko Wundram
Am 03.01.2012 02:19, schrieb Adam Skutt: On Jan 2, 6:09 pm, Jérôme wrote: What is the clean way to avoid this race condition ? The fundamental race condition cannot be removed nor avoided. Ideally, avoid the need to send the subprocess a signal in the first place. If it cannot be avoided, th

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Heiko Wundram
Am 03.01.2012 14:40, schrieb Adam Skutt: On Jan 3, 7:31 am, Heiko Wundram wrote: Yes, it can be avoided, that's what the default SIGCHLD-handling (keeping the process as a zombie until it's explicitly collected by a wait*()) is for, which forces the PID not to be reused by the operat

Re: Hash stability

2012-01-14 Thread Heiko Wundram
Am 14.01.2012 10:46, schrieb Peter Otten: Steven D'Aprano wrote: How many people rely on hash(some_string) being stable across Python versions? Does anyone have code that will be broken if the string hashing algorithm changes? Nobody who understands the question ;) Erm, not exactly true. The

  1   2   3   >