Re: Aw: Re: Re: Re: stuck on time

2019-12-08 Thread Ethan Furman

On 12/08/2019 06:32 AM, Python wrote:


Well... Maybe it's time to admit, Rob, that programming is not
your thing.


Rob, my apologies.  Whoever this person is, they are not "Python", and their 
behavior will not be tolerated.

"Python", if you don't want to help then remain silent.  If you don't want to 
be frustrated, stop reading the thread.
Rude behavior will not be tolerated.  Consider this your one warning.

--
~Ethan~
Python List Moderator
--
https://mail.python.org/mailman/listinfo/python-list


Re: Aw: Re: Re: Re: stuck on time

2019-12-08 Thread Chris Angelico
On Mon, Dec 9, 2019 at 1:56 AM RobH  wrote:
> Thanks, but I am only using the code which someone else has written, and
> apparently it works ok for them and others but not for me.
>
> I only came here to find out why, and that is why I posted the link to
> the code, which I thought would be helpful to anyone who wishes to reply.
>
> I know I am not a python programmer, although have done some VB
> programming years ago.

"Not a Python programmer" is something that can easily be changed :)
Python's an easy language to pick up, and since you have some
programming experience already, even easier. If you have half an hour
- maybe a whole hour to be on the safe side - just work your way
through the tutorial and get that "ah ha" moment as you figure out
what's actually happening here. You'll unlock a ton of coolness! :)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Aw: Re: Re: Re: stuck on time

2019-12-08 Thread RobH

On 08/12/2019 14:39, Chris Angelico wrote:

On Mon, Dec 9, 2019 at 1:36 AM Python  wrote:


RobH wrote:

On 08/12/2019 13:06, Karsten Hilbert wrote:

In an interactive interpreter:

def print_time():
   current_time = time.strftime("%I:%M")


What happens if you then do

print_time()



print_time()
on it's own returns NameError: name 'print_time' is not defined


Notice the "then" above ?

More precisely: directly one after the other without leaving the
interpreter ...

Karsten


I'm not sure what you mean.

Like this?
  >>>print_time()
Traceback (most recent call last)
File "stdin>", line 1, in 
File "stdin>", line 2, in print_time
File "stdin>", line 2, in print_time
File "stdin>", line 2, in print_time
[Previous line  repeated 996 more times]
RecursionError: maximum recursion depth excedded.

Running the code in a shell , it is displaying the time and now also the
date .
Nothing else tho', as in no rectangle drawn


Well... Maybe it's time to admit, Rob, that programming is not
your thing.



That's rude and uncalled for, and since you're hiding behind
anonymity, you're painting your newsgroup server in a bad light (it's
proxad.net if anyone's curious).

Rob, I recommend working through a Python tutorial. There are some
subtleties to what you're doing that would best be discovered through
experimentation, and a good tutorial will help with that. Try this
one:

https://docs.python.org/3/tutorial/index.html

ChrisA



Thanks, but I am only using the code which someone else has written, and 
apparently it works ok for them and others but not for me.


I only came here to find out why, and that is why I posted the link to 
the code, which I thought would be helpful to anyone who wishes to reply.


I know I am not a python programmer, although have done some VB 
programming years ago.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Aw: Re: Re: Re: stuck on time

2019-12-08 Thread Chris Angelico
On Mon, Dec 9, 2019 at 1:36 AM Python  wrote:
>
> RobH wrote:
> > On 08/12/2019 13:06, Karsten Hilbert wrote:
> > In an interactive interpreter:
> >
> > def print_time():
> >   current_time = time.strftime("%I:%M")
> 
>  What happens if you then do
> 
>  print_time()
> 
> >>>
> >>> print_time()
> >>> on it's own returns NameError: name 'print_time' is not defined
> >>
> >> Notice the "then" above ?
> >>
> >> More precisely: directly one after the other without leaving the
> >> interpreter ...
> >>
> >> Karsten
> >>
> > I'm not sure what you mean.
> >
> > Like this?
> >  >>>print_time()
> > Traceback (most recent call last)
> > File "stdin>", line 1, in 
> > File "stdin>", line 2, in print_time
> > File "stdin>", line 2, in print_time
> > File "stdin>", line 2, in print_time
> > [Previous line  repeated 996 more times]
> > RecursionError: maximum recursion depth excedded.
> >
> > Running the code in a shell , it is displaying the time and now also the
> > date .
> > Nothing else tho', as in no rectangle drawn
>
> Well... Maybe it's time to admit, Rob, that programming is not
> your thing.
>

That's rude and uncalled for, and since you're hiding behind
anonymity, you're painting your newsgroup server in a bad light (it's
proxad.net if anyone's curious).

Rob, I recommend working through a Python tutorial. There are some
subtleties to what you're doing that would best be discovered through
experimentation, and a good tutorial will help with that. Try this
one:

https://docs.python.org/3/tutorial/index.html

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Aw: Re: Re: Re: stuck on time

2019-12-08 Thread Python

RobH wrote:

On 08/12/2019 13:06, Karsten Hilbert wrote:

In an interactive interpreter:

def print_time():
  current_time = time.strftime("%I:%M")


What happens if you then do

print_time()



print_time()
on it's own returns NameError: name 'print_time' is not defined


Notice the "then" above ?

More precisely: directly one after the other without leaving the 
interpreter ...


Karsten


I'm not sure what you mean.

Like this?
 >>>print_time()
Traceback (most recent call last)
File "stdin>", line 1, in 
File "stdin>", line 2, in print_time
File "stdin>", line 2, in print_time
File "stdin>", line 2, in print_time
[Previous line  repeated 996 more times]
RecursionError: maximum recursion depth excedded.

Running the code in a shell , it is displaying the time and now also the 
date .

Nothing else tho', as in no rectangle drawn


Well... Maybe it's time to admit, Rob, that programming is not
your thing.


--
https://mail.python.org/mailman/listinfo/python-list


Re: Aw: Re: Re: Re: stuck on time

2019-12-08 Thread RobH

On 08/12/2019 13:06, Karsten Hilbert wrote:

In an interactive interpreter:

def print_time():
  current_time = time.strftime("%I:%M")


What happens if you then do

print_time()



print_time()
on it's own returns NameError: name 'print_time' is not defined


Notice the "then" above ?

More precisely: directly one after the other without leaving the interpreter ...

Karsten


I'm not sure what you mean.

Like this?
>>>print_time()
Traceback (most recent call last)
File "stdin>", line 1, in 
File "stdin>", line 2, in print_time
File "stdin>", line 2, in print_time
File "stdin>", line 2, in print_time
[Previous line  repeated 996 more times]
RecursionError: maximum recursion depth excedded.

Running the code in a shell , it is displaying the time and now also the 
date .

Nothing else tho', as in no rectangle drawn
--
https://mail.python.org/mailman/listinfo/python-list


Aw: Re: Re: Re: stuck on time

2019-12-08 Thread Karsten Hilbert
> >> In an interactive interpreter:
> >>
> >> def print_time():
> >>  current_time = time.strftime("%I:%M")
> >
> > What happens if you then do
> >
> > print_time()
> >
>
> print_time()
> on it's own returns NameError: name 'print_time' is not defined

Notice the "then" above ?

More precisely: directly one after the other without leaving the interpreter ...

Karsten

-- 
https://mail.python.org/mailman/listinfo/python-list