Luke Paireepinart wrote:
> vanam wrote:
>
>> For standard input from the keyboard raw_input will be used for string
>> and input for number.Suppose i want to input a list of some elements
>> how could it be done. Actually i am looking for sorting out elements
>> in a list.Below is the given s
János Juhász wrote:
> I wanted to test how can I response in a thread.
>
> All of my earlier responses started new threads in this list like this
> http://mail.python.org/pipermail/tutor/2007-January/052169.html.
>
> Have I remove the '[Tutor]' or '[Tutor] ' from the subject of the response
> ?
Kim Branson wrote:
> Hi i'm interested in implementing a factoryclass in python
>
> What i'd like to do is have my factoryClass produce an instance of a
> class with some methods defined in arguments to the factory class.
>
> The classes that are produced have many common methods, but a single
"Kim Branson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi i'm interested in implementing a factoryclass in python
>
> What i'd like to do is have my factoryClass produce an instance of a
> class with some methods defined in arguments to the factory class.
>
> The classes that
Technically, you don't need metaclasses probably:
class A(object):
def methA(self, abc):
pass
def methB(self, def, ghi):
pass
def defaultMethod(self):
raise UnknownMethodError()
def __init__(self, methodName):
self._calc = getattr(self, "meth%s" % me
Am 22.01.2007 um 10:23 schrieb ALAN GAULD:
Forwarding to list.
--- Tony Cappellini <[EMAIL PROTECTED]> wrote:
They need to start Applications-Utilities->Terminal
It turned out that the users needed to change the
permissions to +x, then the script would be
invoked normally.
Ah, but you spe
Hi i'm interested in implementing a factoryclass in python
What i'd like to do is have my factoryClass produce an instance of a
class with some methods defined in arguments to the factory class.
The classes that are produced have many common methods, but a single
unique method. This method ac
Dear Linda,
> I have a segment (two ending points are A and B) which is 0 degree.
> How to draw a segment with 10 degrees and 15 in length?
It is very simple with complex numbers:
import math
class vect:
## begin and end are tuples (x, y)
## and represented as complex numbers
def __i
Hi folks,
I am trying to save a tkinter canvas using canvas.postscript() method...
The thing works fine when the canvas size is small; but it gets cut (from
the top and left side) when the size increases..
Here is the code:
c.postscript(file=filename,height = canvas_height,width =
canvas_width,
On Mon, 22 Jan 2007 17:47:14 -
"Alan Gauld" <[EMAIL PROTECTED]> wrote:
>
> "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello Folks,
> >
> > Is it possible to add a Label to tkinter canvas or i'll need to use
> > create_text method ?
>
> What exactly
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello Folks,
>
> Is it possible to add a Label to tkinter canvas or i'll need to use
> create_text method ?
What exactly do you expect a label in a canvas to do?
Or to look like?
You can attach a label to a canvas
"Steve Nelson" <[EMAIL PROTECTED]> wrote
> def getSize(fn):
> """Get the size of a file in kb"""
> fp = os.path.join(wp, fn)
> if os.path.isfile(fp):
>return os.stat(fp).st_size
One problem with all of these is that you only return
a value if it is a file. If its not a file you return N
> Actually, I started off with a dictionary with a bunch of parameters. To
> give you some background, I writing my
> first GUI, and using the parameters in a dictionary to control what box the
> GUI displays next. So, it looks
> something that looks like this:
>
> data={'position':'middle',
>
On 1/18/07, Danny Yoo <[EMAIL PROTECTED]> wrote:
> Rather than storing your data as variables, you could store it in a
> dictionary. Then you can dynamically access data however you like..
Suggesting a dictionary here is right.
** Stuff deleted about why using variables of variables is bad **
Hello Folks,
Is it possible to add a Label to tkinter canvas or i'll need to use
create_text method ?
Thanks in anticipation..
Best Regards,
Asrarahmed Kadri
--
To HIM you shall return.
___
Tutor maillist - Tutor@python.org
http://mail.python.or
At 01:56 AM 1/22/2007, ALAN GAULD wrote:
>--- Dick Moores <[EMAIL PROTECTED]> wrote:
>
> > > ...Is the answer to put all 3 functions inside one big
> > > one?
> > >
> > Probably not, its more likely to be a small function
> > that checks its input parameters and calls one of
> > the 3 worker funct
linda.s wrote:
> I have a segment (two ending points are A and B) which is 0 degree.
> How to draw a segment with 10 degrees and 15 in length?
Presumably you mean, how to draw a segment on screen? Are you using a
GUI toolkit? Which one?
Kent
___
Tutor
Steve Nelson wrote:
> Hello,
>
> See below a program that will go through a directory and for each file
> print user, group, size and md5sum.
>
> A few questions:
>
> 1) It seems to fall over if I pass "." as a directory - how can I stop this?
Falls over how?
> 2) When I wrote the methods I de
Forwarding to list.
--- Tony Cappellini <[EMAIL PROTECTED]> wrote:
> >>They need to start Applications-Utilities->Terminal
> It turned out that the users needed to change the
> permissions to +x, then the script would be
> invoked normally.
Ah, but you specifically said it was a command
line
Hello,
See below a program that will go through a directory and for each file
print user, group, size and md5sum.
A few questions:
1) It seems to fall over if I pass "." as a directory - how can I stop this?
2) When I wrote the methods I decided to do isafile() checks there,
but subsequently rea
vanam wrote:
> For standard input from the keyboard raw_input will be used for string
> and input for number.Suppose i want to input a list of some elements
> how could it be done. Actually i am looking for sorting out elements
> in a list.Below is the given script
> list = [45,4,5]
> list.sort(
"vanam" <[EMAIL PROTECTED]> wrote
> For standard input from the keyboard raw_input will be used for
> string and
> input for number.
input can read more than numbers. It will take whatever you type
and try to evaluate it as a Python expression. That's why input is
so dangerous and should be avoi
Dave S wrote:
> Hi all,
>
> My GUI app dumps some diagnostic output to the terminal, starting it from an
> XP terminal, all is well.
>
> Starting it as app.pyw so no terminal is needed - and err - the app randomly
> locks because the diagnostic output is - backing up ?
Hmm, maybe check where sys.
linda.s wrote:
> I have a segment (two ending points are A and B) which is 0 degree.
> How to draw a segment with 10 degrees and 15 in length?
>
You'll need a pen, some paper, a protractor, a ruler, and a steady hand.
Good luck.
-Luke
___
Tutor mailli
For standard input from the keyboard raw_input will be used for string and
input for number.Suppose i want to input a list of some elements how could
it be done. Actually i am looking for sorting out elements in a
list.Belowis the given script
list = [45,4,5]
list.sort()
for y in list:
print y -
25 matches
Mail list logo