-reading-from-stdin/
Anyway, I set up msvcrt for now until I install linux - I'm not interested
in the program I mentioned, per se, just the error message - mainly to
know, generally, what sort of thing it's choking on. Errors are useful
On 5 May 2015 at 21:51, Mark Lawrence wrote:
> On 06/05/2015 05:30, Jim Mooney Py3.4.3winXP wrote:
>
>> On 5 May 2015 at 18:32, Steven D'Aprano wrote:
>>
>> https://code.activestate.com/recipes/577977-get-single-keypress/
>>>
>>
>>
>> Th
On 6 May 2015 at 10:41, Jim Mooney Py3.4.3winXP
wrote:
> I went a further step from the recipes linked to above and got here
>> https://pypi.python.org/pypi/readchar
>
>
> I think that's the one that failed for me
>
Addendum. That only failed in python 3.4. It worked
g
for special keys, some were printed as hex codes but some as letters. i.e.
F11 was b'\x85', but F9 and F10 were b'C' and b'D', so I assume the second
byte of some function keys just happens to map to utf-8 letters. Sure
enough, when I put in decoding again, F9 and F10
me?
def testid(K=10):
K += 10
return 'the ID is', id(K), K
*** Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600
32 bit (Intel)] on win32. ***
>>> testid()
('the ID is', 505991936, 20)
>>> testid()
('the ID is', 5
18263656, {'bonk': 'bonkitem'})
>>> testid('clonk')
('the ID is', 18263656, {'bonk': 'bonkitem', 'clonk': 'clonkitem'})
>>> testid('spam')
('th
On 7 May 2015 at 18:42, Dave Angel wrote:
> Python doesn't have pointers
So what is the difference between a python name and a pointer? I'm a bit
fuzzy on that.
--
Jim
"What a rotten, failed experiment. I'll start over. Maybe dogs instead of
mo
t;, err)
return None
vals = get_input()
if vals:
minimum, maximum, rows, columns = vals
try:
make_table(minimum, maximum, rows, columns)
except ValueError as err: # CATCH FUNCTION ERROR HERE INSTEAD OF IN
FUNCTION
print("Enter min before max.")
else:
but it didn't work. Could you
provide a simple example? Sometimes the docs are heavy slogging if you
don't already know what's what ;')
--
Jim
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https:
raise ZeroDivisionError('Here I am')
def call_error():
try:
make_error()
except:
print("How do I get the 'Here I am' message to print in the calling
routine?")
>>> call_error()
How do I get the 'Here I am' message t
helps.append(helper)
for helper in useful_helps:
print(helper.upper() + ':', helper.__doc__, '\n')
--
Jim
After not doing dishes for a week and washing spoon after spoon, fork after
fork, knife after knife - I suddenly understand the mathematical concept of
in
> x = 'shutil'
>>> import importlib
>>> importlib.__import__(x)
>>>
If I can get dir to accept x I can parse the output to get rid of the __xxx
stuff and print it out.
--
Jim
After not doing dishes for a week and washing spoon after spoon, fork after
fork, kni
On 19 May 2015 at 17:25, Jim Mooney Py3.4.3winXP
wrote:
>
> If I can get dir to accept x I can parse the output to get rid of the
> __xxx stuff and print it out.
>
By that I mean dir will give me a list of strings I can then use __doc__ on
to get all useful help items.
--
Ji
with
>
> print(attribute_name, attribute.__doc__)
>
Thanks. That will save a lot of scrolling - and saving scrolling and typing
is half the battle ;')
--
Jim
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription option
=ht)
ht.close()
def fprint(linelist, ht):
# size formatting irrelevant for HTML
formatted_string = "{}{}{}{}{}{}".format(*linelist)
print(formatted_string, file=ht)
print('', file=ht)
if __name__ == "__main__":
make_lines()
--
Jim
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
When an instance uses a class method, does it actually use the method that
is in the class object's memory space, or is the method copied to the
instance?
--
Jim
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription op
def getdata(self):
print(self.data)
>>> MyClass.setdata
>>> id(MyClass.setdata)
40676568
>>> f = MyClass()
>>> g = MyClass()
>>> id(f.setdata)
43576616
>>> id(g.setdata)
43576616
I am very new to programming and I have an assignment to have a raw_input
string that is inputted by the user and then is printed backwards.
Can anyone help me? I can get it to print regular but backwards in not
working.
Thank You
Jim
cookie program that randomly gives one fortune out of 5 to the
user.
Jim
- Original Message -
From:
Feziwe Mpondo
To: Alberto Troiano
Cc: [EMAIL PROTECTED] ; tutor@python.org
Sent: Wednesday, April 13, 2005 10:14
AM
Subject: Re: [Tutor] Python backwards
progr
How come when I ask it to print i[2:4] from an inputted string it
gives me the letters between two and four
But when I ask it to print i[-1:-4] it does not print anything.
Jim
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
Jim and Laura Ahl said unto the world upon 2005-04-14 02:09:> How
come when I ask it to print i[2:4] from an inputted string it> gives me
the letters between two and four> > But when I ask it to print
i[-1:-4] it does not print anything.> > Jim> Hi
Jim,good to see you
i = raw_input("Enter a word.")
print i[::-1]
raw_input("\n\nPress the enter key to exit.")
Thanks for allowing me to take some of your precious time.
Jim
- Original Message -
From:
Danny Yoo
To: [EMAIL PROTECTED]
Cc: Tutor
Sent: Thursday,
501 - 522 of 522 matches
Mail list logo