#x27;m aware of re.split, but
that's not the point; this is just an example. Besides re.split returns
a list, not an iterator]
George
--
http://mail.python.org/mailman/listinfo/python-list
ls. Has anybody got a couple of longer examples using
> Beautiful Soup I could play around with?
>
> Thanks,
> Martin.
from BeautifulSoup import BeautifulSoup
urls = [tag['href'] for tag in
BeautifulSoup(open('bookmarks.html')).findAll('a')]
Regards,
George
--
http://mail.python.org/mailman/listinfo/python-list
Francach wrote:
> George Sakkis wrote:
> > Francach wrote:
> > > Hi,
> > >
> > > I'm trying to use the Beautiful Soup package to parse through the
> > > "bookmarks.html" file which Firefox exports all your bookmarks into.
> > >
Paddy wrote:
> George Sakkis wrote:
> > It's always striked me as odd that you can express negation of a single
> > character in regexps, but not any more complex expression. Is there a
> > general way around this shortcoming ? Here's an example to illustrate a
>
Francach wrote:
> Hi George,
>
> Firefox lets you group the bookmarks along with other information into
> directories and sub-directories. Firefox uses header tags for this
> purpose. I'd like to get this grouping information out aswell.
>
> Regards,
> Martin.
Her
ne reasons (complexity,portability,performance), so you'd better not
go down this road.
George
--
http://mail.python.org/mailman/listinfo/python-list
oripel wrote:
> Thanks Paddy - you're showing normal use of function attributes.
> They're still hidden when wrapped by an uncooperative decorator.
The decorator module may be helpful in defining cooperative decorators:
http://www.phyast.pitt.edu/~micheles/python/documentat
> def MyRoutine():
> global var
> var = 1
>
> MyRoutine()
> print var
>
>
> # --- Module 2.py
> # 'Self' module processing
> import sys
> var = 0
> self = sys.modules[__name__]
>
> def MyRoutine():
> self.var = 1
>
> MyRoutine()
> print var
What's wrong with
def MyRoutine():
return 1
var = MyRoutine()
?
George
--
http://mail.python.org/mailman/listinfo/python-list
m__
> self = modproxy()
> def call_with_module(*args,**kwargs):
> return func(self,*args,**kwargs)
> call_with_module.func_name = func.func_name
> return call_with_module
>
> @modmethod
> def MyRoutine(self):
> self.var = 1
>
> MyRoutine()
> print var
This looks quite hackish, both the implementation and the usage; most
people would get confused when they didn't find var's assignment at
global scope. I prefer the the simple global statements if they aren't
that many, otherwise the assignment of the module to self is also fine.
George
--
http://mail.python.org/mailman/listinfo/python-list
u5)]
Python2.5: 2.5c1 (r25c1:51305, Aug 18 2006, 19:18:03) [GCC 4.0.3
(Ubuntu 4.0.3-1ubuntu5)]
IronPython: 1.0.2444 on .NET 2.0.50727.42
Mono JIT compiler version 1.1.17
TLS: normal
GC:Included Boehm (with typed GC)
SIGSEGV: normal
Disabled: none
George
--
http://mail.python.org/mailman/listinfo/python-list
file ? The
replies so far seem to imply so and in this case I doubt that you can
do anything more efficient. OTOH, if the same file is to be searched
repeatedly for different strings, an appropriate indexing scheme can
speed things up considerably on average.
George
--
http://mail.python.org/mailman/listinfo/python-list
cription it's not really clear what's going on. Also, please
post working code; the snippets you posted were out of context (what is
row?) and not always correct syntactically (split_line(2:4)).
George
--
http://mail.python.org/mailman/listinfo/python-list
space between *every* operator in
expressions, group them based on precedence. E.g. instead of "(n *
sigmaSq - sigma * sigma) / (n * n)", I read it easier as "(n*sigmaSq -
sigma*sigma) / (n*n).
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
n't tell in advance what "x[0] = 2" will do
without knowing the type of x. A binding OTOH like "x=2" has always the
same semantics: make the name "x" refer to the object "2".
Similarly to "x[0] = 2", something like "x.foo = 2" looks like an
assignment but it's again syntactic sugar for a (different) method
call: x.__setattr__('foo',2). All the above about __setitem__ hold for
__setattr__ too.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
quest the certain data need. Does anyone
> know how to do this? I would really appreciate it. Thanks.
This will get you started:
http://www.crummy.com/software/BeautifulSoup/
George
--
http://mail.python.org/mailman/listinfo/python-list
st dots going across the screen would be better
> than nothing.
>
> Does anyone have an example on how to show the progress of the
> upload/download when using ftputil?
You'll probably have more luck asking at
http://codespeak.net/mailman/listinfo/ftputil.
George
--
http://mail.python.org/mailman/listinfo/python-list
es each covering 1/4*R with zero overlap ?
George
--
http://mail.python.org/mailman/listinfo/python-list
sired
property: the intersections of the subsets should be as small as
possible, or in other words the subsets should be as distinct as
possible.
George
--
http://mail.python.org/mailman/listinfo/python-list
t = StringIO(text)
for line in text:
# do something
George
--
http://mail.python.org/mailman/listinfo/python-list
Michael wrote:
> Robert,
>
> Thanks to you and everyone else for the help. The "s.split('\x00',
> 1)[0] " solved the problem.
And a probably faster version: s[:s.index('\x00')]
George
--
http://mail.python.org/mailman/listinfo/python-list
in izip(*columns):
> print row
>
> Now that is a nice occasion to get acquainted with the itertools module...
Wow, that's the most comprehensive example of itertools (ab)use I have
seen! Awesome!
George
--
http://mail.python.org/mailman/listinfo/python-list
)
>
> should turn into
>
> a = ( 1, 2, 3, None, None )
> b = ( 10, 20, None, None, None )
> c = ( 'x', 'y', 'z', 'e', 'f' )
>
> Of course with some len( ) calls and loops this can be solved but
> something tells me t
Calvin Spealman wrote:
> Just once, I would like to see a programming contest that was judged
> on the quality of your code, not the number of bytes you managed to
> incomprehensively hack it down to.
Unfortunately, quality is not as easy to judge as number of bytes. Such
contest would be as craz
les/python/path/). Your example could
be rewritten simply as:
from path import path
for html_file in path(start_dir).walkfiles('*.html'):
print 'html file found!'
George
--
http://mail.python.org/mailman/listinfo/python-list
e:
# default object msg
If you insist though that you'd rather not use functions but only
methods, tough luck; you're better off with Ruby.
George
--
http://mail.python.org/mailman/listinfo/python-list
the syntax to do that. (not asking anyone to write my
> code, just looking for a pointer)
>
> Thanks
Hint: dict.get() takes an optional second argument.
George
PS: To make a new thread, don't hit "reply" on an existing thread and
change the subject. Just make a new thread.. duh.
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
> I must definitively be dumb, but so far I fail to see how it's better
> than split and rsplit:
I fail to see it too. What's the point of returning the separator since
the caller passes it anyway* ?
George
* unless the separator can be a regex, but
ample code before typing this python-like pseudocode ?
George
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I am a bit perplexed by the following behaviour of the 'is' comparator
>>> x = 2.
>>> x is 2.
False
>>> y = [2., 2.]
>>> y[0] is y[1]
True
My understanding was that every literal is a constructure of an object.
Thus, the '2.' in 'x = 2.' and the '2.' in 'x is 2.' are different objects.
robin wrote:
> "George Sakkis" <[EMAIL PROTECTED]> wrote:
>
> >Here's what I came up with:
> >http://rafb.net/paste/results/G91EAo70.html. Tested only on my
> >bookmarks; see if it works for you.
>
> That URL is dead. Got another?
Yeap, try this
7;s not just me that thinks this
way.
Best,
George
--
http://mail.python.org/mailman/listinfo/python-list
relevant extract
from the main page:
You may either hardcode the urls of the css files, or parse the page,
extract the css links and normalize them to absolute urls. The first is
simpler but the second is more robust, in case a new css is added or an
existing one is renamed or remov
Lawrence D'Oliveiro wrote:
> Fredrik Lundh wrote:
> > you're not the designer...
>
> I don't have to be. Whoever the designer was, they had not properly thought
> through the uses of this function. That's quite obvious already, to anybody
> who works with HTML a lot. So the function is broken and
x27;t really qualify, for any
reasonable definition of "senior".
George
--
http://mail.python.org/mailman/listinfo/python-list
ties.
Or, if you're comfortable studying on your own, you could start with a
book or two that focus on software design and architecture, rather than
language details and small programming recipes. I can't think of any
specific title to suggest off the top of my head but I'm sure you'll
get some good suggestions from others if you ask here.
George
--
http://mail.python.org/mailman/listinfo/python-list
n, not attached to a specific class:
from inspect import getmembers, ismethod
def listMethods(obj):
d = obj.__class__.__dict__
return [name for name,_ in getmembers(obj,ismethod) if name in d]
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> George Sakkis wrote:
> [...]
> > I'd rather have it as a function, not attached to a specific class:
> >
>
> Thanks a lot George, that was what I was looking for. Got to
> understand/appreciate inspect more.
> Of course it works as a
erable)
while True:
window = tuple(islice(it,size))
if not window:
break
yield window
George
--
http://mail.python.org/mailman/listinfo/python-list
t; return izip(*[chain(iterable, repeat(padvalue, n-1))]*n)
That's not quite the same as the previous suggestions; if the last
tuple is shorter than n, it pads the last tuple with padvalue. The OP
didn't mention if he wants that or he'd rather have a shorter last
tuple.
George
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> George Sakkis wrote:
> > Neil Cerutti wrote:
> >
> >
> >>On 2006-09-26, Neal Becker <[EMAIL PROTECTED]> wrote:
> >>
> >>>Any suggestions for transforming the sequence:
> >>>
> >>>[1, 2, 3, 4...
risk to be caught (with whatever consequences this
implies).
- Yes, you *might* be able to get away with it (at least for some time)
running in stealth mode.
- No, people here are not willing to help you go down this road, you're
on your own.
Hope this helps,
George
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, George
> Sakkis wrote:
>
> > Lawrence D'Oliveiro wrote:
> >
> >> Fredrik Lundh wrote:
> >> > you're not the designer...
> >>
> >> I don't have to be.
le purpose of being used in comparisons. No numeric behavior was
implied, i.e. Smallest and Largest are not negative and positive
infinity in the math sense of the word. So I guess the "easily
implemented" refers to this case alone.
George
--
http://mail.python.org/mailman/listinfo/python-list
gs, ints, longs, or tuples
> --
> Does anything stand out which might be fixable?
Search and replace all "EXPAND+FILL" with "EXPAND|FILL" (vertical bar
instead of plus sign). This solves the specific error, though I've no
idea what else may be broken.
George
--
http://mail.python.org/mailman/listinfo/python-list
ow how to program; teaching them DSA, python, **and** stuff like the
> visitor pattern seems impossible.
"Beginning Python - From Novice to Professional" is approachable and
great as a textbook IMO. As a bonus, it covers up to python 2.4, which
very few existing books do.
George
--
http://mail.python.org/mailman/listinfo/python-list
y discovered the joy of obfuscated python thanks to the
Code Golf challenges, here's the shortest non-recursive function I came
up with (all integers, signed):
f=lambda n:'-'[:n<0]+''.join(str(m&1)for m in iter(
lambda x=[abs(n)]:(x[0],x.__setitem__(0,x[0]>>1))[0],0))[::-1]or'0'
Any takers ? ;-)
George
--
http://mail.python.org/mailman/listinfo/python-list
s = array('c')
while n>0:
s.append('01'[n&1])
n >>= 1
s.reverse()
return s.tostring() or '0'
try: import psyco
except ImportError: pass
else: psyco.bind(fast2bin)
George
--
http://mail.python.org/mailman/listinfo/python-list
yield s[i:i+chunksize]
>
> I wrote this because I need to take a string of a really, really long
> length and process 4000 bytes at a time.
>
> Is there a better solution?
There's not any builtin for this, but the same topic came up just three
days ago: http://tinyurl.com/qec2
l):
>>> from inspect import getargspec
>>> getargspec(f)
(['x1', 'x2'], None, None, None)
George
--
http://mail.python.org/mailman/listinfo/python-list
ultiple backends"""
def __init__(self, backends):
self.backends = backends
@forall_backends
def flush(self):
'Flush all backends'
@forall_backends
def draw(self, x, y):
'Draw point (x,y) on all backends'
m = MultiBackend([Foo(),Bar()])
m.flush()
m.draw(1,2)
#==
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
ll it's entries at once to create itself
faster?
-- George Young
--
"Are the gods not just?" "Oh no, child.
What would become of us if they were?" (C.S. Lewis)
--
http://mail.python.org/mailman/listinfo/python-list
it is
"Roundup or else non-python COTS"? I gave up on Roundup a while ago
due to too many crashes. I'm now using Trac:
a) Open Source
b) Python
c) Adequate functionality (for me at least)
http://trac.edgewall.org/
I'm not trying to "sell" Trac, but
or is this not possible?
There are no default functions for getx, setx, delx; you have to
specify what you expect to happen when you write a.p, a.p = v and del
a.p, respectively. What would, for example, be the default getx that
you don't want to overwrite ?
George
--
http://mail.python.org/mailman/listinfo/python-list
j) and new style classes.
>
> (snipped)
>
>I think this flexibility is part the python philosophy, but I am not a python
> philosopher (nor was I meant to be).
Neither a python tutor, apparently, but strong candidate for the
monthly "most confusing-to-a-newbie reply" award.
George
--
http://mail.python.org/mailman/listinfo/python-list
self.__getitem__ = lambda i: i*x
I'm not sure if this is a conscious choice or a technical limitation of
how new-style classes work internally, but I've had a use for it at
least once.
George
--
http://mail.python.org/mailman/listinfo/python-list
Python function and boosting it using several different
tools. Check out the final comparison table first; the pyrex version is
less than half a second slower than the C++.
George
--
http://mail.python.org/mailman/listinfo/python-list
if y > maxfact:
> primes.append(x)
> break
> if not x%y:
> break
> return primes
You can also save an attribute lookup for append; just add
append = primes.append
outside of the loop and replace primes.append(x) with append(x)
That should cut down a few fractions of second.
George
--
http://mail.python.org/mailman/listinfo/python-list
m/~hgg9140/comp/pyperlish/doc/manual.html
http://www.seanet.com/~hgg9140/comp/cgipm/doc/index.html
Others on this newsgroup said I'd be better off just doing it in raw
python. After a while, I realized that was true. You do
triple-quoted templates with normal python idioms. Throw in
some persistence mechanisms to deal with maintaining state across
transactions, and you are in business.
Since then I've looked at Zope, Plone, TurboGears, Django, and (for
standalone apps) Dabo. TurboGears is mostly a set of recommendations
on what 3rd party packages to use, with a wee bit of glueware. So far
nothing feels as simple as just doing it in python.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
...
>>> X.__class__
AttributeError: class X has no attribute '__class__'
So to handle all cases, you'd have to go with:
def typename(o):
try: cls = o.__class__
except AttributeError: cls = type(o)
return cls.__name__
# or for fully qualified names
# return '%s.%s' % (cls.__module__, cls.__name__)
George
--
http://mail.python.org/mailman/listinfo/python-list
7;self' is not defined'? What I want is to have the
> dictionary 'estoc' available in my calling script.
>
> Thanks, Evan
Please post examples that reproduce the error; what you posted doesn't
even refer to "self" at all.
George
--
http://mail.python.org/mailman/listinfo/python-list
n-of-lesser-python.html before you
commit to writing what will turn out to be yet another "80% Python" VM
/ JIT compiler.
George
--
http://mail.python.org/mailman/listinfo/python-list
robert <[EMAIL PROTECTED]> writes:
> Harry George wrote:
> > When I came from Perl, I too missed perl-isms and specifically CGI.pm, so
> > wrote my own:
> > http://www.seanet.com/~hgg9140/comp/index.html
> > http://www.seanet.com/~hgg9140/comp/pyperlish/doc/manu
dispatcher could then be
as simple as:
import events
def parseEvents(file):
while not file.eof():
ev = int(file.read(1))
cls = getattr(events, 'Evt%d' % ev)
cls(file).execute()
By the way, it is not clear from your description if the event number
equals to the size of the associated data. If it is, you can factor out
the data extraction part in the factory function and pass just the
extracted data in the Event constructor instead of the file:
def parseEvents(file):
while not file.eof():
ev = int(file.read(1))
cls = getattr(events, 'Evt%d' % ev)
cls(file.read(ev)).execute()
George
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I am sure this is a basic math issue, but is there a better way to
> ensure an int variable is divisible by 4 than by doing the following;
>
> x = 111
> x = (x /4) * 4
>
> Just seems a bit clunky to me.
if x % 4 == 0:
# x is divisible by
Romulo A. Ceccon wrote:
> George Sakkis wrote:
>
> > If you actually intend to
> > 1) name your Event subclasses Evt1, Evt2, ... EvtN and not give more
> > descriptive (but unrelated to the magic event number) names
>
> No, those names are just an example. The act
mands.
>
> Is there any way of doing this nicely in Python?
What about __setattr__ ? At least from your example, checking happens
only when you set an attribute. If not, post a more representative
sample of what you're trying to do.
George
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> George Sakkis wrote:
> > Simon Bunker wrote:
> >
> > > Hi I have code similar to this:
> > >
> > > class Input(object):
> > >
> > > def __init__(self, val):
> > > self.value = val
&g
y of these?
[coming_from[lang].advocacy_kit
for lang in ('C/C++', 'Java', 'Perl', 'PHP', 'Visual Basic')]
(the six more popular than Python according to
http://www.tiobe.com/tpci.htm)
George
--
http://mail.python.org/mailman/listinfo/python-list
org/labs/python_pitfalls.html
> http://www.ferg.org/projects/python_gotchas.html
> http://www.onlamp.com/pub/a/python/2004/02/05/learn_python.html
>
> Danny
I'm surprized that none of these pages mentions the incompatible type
comparison gotcha:
>>> 5 < "4"
Tru
Steven D'Aprano wrote:
> On Thu, 07 Dec 2006 13:52:33 -0800, George Sakkis wrote:
>
> > I'm surprized that none of these pages mentions the incompatible type
> > comparison gotcha:
> >
> >>>> 5 < "4"
> > True
> >
> >
e reinventing a part of an ORM. Have you checked out
SQLAlchemy or Django's ORM, in case they provide what you want out of
the box ?
George
--
http://mail.python.org/mailman/listinfo/python-list
Allen wrote:
> Does anyone agree with me?
> If you have used Matlab, welcome to discuss it.
Sure, and earth is a heavy version of a basketball. If all you have is
a hammer...
George
--
http://mail.python.org/mailman/listinfo/python-list
ape-changing fluidity, and is subject to radially symmetric
shape-impacting processes. Magma and gravity for the earth, leather
and air pressure for inflated balls, sand and accretion for beach
"cannonballs", and snow and hand pressure for snowballs.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
st a newbie thing. Even people who are reasonably fluent
in Lisp use Python for many tasks, and some make python the default
with Lisp as a special case. It would probably be fair to say that
the more you know about a variety of languages, the more you
appreciate Python.
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
sp is an obfuscated version of Python
>
> hell no, lisp's syntax is much easier than python's since it's homogenous
It sure is easier... if you're a compiler rather than a human. Also a
lightbulb is much easier understood as a bunch of homogeneous elemental
particles.
George
--
http://mail.python.org/mailman/listinfo/python-list
use nobody can read each other's code
any more."
http://mail.python.org/pipermail/python-3000/2006-April/000286.html.
George
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Okay, since everyone ignored the FAQ, I guess I can too...
>
> Mark Tarver wrote:
> > How do you compare Python to Lisp? What specific advantages do you
> > think that one has over the other?
>
> (Common) Lisp is the only industrial strength language with both pure
> com
Ken Tilton wrote:
> George Sakkis wrote:
> > [EMAIL PROTECTED] wrote:
> >
> >>Okay, since everyone ignored the FAQ, I guess I can too...
> >>
> >>Mark Tarver wrote:
> >>
> >>>How do you compare Python to Lisp? What sp
perties. Can you advise
> me on how to do this?
I'm afraid not, at least not without seeing an example. By the way,
I've never heard of Cache before and its name is too generic for
looking it up online; you should at least provide a link if you're
asking for help about obscure packages.
George
--
http://mail.python.org/mailman/listinfo/python-list
with a regexp engine
b) Context Free Grammar (CFG), parseable with a LL(1) or LALR(1) parser.
c) Context Dependent Grammar, parseable with an ad hoc parser with special
rules.
d) Free text, not parseable in the normal sense, but perhaps
understandable with statistical analysis NLP te
) can look quite impressive. I've see data suggesting
Ruby is replacing Perl and maybe Java. But I've yet to see data which
shows people dropping Python and moving to Ruby. Where do I find that
data?
--
Harry George
PLM Engineering Architecture
--
http://mail.python.org/mailman/listinfo/python-list
overriding
> data for the same tags.
>
> Thanks in advance,
> sulu
>
Sounds like a general XML problem, to be solved with cElementTree
perhaps. Can you provide the schema and small examples of the input
files and the desired output file?
--
Harry George
PLM Engineering Architecture
classes, etc.). Generic functions are available even today from
the PEAK framework; see for example
http://www-128.ibm.com/developerworks/library/l-cppeak2/.
George
--
http://mail.python.org/mailman/listinfo/python-list
tom arnall wrote:
> >object data member dumper?
> >George Sakkis george.sakkis at gmail.com
> >Wed Nov 8 03:42:47 CET 2006
>
> > tom arnall wrote:
> >
> > > Bruno Desthuilliers wrote:
> > >
> > > > tom arnall a écrit :
> > >
e than one files using the
fileinput module (http://docs.python.org/lib/module-fileinput.html):
import fileinput
# iterate over the lines of the files passed as command line
# arguments (sys.argv[1:]) or sys.stdin for no arguments
for line in fileinput.input():
foo(line)
I'
s in the
trace function, but it doesn't seem to work. Any other ideas ?
George
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
> On 12 dic, 17:46, "George Sakkis" <[EMAIL PROTECTED]> wrote:
>
> > I wonder if the following is possible:
> >
> > def inject_n_call(func, **kwds):
> > '''Call func by first updating its locals with
ove code
> around.
Why is selecting a valid s-expression easier than selecting a python
block ? If you mistakenly select an extra parenthesis or omit one, it's
the same thing. Having said that, I find this problem is mostly
academic in both languages with modern editors... there are less
tr
George Sakkis wrote:
> Gabriel Genellina wrote:
> > On 12 dic, 17:46, "George Sakkis" <[EMAIL PROTECTED]> wrote:
> >
> > > I wonder if the following is possible:
> > >
> > > def inject_n_call(func, **kwds):
> > > '
to focus on the real problem, the recommendation system algorithm.
You may download Pyflix and find more about it at
http://pyflix.python-hosting.com.
Enjoy and good luck!
George
--
http://mail.python.org/mailman/listinfo/python-list
setattr(self,'_age',value))
If any of fget,fset,fdel cannot be written as lambda or you'd rather
write them as functions, you may use the recipe at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410698.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
as distinct semantics, but from my
experience these are far less common than the unlimited-extra-arguments
case.
George
--
http://mail.python.org/mailman/listinfo/python-list
setattr(self,'_age',value))
If any of fget,fset,fdel cannot be written as lambda or you'd rather
write them as functions, you may use the recipe at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410698.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
setattr(self,'_age',value))
If any of fget,fset,fdel cannot be written as lambda or you'd rather
write them as functions, you may use the recipe at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410698.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
setattr(self,'_age',value))
If any of fget,fset,fdel cannot be written as lambda or you'd rather
write them as functions, you may use the recipe at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410698.
HTH,
George
--
http://mail.python.org/mailman/listinfo/python-list
position 0:
ordinal not in range(128)
# Python 2.5
u'\x94'
Is the current version the "right" one or is this function supposed to
change every other week ?
George
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> George Sakkis wrote:
>
> > The following snippet results in different outcome for (at least) the
> > last three major releases:
> >
> >>>> import urllib
> >>>> urllib.unquote(u'%94')
> >
> > # P
I had to
reinstall Python2.2 in order to use the old PySol binaries (couldn't
get the build-from-source to work).
Linux and Python got a fan due to PySol. It should be considered a
cultural treasure, and if a bit of funding would help keep it rolling
into the future, that might be worthwhile.
e several free
tutorials online and come back when you have trouble with something
specific you didn't understand.
George
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> Bruno Desthuilliers wrote:
>
> >
> > Python is dynamic, and fighting against the language is IMHO a really
> > bad idea. The only places where theres a real need for this kind of
> > stuff are when dealing with the "outside world" (IOW : inputs and
> > outputs). And then packa
501 - 600 of 1560 matches
Mail list logo