On Jun 19, 10:50 pm, Stefan Sonnenberg-Carstens
<[EMAIL PROTECTED]> wrote:
> billiejoex schrieb:
> > ...(if it is possible) how can I get, from method "called", the name
> > of function/method that called it (in this case "caller")?
> inspect.stack is your friend ;-)
If you start doing such thing
Hei,
On 2006-10-30 08:25:41 +0100, thebjorn wrote:
> def unfk(s):
> return eval(repr(s)[1:]).decode('utf-8')
>
> i.e. chopping off the u in the repr of a unicode string, and relying on
> eval to interpret the \xHH sequences.
>
> Is there a less hack'ish way to do this?
Slightly lack hac
On 2006-10-21 20:41:42 +0200, Scott M. wrote:
> Also, widely posting your real (unaltered) email address in forums like this
> is a sure way to get noticed by spammers.
This newsgroup is mirrored by a mailing-list, so many people use their real
address. The solution to spam is spamfiltering (spam
On 2006-10-18 14:15:17 +0200, Sssasss wrote:
> Fredrik Lundh wrote:
> > "Sssasss" wrote:
> >
> > > I wan't to multiply two square matrixes, and i don't understand why it
> > > doesn't work.
> > >
> > > def multmat(A,B):
> > >"A*B"
> > >if len(A)!=len(B): return "error"
> > >D=[]
> > >
On 2006-10-13 16:31:37 +0200, Ahmer wrote:
> Subject: Best IDE?
cat > foo.py
> How much does it cost?
0
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-10-11 00:26:38 +0200, Dr. Pastor wrote:
> I would like to track the motions of
> small birds in short (20-30sec) .avi films.
> What tool-set/programs would be wise to use?
> Thanks for any guidance.
I'd use PIL with numpy and subtract a birdless background picture
from each picture. Make t
On 2006-10-10 14:35:30 +0200, [EMAIL PROTECTED] wrote:
> Hi folks, I've got a question for yas. I'm trying to write code that
> will open up a gzipped tar file using gnutar, and copy the list of
> files(including their directories) to a list variable in python. From
> there, I want to go through
On 2006-10-09 14:45:35 +0200, rick wrote:
> import os.path
>
> paths = []
>
> if os.path.isdir('A:/'):
> paths.append('A:/')
>
> if os.path.isdir('B:/'):
> paths.append('B:/')
>
> ...
>
> That's a kludge, but it works OK. I'm sure WMI may have a function that
> returns mounted volumes
On 2006-10-06 04:50:33 +0200, [EMAIL PROTECTED] wrote:
> say i have variables like these
>
> var1 = "blah"
> var2 = "blahblah"
> var3 = "blahblahblah"
> var4 = ""
> var5 = "..."..
>
> bcos all the variable names start with "var", is there a way to
> conveniently print those variables out...
>
On 2006-10-04 05:10:32 +0200, John Machin wrote:
> > - str methods endswith, find, partition, replace, split(lines),
> > startswith,
> > - Regular expressions
> >
> > I think those can be useful on a bytes type. Perhaps bytes and str could
> > share a common parent class? They certain
on parent class? They certainly share a lot of properties
and possible operations one might want to perform.
kind regards,
Gerrit Holl.
--
My first English-language post ever was made to this newsgroup:
http://groups.google.com/group/comp.lang.python/msg/f957acf785ddfb71 :)
--
http://mail.pyt
could ildg wrote:
>
> b = encrypt(a)
>
> Thank you~~,but where is the encrypt defined?
>
I suppose it's left as an exercise for the reader.
Gerrit.
--
Temperature in Kiruna, Lappland, Sweden:
Tue Nov 1 15:35:25 2005 [UT] 2.6°C
--
http://mail.python.org/mailman/listi
Finn Waldrip wrote:
> X-Spambayes-Classification: unsure; 0.242
>
>
> 404 Not Found
>
> Not Found
> The requested URL was not found on this server.
>
> Apache/1.3.31
>
How can my poor Spambayes ever make sense of this?
Gerrit.
--
Temperature in Luleå, Norrbotten, Sweden:
| Current tempera
Michael Schneider wrote:
> Could someone please point out my error, I have dents in my forehead
> for this one.
> --
>
> from unittest import TestCase
> import unittest
Here you need to add:
__metaclass__ = type
this will make you
Ben wrote:
> Could anyone suggest an open source project that has particularly well
> written Python? I am especially looking for code that people would
> describe as "very Python-ic". (Not trying to start any kind of war -
> just wanted some good examples of a well written Python app to read.)
Laszlo Zsolt Nagy wrote:
> >Oh man, it has been a long time I have read such an disturbing question.
> >
> >RTMF here: http://docs.python.org/lib/built-in-funcs.html#l2h-14
> >
> >
> I feel I was a bit harsh.
Of course, those posts do keep the Google count for the famous
four-letter-abbreviatio
Tony Meyer wrote:
> X-Spambayes-Classification: ham; 0.008
>
> On 30/09/2005, at 10:56 PM, Gerrit Holl wrote:
> > Tony Meyer wrote:
> >> X-Spambayes-Classification: ham; 0.048
>
> Unless I'm misreading things, that's *my* message that scored 0.048
> (
Tony Meyer wrote:
> X-Spambayes-Classification: ham; 0.048
> X-Spambayes-Evidence: '*H*': 0.90; '*S*': 0.00; 'bug.': 0.07; 'flagged':
> 0.07;
> "i'd": 0.08; 'bayes': 0.09; 'from:addr:ihug.co.nz': 0.09;
> 'really,': 0.09; 'cc:no real name:2**0': 0.14;
> 'from:addr:t-meyer': 0.16;
Xah Lee wrote:
> ...What the fuck is the former?
> ...What the fuck would anyone to
> ...]”, is rather inane, as you can now see.
>
> ...What the fuck does it mean...
> ...you begin to write things like Java...
Can you please alter the tone of your voice?
Gerrit.
--
Temperature in Luleå, Norrb
Paul McNett wrote:
> > Whatever is preferred, what's the upside/downsides of the two beyond
> > what I just explained?
>
> Nothing really, but something handy to keep in mind is that the string
> literal ("""x""") can be used to block out huge sections of code during
> testing, where you'd have to
Diez B. Roggisch wrote:
> > What is the reason for allowing both styles? (backwards compatibility??)
>
> yes.
Note that there is another way to create new-style classes:
__metaclass__ = type
before the first class definition:
>>> class Foo: pass
...
>>> type(Foo)
>>> __metaclass__ = type
>>>
Hi,
I have once seen a variant of "national brotherhood week" with
programming languages; 'all the python folk hate alle the perl folk and
all the ... hate all the ... and everybody hates Java', or something
like that, but I can't find it anymore. Does anyone remember it and is
anyone able to find
Martijn Iseger wrote:
> Domain-specific modeling makes software development 5-10 times faster than
> approaches based on UML or MDA.
> It accelerates development and reduces complexity by automatically generating
> full code from higher-abstraction design models.
> Learn from speakers Juha-Pekka
sven wrote:
> i'd like to define __repr__ in a class to return the standardrepr
> a la "<__main__.A instance at 0x015B3DA0>"
> plus additional information.
> how would i have to do that?
> how to get the standardrepr after i've defined __repr__?
>>> object.__repr__(4)
''
Gerrit.
--
Temperature
Kenneth McDonald wrote:
> Subject: pre-PEP: Object-oriented file module
Please have a look at
http://topjaklont.student.utwente.nl/creaties/path/pep-.html
if you haven't done so already.
Gerrit.
--
Temperature in Luleå, Norrbotten, Sweden:
| Current temperature 05-08-27 22:20:00 11.8 de
Ivan Van Laningham wrote:
> Richie Hindle wrote:
> >
> > [Xah]
> > > motherfucking ... fucking ... fucking ... fucking ... fuck ... fucking
> > > fucking ... fucking ... mother fucking ... fucking ... piece of shit ...
> > > motherfucking ... fucking ... fucking ... big asshole ... masturbation ..
This is a SyntaxError.
You want to enclose the dots with '' marks as well, like this:
'@'.join(['.'.join(['fred', 'dixon']), '.'.join(['gmail', 'com'])])
regards,
Gerrit Holl.
--
Weather in Twenthe, Netherlands 29/03 10
>
>
> Dear Rubyists, Perlists, Shellists, Cists and Hackers,
What is this doing on comp.lang.python?
regards,
Gerrit Holl.
--
Weather in Twenthe, Netherlands 20/03 16:55:
9.0ÂC wind 4.0 m/s ENE (57 m above NAP)
--
In the councils of government, we must guard against the acqui
Jeff Schwab wrote:
> sheldon279 wrote:
> Wow, you sold me.
>
> Does this kinda scam really still work?
This kind of replies works to confuse spambayes.
Gerrit.
--
Weather in Twenthe, Netherlands 20/03 16:55:
9.0ÂC wind 4.0 m/s ENE (57 m above NAP)
--
In the councils of government,
Ed Leafe wrote:
> On Mar 7, 2005, at 5:23 AM, Michael Hoffman wrote:
> >Avoiding exec (which is a statement, not a function) is much more
> >important. Since it executes arbitrary code, you can get unpredictable
> >results from it.
>
> Is there any way to use __import__ to replace the follow
Chris S. wrote:
> Is it possible to determine how much memory is allocated by an arbitrary
> Python object? There doesn't seem to be anything in the docs about this,
> but considering that Python manages memory allocation, why would such a
> module be more difficult to design than say, the GC?
31 matches
Mail list logo