On 01/08/2019 23:10, nathan tech wrote:
>
> import speedtest
This is not a standard library module so I have no idea
what it does so obviously there could be magic afoot of
which I am unaware. But assuming it behaves like most
Python code...
> def do-test():
> test=speedtest.Speedtest()
> t
Hi there,
I wondered if someone wouldn't mind just taking two seconds to make sure
i understand this concept:
Here is a code snippet:
import speedtest
def do-test():
test=speedtest.Speedtest()
test.download()
test.upload()
return [test.download_speed, test.upload_speed]
Now. If I
maybe a copy/paste of your terminal session so we can see the text of the steps
you are actually performing will give use some clues.
—
David
> On Aug 1, 2019, at 18:22, David L Neil wrote:
>
> On 2/08/19 3:23 AM, Spencer Wannemacher wrote:
>> I'm new to python and I was trying to perform a si
On 2/08/19 3:23 AM, Spencer Wannemacher wrote:
I'm new to python and I was trying to perform a simple one code. All that is
included in the code is print(61). I save it as 61.py and change the directory
before typing in python 61.py and I don't get an output. There is no error and
the output i
On 01Aug2019 15:23, Spencer Wannemacher wrote:
I'm new to python and I was trying to perform a simple one code. All
that is included in the code is print(61). I save it as 61.py and
change the directory before typing in python 61.py and I don't get an
output. There is no error and the output i
I'm new to python and I was trying to perform a simple one code. All that is
included in the code is print(61). I save it as 61.py and change the directory
before typing in python 61.py and I don't get an output. There is no error and
the output is blank. Please let me know what I'm doing wrong.
Hi I solve my problem,
the decorator need to be above the function not when executed. :)
Thanks for reading.
:)
On Thu, Aug 1, 2019 at 8:42 PM Steven D'Aprano wrote:
> On Thu, Aug 01, 2019 at 05:11:04PM +0800, Sinardy Xing wrote:
>
> > I have error look like in the wrapper.
> >
> > Can some
Hi Steven,
Thanks for your reply, I was copy and paste the code in the email as a text.
I dont know why it becoming photo or screen shot when you view it ?
When I run the module individually it is no error only when I use as
decorator I have error.
$ cat mainapp.py
from loggingme import logme
Hi everyone,
I'm a developer with just over 10 years' experience under my belt. I've
worked with many languages and frameworks, including the popular Django web
framework.
I'm currently in the market for remote opportunities. Please reply if
looking for a resource. Serious enquiries only please.
Sinardy Xing wrote:
> following is my main app
>
> -- start here--
> from loggingme import logme
>
> def say_hello(name, age):
> print('Hello {}, I am {}'.format(name, age))
>
> #say_hello=logme(say_hello('Sinardy'))
> @logme
> say_hello('Tonny', 8)
Isn't this a SyntaxError? You can de
On 01/08/2019 10:11, Sinardy Xing wrote:
> start here---
>
> import logging
>
> ..snip...
> from functools import wraps
>
> def logme(func_to_log):
> import logging
You don't need the import, it's already done in the first line.
> #Check log level within understanable paramet
On Thu, Aug 01, 2019 at 05:11:04PM +0800, Sinardy Xing wrote:
> I have error look like in the wrapper.
>
> Can someone point to me where is the issue
No, but you can.
When the error occurs, Python will print a traceback containing a list
of the lines of code being executed, and the final error
Hi,
I am learning to create python logging.
My goal is to create a logging module where I can use as decorator in my
main app
following is the logging code
start here---
import logging
#DEBUG: Detailed information, typically of interest only when
diagnosing problems.
#INFO : Conf
On 31/07/2019 18:57, Gursimran Maken wrote:
> Anyone could please let me know the difference between decorators and
> inheritance in python.
>
> Both are required to add additional functionality to a method then why are
> we having 2 separate things in python for doing same kind of work.
Inherit
Hi,
Anyone could please let me know the difference between decorators and
inheritance in python.
Both are required to add additional functionality to a method then why are
we having 2 separate things in python for doing same kind of work.
Thank you,
Gursimran
15 matches
Mail list logo