Hi,
I am new to python and web2py framework. Need urgent help to match a pattern in
an string and replace the matched text.
I've this string (basically an sql statement):
stmnt = 'SELECT taxpayer.id,
taxpayer.enc_name,
taxpayer.age,
taxpayer.occupation
FROM
On Wednesday, 19 December 2012 15:51:22 UTC+5, Steven D'Aprano wrote:
> On Wed, 19 Dec 2012 02:42:26 -0800, AT wrote:
>
>
>
> > Hi,
>
> >
>
> > I am new to python and web2py framework. Need urgent help to match a
>
> > pattern in an string
On Wednesday, 19 December 2012 16:27:19 UTC+5, Thomas Bach wrote:
> On Wed, Dec 19, 2012 at 02:42:26AM -0800, AT wrote:
>
> > Hi,
>
> >
>
> > I am new to python and web2py framework. Need urgent help to match a
>
> > pattern in an string and replace th
On Wednesday, 19 December 2012 18:16:18 UTC+5, Peter Otten wrote:
> AT wrote:
>
>
>
> > I am new to python and web2py framework. Need urgent help to match a
>
> > pattern in an string and replace the matched text.
>
> >
>
> > I've this
I would like to spark the discussion about the following syntax problem I
encounter.
THE PROBLEM
I have a lot times the following code:
for x in [-2, -1, 0, 1, 2, 3, 4]:
if x > 0:
... more code...
It is not the addional line containing 'if x > 0:' that bothers me, but
x in some_list if some_condition:
--- etc...
I am not looking for a work around but more interest if other people might
judge this syntax would come in handy?
Interested in any feedback!
Kind regards,
@
Paul Rubin wrote:
> at <[EMAIL PROTECTED]> writes:
>> I
ep. Unless of course nobody
appreciates it. That's the discussion I'd like to have here in the forum.
All the best
@
Roberto Bonvallet wrote:
> at wrote:
>> More pythonic in view would be:
>>
>> for x in [-2, -1, 0, 1, 2, 3, 4] if x > 0:
>>...
for" loop.
>
> Thanks for replying me.
>
>
> On Dec 13, 3:58 pm, Roberto Bonvallet <[EMAIL PROTECTED]>
> wrote:
>> Gal Diskin wrote:
>> > Hi,
>> > I am writing a code that needs to iterate over 3 lists at the same
>> >
The proposed solution impairs readability because there's a "surprise"
> at the end. List comprehensions already open the language up to
> readability abuse. Lets not add more.
>
> To avoid the unwanted indentation, I would go with the already
> suggested "if not x&g
alternatives that don't do that.
Does Guido ever change his mind?
Cheers,
@
Carl Banks wrote:
> at wrote:
>> I am not looking for a work around but more interest if other people
>> might judge this syntax would come in handy?
>
> Of course people have expressed interest in
My comments below.
Kind regards,
@
Carl Banks wrote:
> at wrote:
>> Well, all I can say that for me as a user it would make sense...
>
> Which is, like, step one out of a hundred for getting a syntax change
> into the language.
>
>> Curiosity: in what sense is it
Thanx Paul!
Do you know if this generates a new list internally (memory consumption?)
@
Paul Rubin wrote:
> at <[EMAIL PROTECTED]> writes:
>> You proposal, seems nice to me but it doesn't work with Python 2.4.3,
>> should it work with 2.5?
>>
>> Again I
xt thing I think is 'hm, not all of the list' and even
worse should I worry if more restrictions can be found when I read
further...
All the best,
@
greg wrote:
> at wrote:
>
>> It is not the addional line containing 'if x > 0:' that bothers me, but
>>
}[condition]
or
a = [c, a][condition]
would yield exactly the same even in one sentence
Cheers,
@
at wrote:
> My comments below.
>
> Kind regards,
> @
>
>
> Carl Banks wrote:
>
>> at wrote:
>>> Well, all I can say that for me as a user it wo
Hi Paul,
I appreciate your explanation!
Thanx
@
Paul Rubin wrote:
> at <[EMAIL PROTECTED]> writes:
>> > for x in (x for x in [-2, -1, 0, 1, 2, 3, 4] if x > 0):
>> >... more code ...
>
>> Do you know if this generates a new list internally
Dear Diez,
True, I was just mentioning a workaround for a typical case.
Kind regards,
Arjan
Diez B. Roggisch wrote:
>> Is it redundant according to your criteria, yes I would say:
>>
>> a = {True: a, False: c}[condition]
>>
>> or
>>
>> a = [c, a][condition]
>>
>> would yield exactly the sa
consuming too much additional resources.
Kind regards,
Arjan
Duncan Booth wrote:
> at <[EMAIL PROTECTED]> wrote:
>
>> By the way,
>>
>> I think by approving
>>
>> a = b if condition else c
>>
>> used to avloind
>>
>> if condition
I am not claiming that it was THE motivation, but it solves my problem...
Carl Banks wrote:
>
> at wrote:
>> By the way,
>>
>> I think by approving
>>
>> a = b if condition else c
>>
>> used to avloind
>>
>> if condition:
>>
That's a very good suggestion Emile!! So I might eventually need both 'press'
and 'release' (or press_key/release_key). Thanks for this!
To everyone else who has been so kind to reply thus far: What do you think of
generate_keystrokes? It's a bit long but describes exactly what the function
wou
How do you use Jython Standalone Jar?
Do you have to "Intall"?
I usually use most standalone jars directly without intalling. And I want to
use this thing in Portable Apps, so I din't want to install anything.
Because it might end up in my Windows system and I won't kn
tem,
I think I'll have a hard time getting at this person. If I even manage to find
out where the person is at all.
--
https://mail.python.org/mailman/listinfo/python-list
How do I do this in a .bat file?
Do I include the Jython or pipe it?
% CLASSPATH=$CLASSPATH:$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar; jython
-Djava.library.path=$RDBASE/Code/JavaWrappers/gmwrapper
Jython 2.2.1 on java1.6.0_20
Type "copyright", "credits" or "license" for more information.
Thanks.. I suspected it wasn't meant to be taken as in the file
THe one thing I'm not sure if Jython is suppsosedto keep running
after the initisl stuff is loaded in..
To put the question in purely DOS terms if you run a program can you pipe it
some commands and then keep it running to take the
Tee from gnuutils??
- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security mean
I have to try this and see if there is ome kind of init file in jython/python
sorta like autoexec.bat. Ialso have no idea if the commands they provide are
all it takes to run the app or I have to stay in jython.. sorry, I'm thinking
at loud.. ok, thanks t
I click jython.org standalone jar and it just does a wait cycle.
What does it need to give me a prompt?
- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing her
Jython is python in java at jython.org.
I tried clicking and double clicking.
I does a wait cycle (rotating arrow)
then returns to attention.
I'm trying to run RDKIT, an app written for jython.
THen I realised jython wasn't working at all.
I've had same problem with some jav
I’m trying to use cx_Freeze (https://pypi.org/project/cx-Freeze/) in a python
app but running into an error message:
AttributeError: module 'cx_Freeze' has no attribute ‘BdistDMG’
I’m using Anaconda and error appears with the import command: from cx_Freeze
import *
From the terminal the comma
has self.
Thanks, David
> On Aug 15, 2022, at 5:51 PM, Jim Schwartz wrote:
>
> This link covers how to use BDist_dmg.
>
> https://cx-freeze.readthedocs.io/en/latest/setup_script.html
>
> Sent from my iPhone
>
>> On Aug 15, 2022, at 12:11 PM, David at Booomer
mention of adding self which is in these lines already. Previously I
had search for __init__() which returned no lines due to the closing ).
I had visited the page you provided
(https://cx-freeze.readthedocs.io/en/latest/setup_script.html#cx-freeze-executable)
but didn’t noticed the 11 plus self as 12
From: Dennis Lee Bieber
>
> On Wed, 17 Aug 2022 12:09:14 -0600, David at Booomer
> declaimed the following:
>
>> executables=[
>> Executable(
>>
>> "prjui.py","Maiui.py","about.py","dict.py
dcrespo wrote:
> Hi all,
>
> How can I replace all None values with the string 'Null' in a
> dictionary?
>
> For example:
> convert this:
> a = {'item1': 45, 'item2': None}
>
> into this:
> a = {'item1': 45, 'item2': 'Null'}
>
I think it would be time for you to read the Fine Manual...
for ke
Alex Hunsley wrote:
> There's no really specific questions in this post, but I'm looking for
> people's thought on the issues within...
>
>
> The two main versions I've encountered for data pseudo-hiding
> (encapsulation)
Hmmm... Are data-hiding and encapsulation really the same things ?
> i
Alex Hunsley wrote:
> bruno at modulix wrote:
>
>> Alex Hunsley wrote:
>>
(snip)
>>>
>>> method 1:
>>>
>>> _X - (single underscore) - just cosmetic, a convention to let someone
>>> know that this data should be private.
>&g
Alex Hunsley wrote:
> I've seen a few discussion about the use of 'super' in Python, including
> the opinion that 'super' should only be used to solve inheritance
> diamond problem. (And that a constructor that wants to call the
> superclass methods should just call them by name and forget about su
[EMAIL PROTECTED] wrote:
> Hey, i didnt say i need an expert. wel i did... anyways, i m just
> saying that Fan is not a good python programmer, he doesnt know enough
> python to help those who have joined his group, i know its askin a
> lot, and i m not askin for a private tutor, just someone(s)
Noah wrote:
> Bruno Desthuilliers a écrit :
>
>>Noah a écrit :
>>If you have control over the API functions declarations, makes them so:
>>def my_api_func(arg1='', arg2='whatever', **kwargs):
>> code_here
>
>
> Unfortunately I cannot change the API functions.
> I should have mentioned that.
Y
Tieche Bruce A MSgt USMTM/AFD wrote:
> I am new to python,
>
>
>
> Could someone explain (in English) how and when to use self?
>
Don't use self. Use other.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
-
ice wrote:
> I am a fresh here , and I have no idea of it.
> Do you have any comments?
>
Learn Python
Learn web programming
Write the specs for your blog system
Design the solution
Implement it
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '
Chris Cioffi wrote:
as a point of style, top-posting is a Bad Thing(tm)
(fixed)
>
> On 03/11/05, bruno at modulix <[EMAIL PROTECTED]> wrote:
>
>>Tieche Bruce A MSgt USMTM/AFD wrote:
>>
>>>I am new to python,
>>>
>>>Could someone explain
Steven D'Aprano wrote:
> On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>
>
>>Tieche Bruce A MSgt USMTM/AFD wrote:
>>
>>>I am new to python,
>>>
>>>
>>>
>>>Could someone explain (in English) how and when t
hy would you learn them all ? Learn the one you need when you need them
- jus don't forget to have a quick look at the existings modules before
reinventing the square wheel (I wrote a Q&D CSV parser before realinzing
there was a pretty good one in the stdlib... But what, my Q&D solution
to
able ?
Testing against the *exact* type of an object is usually not a good idea
in Python. You should at least replace this test with something like:
if isinstance(arg1, list): #code here
or even better:
if hasattr(arg1, '__iter__'): # code here
or still even better (for mainte
[EMAIL PROTECTED] wrote:
> which feature of python do you like most?
>
> I've heard from people that python is very useful.
> Many people switch from perl to python because they like it more.
>
> I am quite familiar with perl, I've don't lots of code in perl.
> Now, I was curious and interested i
venk wrote:
> Hi,
> can some one properly explain the differences between class types and
> classic classes? ... Still face problems in identifying what is what.
I'm not sure I understand your question. Are you talking about the diff
between old-style and new-style classes, or the diff between c
sumi wrote:
> Hi, from my login i want to login as a other user , how can i do it
> using python.
http://www.catb.org/~esr/faqs/smart-questions.html
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http:/
Yves Glodt wrote:
> Hello,
>
> if I do this:
>
> for row in sqlsth:
> pkcolumns.append(row[0].strip())
> etc
>
>
> without a prior:
>
> pkcolumns = [];
>
>
> I get this error on first iteration:
> UnboundLocalError: local variable 'pkcolums' referenced before assignment
>
>
don't like. It should crash.
> [] *is* explicit for
> arrays,
IIRC, you can also use it to sbscript strings, but I wouldn't bet my
life on this.
> thus for php it's clear what you want.)
Nope. You may be in the case where you think the array already exists,
and then you (
Yves Glodt wrote:
> Yves Glodt wrote:
>
>> Hello list,
>>
>> I need to iterate over a class and get all her variable names and
>> values, e.g. considering this example:
>>
>>
>> class testclass:
>> var1 = 'ab'
>> var2 = 'cd'
>> var3 = 'ef'
Take care, these are *class* variables, not i
try ?-) Took me about 30'':
>>> def fun(): return 1,2,3
...
>>> a = fun()
>>> a
(1, 2, 3)
>>> def fun2(): return 1,2,3,4,8,9
...
>>> b = fun2()
>>> b
(1, 2, 3, 4, 8, 9)
>>>
It of course works since a function *always* retur
Pierre Barbier de Reuille wrote:
> When you need some symbols in your program, what do you use in Python ?
>
> For example, an object get a state. This state is more readable if
> expressed as a symbols, for example "opened", "closed", "error".
> Typically, in C or C++, I would use an enum for tha
[EMAIL PROTECTED] wrote:
(snip)
> So putting two underscores in front of an instance variable (or any
> identifier used inside the scope of a class statement) invokes a name
> mangling mechanism
(snip)
> Is it commonplace to use underscores
I assume you mean double underscore...
> when definin
Peter A. Schott wrote:
> Per subject - I realize I can copy/paste a line at a time into an interactive
> session when I'm trying to debug, but was wondering if there is any tool out
> there that allows me to copy sections of working Python scripts to paste into
> my
> interac
ChaosKCW wrote:
> Hi
>
> I was wondering if someone could help with the import statements needed
> to use the timeit module in the following code. I need to access the
> "cur" object.
>
> Thanks,
>
> import cx_Oracle
> import timeit
>
> def VerifyTagIntegrity(con, TableOwner):
> cur = con.c
Salvatore wrote:
> Sur : http://www.salvatore.exolia.net:9090/
> (Nécessite Firefox ou Mozilla)
>
Heu, Salvatore, tu te serais pas un peu trompé de ng, là ?-)
(x-post et fu2 f.c.l.py)
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL
mjakowlew wrote:
> hi,
>
> I'm trying to pass some values from a webform into a python script.
>
(snip)
> Also this
> is done through Zope if that makes a difference to anyone.
Yes, it makes a difference. Zope is a world in itself, and is slighty OT
here. Note that there's a Zope mailing-list:
h
ChaosKCW wrote:
> So timeit is mostly useless then ?
>
I wouldn't say so.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
striker wrote:
> I have a comma delimited text file that has multiple instances of
> multiple commas. Each file will contain approximatley 300 lines. For
> example:
>
> one, two, threefour,fivesix
> one, two, three,four,,eighteen, and so on.
>
> There is one time when multiple
Steve Holden wrote:
> john boy wrote:
>
>> using the following program:
>>
>> fruit = "banana"
>> index = 0
>> while index < len (fruit):
>> letter = fruit[index-1]
>> print letter
>> index= index -1
>>
>> this program is supposed to spell "banana" backwards and in a vertical
>
Rusty Shackleford wrote:
> Hi --
>
> We have some code that returns an object of a different class, depending
> on some parameters. For example:
>
> if param x is 1 and y is 1, we make an object of class C_1_1.
> if param x is 1 and y is 2, we make an object of class C_1_2.
>
> C_1_1 and C_1_2
[EMAIL PROTECTED] wrote:
> Hello everybody!
> I have little problem:
>
> class A:
> def __init__(self, n):
> self.data = n
> def f(self, x = )
> print x
>
> All I want is to make self.data the default argument for self.f(). (I
> want to use 'A' class as following :
>
Dennis Lee Bieber wrote:
>
>
(snip)
> but that may not be desirable if None is a valid value => myA.f(None),
> so...
>
> class A(object):
> def __init__(self, n):
> self.data =n
> def f(self, *arg):
> if len(arg) == 0:
> x = self.data
> else:
>
[EMAIL PROTECTED] wrote:
> Hello everybody,
>
> I am in the process of writing my very first web application in Python,
> and I need a way to
> generate dynamic HTML pages with data from a database.
(snip)
> After some thought I decided to leave the various frameworks
> aside for the
> time bein
[EMAIL PROTECTED] wrote:
> So, I've written my first GUI app in python. I've turned it into a
> binary .exe and .app that runs on Windows and Mac respectively, but on
> my Linux box, where I wrote the thing, I still have to drop to the
> command line and ./myscript.py. What can I do to make it a
gt;
> def beforePrintHook(self, msg): pass
> def afterPrintHook(self, msg): pass
>
> Now, in the spirit of py.test, I'd like API to be practically no API at all :)
> moreover, deploying a plugin must consist simply of adding appropriate file to
> plugins directory, nothing
Steve wrote:
> I am going to go the mod_python route.
>
> as for why a person would go route one over route 2
>
> is that the number of lines of html/output vs python code are usually
> 10 to 1 and it's much easier to encapsulate the python code than to
> quote and escape all the html/css/xml
>
Mike Meyer wrote:
> Jorge Godoy <[EMAIL PROTECTED]> writes:
>
>>Mike Meyer <[EMAIL PROTECTED]> writes:
>>
(snip)
>
> While I'm at it - how does KID do for things that aren't HTML?
It doesn't. Kid is explicitely for XML/HTML templating.
Ben Bush wrote:
> I have a lis:
> [[1,3],[3,4],[5,6],[8,9],[14,0],[15,8]]
> I want a code
Then write it.
And when (if) you have problems with it, repost, we'll then be happy to
help you.
> to test when the difference between the first element in
> the list of list is equal to or larger than 6,
[EMAIL PROTECTED] wrote:
> [test 1]
>
class A:
>
> ...i = 1
> ...
>
a = A()
A.i
>
> 1
>
a.i
>
> 1
>
A.i = 2
A.i
>
> 2
>
a.i
>
> 2
>
>
> [test2]
>
class A:
>
> ...i = 1
> ...
>
a = A()
A.i
>
> 1
>
a.i
>
> 1
>
a.i = 2
A.i
Manlio Perillo wrote:
> Regards.
>
> On my system:
> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
> on win32, Windows XP
>
> I have this problem:
>
>
n = 61409 + 1
data = 'x' * n
>
>
print data
>
>
> Traceback (most recent call last):
> File "xxx", lin
Joseph Garvin wrote:
> Tom Anderson wrote:
>
>> Jeff Epler's proposal to use unicode operators would synergise most
>> excellently with this, allowing python to finally reach, and even
>> surpass, the level of expressiveness found in languages such as perl,
>> APL and INTERCAL.
s/expressiveness/u
Ben Sizer wrote:
> The Eternal Squire wrote:
>
>>I tend to use this design pattern a lot in order to aid in
>>compartmentalizing interchangeable features in a central class that
>>depend on the central class's data.
>
>
> I'm afraid I've read this paragraph and the code 3 times and I still
> hav
Ben Sizer wrote:
> bruno at modulix wrote:
>
>>Ben Sizer wrote:
>>
>>>I'm afraid I've read this paragraph and the code 3 times and I still
>>>have no idea what you're trying to convey.
>>
>>
>
>
> Got anything more
on the first, since it's freely available
online.
> I'm an experienced C++-programmer who wants to take a look at Python.
Then I'd say that Dive into Python may be a good choice.
Welcome BTW
--
bruno desthuilliers
python -c "print '@'.join(['.'.join
Mark Carter wrote:
> I was musing recently about how one could, for example, set up a really
> simple mailing subscription list. It occurred to me that a really simple
> way to implement it would be to use xmlrpc.
> So there could be a function
> subscribe(emailAddress),
> which would send an email
David Rasmussen wrote:
> Frithiof Andreas Jensen wrote:
>
>>
>> From the speed requirement: Is that correspondance chess by any chance??
>>
>
> Regular chess at tournament time controls requires speed too. Any pure
> Python chess program would lose badly to th
John J Lee wrote:
> Is it possible to get doctest-mode to work with mmm-mode and python-mode
> nicely so that docstrings containing doctests are editable in doctest-mode?
I don't know.
(snip)
>
> Any tips appreciated!
>
Seems like comp.emacs could be a good place for this question
--
bru
John J. Lee wrote:
> bruno at modulix <[EMAIL PROTECTED]> writes:
>
>
>>John J Lee wrote:
>>
>>>Is it possible to get doctest-mode to work with mmm-mode and python-mode
>>>nicely so that docstrings containing doctests are editable in doctest-mode?
&g
Inyeol Lee wrote:
(snip)
class A(object):
... def __init__(self, foo):
... if self.__class__ is A:
... raise TypeError("A is base class.")
s/TypeError/NotImplementedError/
s/base class/abstract class/
--
bruno desthuilliers
python -c "pri
Mr.Rech wrote:
> Thanks for your suggestions. They are very usefull and indeed bypass my
> problem. However, I've found a (perhaps) more elegant way to get the
> same result using metaclasses.
(snip code)
>
> I know metaclasses are a complete different beast, anyway I find this
> approach more
Little wrote:
> Could someone start me on putting in a table into this code, and some
> HTML tags. I would to make the table below the map and have a header at
> the top. Thanks for the help.
>
> """ Publisher example """
>
> def query(req,
Little wrote:
> Could someone tell me how to add some HTML tags to this program. I want
> to be able to change the background color, add some headers, and put a
> table below the map that will be displayed. Could someone please tell
> me how to add this to the current program. Thanks in advance.
>
David Pratt wrote:
(snip)
> Can someone advise a more efficient lookup when using lists of
> dictionaries. Many thanks.
>
>
> TEST_CONSTANTS = [
> {'color':'red', 'shape':'octagon'},
> {'color':'yellow', 'shape':'triangle'},
> {'color':'green', 'shape':'circle'}]
COLOR_INDEX = dict([
ambda:
import sys
lambda x : sys.stdout.write("%d %d\n" % (x/60, x%60))
> It is constantly pointed out on
> this list that the lambda provides no extra expressive power,
They do, when one need a very trivial callable for callbacks - which is
probably the main (if not the only) use c
ta'] = 42
>
> The purpose is to create an XML tree myself
Don't reinvent the wheel. ElementTree (and it's C based brother) are
very good at this.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
ex_ottoyuhr wrote:
> I'm trying to create a function that can take arguments, say, foo and
> bar, and modify the original copies of foo and bar as well as its local
> versions -- the equivalent of C++ funct(&foo, &bar).
This is already what you have. In Python, all you have are references to
objec
The VirusCheck at the IMST generated the following Message:
V I R U S A L E R T
Our VirusCheck found a Virus (W32/Netsky-Q) in your eMail to "empire.support".
This eMail has been deleted !
Now it is on you to check your System for Viruses
The VirusCheck at the IMST generated the following Message:
V I R U S A L E R T
Our VirusCheck found a Virus (W32/Netsky-Q) in your eMail to "empire.support".
This eMail has been deleted !
Now it is on you to check your System for Viruses
Mike Meyer wrote:
> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
>
>>> ^^ There is no functionality to check if a subclass correctly
>>>implements an inherited interface
>>
>>I don't know of any language that provide such a thing. At least f
of modules and OO is that you don't *have* to do things like
> that. Cut-n-paste means you wind up with two copies of the code to
> maintain,
Mike, has it ever occured to you that this could be refactoring, not
copy_paste ?-)
(for the record, I too frequently *move* - not 'c
Pelmen wrote:
> How can I get rid of recursive call __getattr__ inside this method, if
> i need to use method or property of the class?
>
Sorry, but I don't understand your question. Which recursive calls to
__getattr__ ? __getattr__ is only called if a/ it's defined and b/ the
attribute has not b
Steve Holden wrote:
> Peter Otten wrote:
>
>> Pelmen wrote:
>>
>>
>> class Test:
>>>
>>>
>>> def __getattr__(self, attr):
>>>print attr
>>>
>>> def foo(x):
>>>print x
>>>
>>>
>> t = Test()
>> print t
>>>
>>>
>>> __str__
>>>
>>> Traceback (most
Yechezkal Gutfreund wrote:
> Are you familiar with any Python efforts that parrallel Ruby on Rails
> (integrated Ajax compliant IDE?).
"integrated" and "IDE" in the same sentence ? A bit redundant, isn't it ?-)
RoR is not an IDE, it's a web framework. The closest things in Python
are TurboGears (
Tuvas wrote:
> Let's say I make a program something like follows:
>
> x=[]
> x.append([1,2,3])
> x.append([4,5,6])
> print x
> print x[0]
> print x[0][1]
> x[0][1]=5
Where are the tuples ?
> Okay, everything works here as expected except the last line. Why won't
> this work?
Because you forgot
Gabriel Zachmann wrote:
> I understand the Wikipedia article on Polymorphism
> ( http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 )
> that it doesn't make sense to talk about polymorphism in a fully
> dynamically typed language
"a single polymorphic operator can act in expressions
Adrian Holovaty wrote:
> bruno at modulix wrote:
>
>>RoR is not an IDE, it's a web framework. The closest things in Python
>>are TurboGears (good Ajax/js support via Mochikit), Subway (never
>>tested), and Django (no Ajax support AFAIK).
>
>
> Note th
Heiko Wundram wrote:
> Steven D'Aprano wrote:
>
>>>But when I run this script in Windows XP, I get an error while
>>>executing the above zip command.
>>
>>Would you like to tell us what error you get?
>
>
> I presume the error he's seeing is something along the line of:
>
> "zip: Bad command or
> I've been looking through Python templating systems all over the place, but I
> just can't find one that supports XPath - which is by far the best thing to
> have when you generate stuff from XML. TAL might be able to get me part of the
> way (at least, it supports some kind
gt; never developed in Python before, so... I'll be evaluating Django
> shortly--let me see how it compares to Tomcat.
You may also want to have a look at turbogears (roughly similar to
Django, but probably much more flexible)
My 2 cents
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
--
http://mail.python.org/mailman/listinfo/python-list
Barbier de Reuille Pierre wrote:
> On 12 Jan 2006 12:20:50 -0800
> "bblais" <[EMAIL PROTECTED]> wrote:
>
>
>>Hello,
>>
(snip)
>
>
> Well, I think it will depend on your project ...
> If you're developing GUI application, you will have t
1 - 100 of 607 matches
Mail list logo