On Fri, 26 Nov 2010 18:33:07 +0100
Piotr Kamiński wrote:
> You can get the list of Python's standard modules by typing help()
> and then you will see something similar to:
Thanks a lot! This is what I was after!
Mac.
___
Tutor maillist - Tutor@pytho
Dnia 25-11-2010 o 13:20:22 Mac Ryan napisał(a):
On Thu, 25 Nov 2010 11:09:10 +0100
Timo wrote:
> I was wondering... apart from checking each name individually, is
> there any easy-peasy way to get a list of names used in the
> standard library (I am thinking to something like "dir()"?
Th
Alan Gauld wrote:
import random
>
> It tries to import itself, which then tries to import itself,
> which then. infinite loop time...
I think it's more like
- look up module random in sys.modules
- module random not found in sys.modules; locate the file random.py
- file random.py found
Well, you can try "import x", but your problem wasn't that you used the same
filename as some Python script on your path, the problem was you then tried to
import that other script. So to avoid infinite recursion, all you have to do
is avoid importing your own filename, which should be easy en
On Thu, 25 Nov 2010 11:09:10 +0100
Timo wrote:
> > I was wondering... apart from checking each name individually, is
> > there any easy-peasy way to get a list of names used in the
> > standard library (I am thinking to something like "dir()"?
> This is the webpage I always use for searchin
On 25-11-10 08:00, Mac Ryan wrote:
On Thu, 25 Nov 2010 00:58:23 +
Adam Bark wrote:
Ah yes always avoid giving your modules names that appear in the
standard library. It goes wrong, sometimes in unexpected ways.
I was wondering... apart from checking each name individually, is there
any ea
On Thu, 25 Nov 2010 00:58:23 +
Adam Bark wrote:
> Ah yes always avoid giving your modules names that appear in the
> standard library. It goes wrong, sometimes in unexpected ways.
I was wondering... apart from checking each name individually, is there
any easy-peasy way to get a list of nam
Thanks Adam and Alan for responding, I'm very much a non-programmer, but my
14 year old son wants to learn, so I have to learn to teach him...slow
process lol.
Happy Thanksgiving!
Jeff
On Wed, Nov 24, 2010 at 8:27 PM, Alan Gauld wrote:
>
> "Jeff Goodwin" wrote
>
> Ok, I found the problem, I h
"Jeff Goodwin" wrote
Ok, I found the problem, I had saved the file as random.py looks
like that
was a no-no. Its working now that I changed the name.
Yes that's a bad idea. You probably figured out why, but just in
case...
import random
It tries to import itself, which then tries to
On 24/11/10 22:10, Jeff Goodwin wrote:
Ok, I found the problem, I had saved the file as random.py looks like
that was a no-no. Its working now that I changed the name.
Thanks!
Jeff
Ah yes always avoid giving your modules names that appear in the
standard library. It goes wrong, sometimes in un
Ok, I found the problem, I had saved the file as random.py looks like that
was a no-no. Its working now that I changed the name.
Thanks!
Jeff
On Wed, Nov 24, 2010 at 5:06 PM, Jeff Goodwin wrote:
> Thanks Adam, that was a typo on my part, in the program the print is
> actually indented. Any other
Thanks Adam, that was a typo on my part, in the program the print is
actually indented. Any other suggestions?
Thanks again!
Jeff
On Wed, Nov 24, 2010 at 5:00 PM, Adam Bark wrote:
> On 24/11/10 21:51, Jeff Goodwin wrote:
>
> Hello,
>
> I'm trying to find a way to use the random.randint fu
On 24/11/10 21:51, Jeff Goodwin wrote:
Hello,
I'm trying to find a way to use the random.randint function to
generate a random number, but everytime I run the program it locks up
IDLE. Here is what I have so far:
import random
def main():
x = input("Enter a number: ")
y = input("Ente
Hello,
I'm trying to find a way to use the random.randint function to generate a
random number, but everytime I run the program it locks up IDLE. Here is
what I have so far:
import random
def main():
x = input("Enter a number: ")
y = input("Enter a different number: ")
z = random
14 matches
Mail list logo