Hello, as you all know i'am using cgi method for my web script.
I have been told that webpy is the way to go sor script simple enough as
mines.
Can you please show me the simplest example you can think of utilizing a
templates (index.html) and a python script (metrites.py) ?
I want to see i
> * property only works in "new-style" classes that inherit from object;
>
> * likewise for super;
Another question raised here is that what is the proper way to refer
to parent class? For example,
class A(object):
def __init__(self, arg):
print "A"
class B(A):
d
In article <51c66a03$0$2$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Sat, 22 Jun 2013 23:12:49 -0400, Roy Smith wrote:
> > Number 2 on the list is "Months have either 30 or 31 days", which was
> > obviously believed by whoever made this sign: http://tinyurl.com/mgv39on
On 06/21/2013 01:32 PM, Antoon Pardon wrote:
> Op 19-06-13 23:13, ru...@yahoo.com schreef:
>> On 06/19/2013 04:57 AM, Antoon Pardon wrote:
>>> Op 19-06-13 05:46, ru...@yahoo.com schreef:
>>> I don't remember making such a claim. What I do remember is
>>> you among others claiming that the problem w
On 06/23/2013 07:01 AM, Νίκος wrote:> Hello, as you all know i'am using cgi
method for my web script.
>
> I have been told that webpy is the way to go sor script simple enough as
> mines.
>
> Can you please show me the simplest example you can think of utilizing a
> templates (index.html) and
Στις 23/6/2013 5:57 μμ, ο/η ru...@yahoo.com έγραψε:
On 06/23/2013 07:01 AM, Νίκος wrote:> Hello, as you all know i'am using cgi
method for my web script.
I have been told that webpy is the way to go sor script simple enough as
mines.
Can you please show me the simplest example you can think o
On 6/22/2013 9:20 PM, MRAB wrote:
[snip]
One vs not-one isn't good enough. Some languages use the singular with
any numbers ending in '1'. Some languages have singular, dual, and
plural. Etc. It's surprising how inventive people can be! :-)
In the Idle output window for file grepping, I just c
Le jeudi 20 juin 2013 19:17:12 UTC+2, MRAB a écrit :
> On 20/06/2013 17:37, Chris Angelico wrote:
>
> > On Fri, Jun 21, 2013 at 2:27 AM, wrote:
>
> >> And all these coding schemes have something in common,
>
> >> they work all with a unique set of code points, more
>
> >> precisely a unique s
Nazdar mládenci,
měl bych zájem dokončit překlad Tkinteru
(http://tkinter.programujte.com/index.htm), na kterém před šesti lety
pracovali zejména Pavel Kosina a Jakub Vojáček.
Poslal jsem jim mejla ale nehlásí se mi. Poradíte mi?
Před několika dny jsem přeložil pěkné texty o Tkinteru
(http:
On Sun, Jun 23, 2013 at 7:35 AM, Adam Jiang wrote:
> Another question raised here is that what is the proper way to refer
> to parent class? For example,
>
> class A(object):
> def __init__(self, arg):
> print "A"
>
> class B(A):
> def __init__(self, arg):
>
On Sun, 23 Jun 2013 08:51:41 -0700, wxjmfauth wrote:
> utf-8: how many bytes to hold an "a" in memory? one byte.
>
> flexible string representation: how many bytes to hold an "a" in memory?
> One byte? No, two. (Funny, it consumes more memory to hold an ascii char
> than ascii itself)
Incorrect.
On Sun, 23 Jun 2013 10:15:38 -0600, Ian Kelly wrote:
> If you're worried about efficiency, you can also explicitly name the
> superclass in order to call the method directly, like:
>
> A.__init__(self, arg)
Please don't. This is false economy. The time you save will be trivial,
the over
In article <51c723b4$0$2$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Sun, 23 Jun 2013 10:15:38 -0600, Ian Kelly wrote:
>
> > If you're worried about efficiency, you can also explicitly name the
> > superclass in order to call the method directly, like:
> >
> >
On Sun, Jun 23, 2013 at 10:49 AM, Roy Smith wrote:
> One thing I've never understood about Python 2.x's multiple inheritance
> (mostly because I almost never use it) is how you do something like this:
>
> class Base1(object):
>def __init__(self, foo):
> self.foo = foo
>
> class Base2(obj
On Sun, Jun 23, 2013 at 11:08 AM, Ian Kelly wrote:
> On Sun, Jun 23, 2013 at 10:49 AM, Roy Smith wrote:
>> am I missing something here?
>
> Yes, you're missing that super() does not simply call the base class,
> but rather the next class in the MRO for whatever the type of the
> "self" argument i
On Sat, 22 Jun 2013 23:40:53 -0600, Ian Kelly wrote:
> On Sat, Jun 22, 2013 at 11:23 PM, Steven D'Aprano
> wrote:
>> On Sat, 22 Jun 2013 22:27:10 -0600, Ian Kelly wrote:
>>> I actually consider that an up side. Sure it's inconvenient that you
>>> can't delegate all such methods at once just by o
On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote:
> Incidentally, although super() is useful, it's not perfect, and this is
> one of my grievances with it: that a user can, based upon the name, draw
> an inaccurate assumption about what it does without reading or fully
> understanding the docum
On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano
wrote:
> On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote:
>
>> Incidentally, although super() is useful, it's not perfect, and this is
>> one of my grievances with it: that a user can, based upon the name, draw
>> an inaccurate assumption about
In article ,
Ian Kelly wrote:
> Yes, you're missing that super() does not simply call the base class,
> but rather the next class in the MRO for whatever the type of the
> "self" argument is. If you write the above as:
>
> class Base1(object):
>def __init__(self, foo, **kwargs):
> su
On Sun, 23 Jun 2013 12:49:42 -0400, Roy Smith wrote:
> One thing I've never understood about Python 2.x's multiple inheritance
> (mostly because I almost never use it) is how you do something like
> this:
>
> class Base1(object):
>def __init__(self, foo):
> self.foo = foo
>
> class Bas
On Sun, 23 Jun 2013 12:04:35 -0600, Ian Kelly wrote:
> On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano
> wrote:
>> On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote:
>>
>>> Incidentally, although super() is useful, it's not perfect, and this
>>> is one of my grievances with it: that a user ca
On Sun, Jun 23, 2013 at 12:46 PM, Steven D'Aprano
wrote:
> All is not lost, there are ways to make your classes cooperative. The
> trick is to have your classes' __init__ methods ignore keyword arguments
> they don't know what to do with. object used to do the same thing, but it
> no longer does,
On Sun, Jun 23, 2013 at 12:50 PM, Steven D'Aprano
wrote:
> What else would you call a function that does lookups on the current
> object's superclasses?
Well, as James Knight points out in the "Super Considered Harmful"
article, the equivalent in Dylan is called "next-method", which isn't
a valid
> xml = """
>
>
>
>
>
>
>
>
>
>
>
>
>
> """
>
> import xml.etree.ElementTree as etree
>
> tree = etree.fromstring(xml)
>
> def walk(elem, path, token):
> path += (elem,)
> if token in elem.attrib.values():
> yield path
> for child i
In article <51c74373$0$2$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Sun, 23 Jun 2013 12:04:35 -0600, Ian Kelly wrote:
>
> > On Sun, Jun 23, 2013 at 11:36 AM, Steven D'Aprano
> > wrote:
> >> On Sun, 23 Jun 2013 11:18:41 -0600, Ian Kelly wrote:
> >>
> >>> Incidentally,
On Sunday, June 23, 2013 11:15:38 AM UTC-5, Ian wrote:
> If you're worried about efficiency, you can also
> explicitly name the superclass in order to call the method
> directly, like:
I'm NOT worried about efficiency, i worried about
readability, and using super (when super is NOT absolutely
requ
On Sunday, June 23, 2013 11:49:42 AM UTC-5, Roy Smith wrote:
> For what it's worth, I never bother to inherit from object
> unless I know there's something I need from new style
> classes. Undoubtedly, this creates a disturbance in The
> Force, but such is life.
Well, in Python 3000, if you don'
Hello,
I am new to python development and I want to know what kinds of tools people
use for python development. I went to Python website and found several tools.
1. Automated Refactoring Tools
2. Bug Tracking
3. Configuration And BuildTools
4. Distribution Utilities
5. Documentation Tools
6. I
On 2013-06-23, cutems93 wrote:
> Hello,
>
> I am new to python development and I want to know what kinds of tools
> people use for python development. I went to Python website and found
> several tools.
>
> 1. Automated Refactoring Tools
> 2. Bug Tracking
> 3. Configuration And BuildTools
> 4. D
On 06/23/2013 09:15 AM, Νίκος wrote:
> Στις 23/6/2013 5:57 μμ, ο/η ru...@yahoo.com έγραψε:
>> On 06/23/2013 07:01 AM, Νίκος wrote:
> Hello, as you all know i'am using cgi method for my web script.
>>>
>>> I have been told that webpy is the way to go sor script simple enough as
>>> mines.
>>>
>>> Ca
On 06/23/2013 02:40 PM, cutems93 wrote:
> [...]
The Python wiki at http://wiki.python.org/moin/ has a lot of info on
most of your subjects. I've included links to there for some of your
items below.
All your items below also have comercial products available but I
an not familiar with any so all
How do I bring users back to beginning of user/password question once they
fail it? thx
--
http://mail.python.org/mailman/listinfo/python-list
In article <263da442-0c87-41df-9118-6003c6168...@googlegroups.com>,
ru...@yahoo.com wrote:
> > 1. Automated Refactoring Tools
> I wish.
Why? I've never seen the appeal of these. I do plenty of refactoring.
It's unclear to me what assistance an automated tool would provide.
> > 2. Bug Track
On 06/23/2013 05:18 PM, christheco...@gmail.com wrote:
> How do I bring users back to beginning of user/password question once they
> fail it? thx
This is not a very good question. There is no context
so we cannot tell if you are talking about a command line
program that prompts for a username
On 06/23/2013 05:49 PM, Roy Smith wrote:> In article
<263da442-0c87-41df-9118-6003c6168...@googlegroups.com>, ru...@yahoo.com wrote:
>> > 1. Automated Refactoring Tools
>> I wish.
> Why? I've never seen the appeal of these. I do plenty of refactoring.
> It's unclear to me what assistance an a
In article ,
ru...@yahoo.com wrote:
>
> Other things like finding all uses of various objects/functions
> etc would also be useful now and then but I suppose that is a
> common IDE capability?
$ find . -name '*.py' | xargs grep my_function_name
seems to work for me. I suppose a language-awar
On Sun, 23 Jun 2013 16:18:35 -0700, christhecomic wrote:
> How do I bring users back to beginning of user/password question once
> they fail it? thx
Write a loop. If they don't fail (i.e. they get the password correct),
then break out of the loop.
--
Steven
--
http://mail.python.org/mailman/
On Sun, 23 Jun 2013 13:40:07 -0700, cutems93 wrote:
> Hello,
>
> I am new to python development and I want to know what kinds of tools
> people use for python development. I went to Python website and found
> several tools.
[snip list of a dozen tools]
> What else do I need?
You don't *need* an
> >> > 1. Automated Refactoring Tools
>
> >> I wish.
>
> > Why? I've never seen the appeal of these. I do plenty of refactoring.
> > It's unclear to me what assistance an automated tool would provide.
> I've often wanted something that would help globally change
> things like function
On 2013-06-23 20:22, Roy Smith wrote:
> In article ,
> ru...@yahoo.com wrote:
>> Other things like finding all uses of various objects/functions
>> etc would also be useful now and then but I suppose that is a
>> common IDE capability?
>
> $ find . -name '*.py' | xargs grep my_function_name
>
>
On Sun, 23 Jun 2013 13:09:21 -0600, Ian Kelly wrote:
> On Sun, Jun 23, 2013 at 12:50 PM, Steven D'Aprano
> wrote:
>> What else would you call a function that does lookups on the current
>> object's superclasses?
>
> Well, as James Knight points out in the "Super Considered Harmful"
> article, th
In article ,
Tim Chase wrote:
> I'd wager money that Emacs allows you to do something similar,
I'm sure it can. But, the next step in the evolution is:
$ emacs `find . -name '*.py' | xargs grep -l my_function_name`
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 23 Jun 2013 15:24:14 -0400, Roy Smith wrote:
> In article <51c74373$0$2$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>> What else would you call a function that does lookups on the current
>> object's superclasses?
>
> Well, mro_lookup() would have been a better c
In article <51c7a087$0$2$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Sun, 23 Jun 2013 15:24:14 -0400, Roy Smith wrote:
>
> > In article <51c74373$0$2$c3e8da3$54964...@news.astraweb.com>,
> > Steven D'Aprano wrote:
>
> >> What else would you call a function that
On 06/23/2013 02:40 PM, cutems93 wrote:
> What else do I need? Also, which software is used in daily base? I
> know version control software and bug tracking software are used
> almost everyday by developers. Which software is used less often?
Phew that's quite a list you have there. Are you comi
Στις 24/6/2013 1:29 πμ, ο/η ru...@yahoo.com έγραψε:
In this simple example, there is not much advantage of Mako
over your templates. But with more complicated cases, for
instance, when you have tables or forms that you want to
dynamically construct from external data (info extracted
from a datab
On 23/06/2013 18:29, Steven D'Aprano wrote:
On Sat, 22 Jun 2013 23:40:53 -0600, Ian Kelly wrote:
[...]
Can you elaborate or provide a link? I'm curious to know what other
reason there could be for magic methods to behave differently from
normal methods in this regard.
It's an efficiency opti
On Monday, June 24, 2013 5:58:03 AM UTC+5:30, Steven D'Aprano wrote:
> On Sun, 23 Jun 2013 13:40:07 -0700, cutems93 wrote:
> > What else do I need?
> You don't *need* any of these. You only *need* two things to write Python
> code: something to edit text files, and the Python interpreter to che
On Monday, June 24, 2013 4:48:35 AM UTC+5:30, ru...@yahoo.com wrote:
> On 06/23/2013 02:40 PM, cutems93 wrote:
> > 1. Automated Refactoring Tools
>
> I wish.
Here's pydev [python ide in eclipse]
http://pydev.org/manual_adv_refactoring.html
Note Ive never managed to get it running!
--
http://ma
I'm using 2.7
--
http://mail.python.org/mailman/listinfo/python-list
On 06/23/2013 07:44 PM, Νίκος wrote:
> Why use mako's approach which requires 2 files(an html template and the
> actual python script rendering the data) when i can have simple print
> statements inside 1 files(my files.py script) ?
> After all its only one html table i wish to display.
Sooner o
On Monday, June 24, 2013 10:07:57 AM UTC+5:30, Michael Torrie wrote:
> On 06/23/2013 07:44 PM, Νίκος wrote:
>
> > Why use mako's approach which requires 2 files(an html template and the
> > actual python script rendering the data) when i can have simple print
> > statements inside 1 files(my fil
On Sunday, June 23, 2013 4:40:07 PM UTC-4, cutems93 wrote:
> Hello,
>
>
>
> I am new to python development and I want to know what kinds of tools people
> use for python development. I went to Python website and found [12 different
> types of] tools.
> What else do I need? Also, which softw
On Sunday, June 23, 2013 1:40:07 PM UTC-7, cutems93 wrote:
> Hello,
>
>
>
> I am new to python development and I want to know what kinds of tools people
> use for python development. I went to Python website and found several tools.
>
>
>
> 1. Automated Refactoring Tools
>
> 2. Bug Tracki
Ahoj,
Am 23.06.13 18:06, schrieb JK:
Nazdar mládenci,
this is an English (only) speaking group. Therefore you will not get
much response by posting in Czech.
měl bych zájem dokončit překlad Tkinteru
(http://tkinter.programujte.com/index.htm), na kterém před šesti lety
pracovali zejména Pav
On Monday, June 24, 2013 11:04:48 AM UTC+5:30, cutems93 wrote:
> Alright. Thanks everyone for your responses. I just want to know what tools
> are GENERALLY used by professional developers. I am helping somebody who
> wants to know about software that he might use in his project. He does not
> k
rusi writes:
> I dont know what you mean my 'scripting'
Any time someone has shown me a “Python script”, I don't see how it's
different from what I'd call a “Python program”. So I just mentally
replace “scripting with “programming”.
--
\ “Dvorak users of the world flgkd!” —Kirst
On Mon, 24 Jun 2013 02:53:06 +0100, Rotwang wrote:
> On 23/06/2013 18:29, Steven D'Aprano wrote:
>> On Sat, 22 Jun 2013 23:40:53 -0600, Ian Kelly wrote:
>>> [...]
>>>
>>> Can you elaborate or provide a link? I'm curious to know what other
>>> reason there could be for magic methods to behave diff
On Monday, June 24, 2013 11:50:38 AM UTC+5:30, Ben Finney wrote:
> rusi writes:
>
> > I dont know what you mean my 'scripting'
>
> Any time someone has shown me a “Python script”, I don't see how it's
> different from what I'd call a “Python program”. So I just mentally
> replace “scripting wit
59 matches
Mail list logo