Hi Eli!
You have a lot of calls to input() in your code.
When requesting help on input you get the following output:
>>> help(input)
Help on built-in function input:
input(...)
input([prompt]) -> value
Equivalent to eval(raw_input(prompt)).
As you can see, the data you input is put
I am reading "Python Programming for the absolute beginner" and am on chapter 4 challenges.It says to create a program to let the player guess letters of the word (I haven't tried to incorporate a guess limit yet like it says)
my program looks fine to me, but I get a fat juicy error when I run itMy
Francesco A. Queirolo wrote:
> Sorry about the double post but the first one was sent before I was
> completed with my question.
>
> I have the following directory structure on Windows XP running python
> 2.4.2 final:
>
> JavaInheritancePoly\
>HierarchicalInheritancePoly.py
>
There is a reliable way to compute the exact number of floating-point "intervals" (one less than the number of FP numbers) between any two FP numbers. It is a long-ago solved problem. I have attached a C++ version. You can't define closeness by a "distance" in a FP system - you should use this
Sorry about the double post but the first one was sent before I was
completed with my question.
I have the following directory structure on Windows XP running python
2.4.2 final:
JavaInheritancePoly\
HierarchicalInheritancePoly.py
Animals\
Kent:
Overriding the accept() is an excellent idea. It looks more elegant than my original thinking of "total" subclassing.
Thanks a lot; I have learned a great deal from you.
Kenny
On 2/13/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Kenny Li wrote:> Yep! I think that is what I want. I did no
Kenny Li wrote:
> Yep! I think that is what I want. I did not know enough to do (inside
> C.__init__() ):
> arg1.__class__=C
>
> As to my intent, I want to subclass socket.socket. By doing so, I may
> get a socket (instance of my baseClass) after it (my subclass) accepts
> an incoming
Sorry, keep forgetting "reply-all"-- Forwarded message --From: Kenny Li <[EMAIL PROTECTED]
>Date: Feb 13, 2006 11:00 AMSubject: Re: [Tutor] Instantiate a subClass using an instance of its baseClassTo: Kent Johnson <[EMAIL PROTECTED]>
Yep! I think that is what I want. I did not know
I have looked at several "ide's" but still haven't found a true newbie
python editor mainly need code completion and maybe drop in code like a
wisiwig html editor would give me.
I am looking at python for basically network admin scripts.
If anyone knows of one I would really appreciate a link. By
On Mon, 13 Feb 2006, [ISO-8859-1] J?nos Juh?sz wrote:
> Is it any way to translate the sort DOS filename to the long NTSF one with
> python ?
You'll have to expand on this to handle files other than current
directory, but basically:
>>> win32api.FindFiles("FILEWI~1.TXT")[0][8]
'FileWithALongFil
Kenny Li wrote:
> Kent:
>
> I forgot to mention that no coping is allowed. Your two options
> essentially are doing copying of the b.
Not really. I make new references to the attributes of b.
It sounds like you want
c = C(b)
to actually convert b to be an instance of C, instead of creating
| From: Josiah Carlson <[EMAIL PROTECTED]>
| "Alan Gauld" <[EMAIL PROTECTED]> wrote:
|| However I do dislike the name nice() - there is already a nice() in
|| the
|| os module with a fairly well understood function.
perhaps trim(), nearly(), about(), defer_the_pain_of() :-) I've waited to think
Kent:
I forgot to mention that no coping is allowed. Your two options essentially are doing copying of the b.
Furthermore, let's say, I don't even know the inside details of B, for example, I subclass the socket.socket,
and I got a client socket after it accepting an incoming connection, and I
Thanks Andre,
The problem came from my wrong script calling.
Python is just fine :)
I corrected it, and I can call it now with
"""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\Shell\Flat2Xls\Command]
@="python \"D:\\devel\\xlsxml.py\" \"%1\""
"""
In this case there is a new menu
János Juhász wrote:
> Hi,
>
> I want to pass args to my python script on XP.
> This code
> print 'argv[0] %s' % sys.argv[0]
> print 'argv[1] %s' % sys.argv[1]
> print 'argv[2] %s' % sys.argv[2]
>
> shows this:
> argv[0] D:\devel\home\devel\python\db\xlsxml.py
> argv[1] "K:\IT\admin\test\Flat
> ar
On 2/13/06, János Juhász <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to pass args to my python script on XP.
> This code
> print 'argv[0] %s' % sys.argv[0]
> print 'argv[1] %s' % sys.argv[1]
> print 'argv[2] %s' % sys.argv[2]
>
> shows this:
> argv[0] D:\devel\home\devel\python\db\xlsxml.py
> argv[
Hi,
I want to pass args to my python script on XP.
This code
print 'argv[0] %s' % sys.argv[0]
print 'argv[1] %s' % sys.argv[1]
print 'argv[2] %s' % sys.argv[2]
shows this:
argv[0] D:\devel\home\devel\python\db\xlsxml.py
argv[1] "K:\IT\admin\test\Flat
argv[2] Files\2006\06.02.2006-293753-gy"
but
Kenny Li wrote:
> *class B(object): *
> *''' the baseClass '''*
> *def __init__(self, arg1, arg2):*
> *self.a1=arg1*
> *self.a2=arg2*
> * *
> *class C(B): *
> *''' C is subClass of B '''*
> *def __init__(self, arg1, arg2):*
> *B.__init__(self, ar
Hi Shuying!
Shuying Wang wrote:
> Hi,
>
> I'm having problems understanding some code I came across:
>
> class Singleton:
> __single = None
> def __init__( self ):
> if Singleton.__single:
> raise Singleton.__single
> Singleton.__single = self
>
> What does
19 matches
Mail list logo