Am 26.09.19 um 08:34 schrieb ast:
Hello
A line of code which produce itself when executed
>>> s='s=%r;print(s%%s)';print(s%s)
s='s=%r;print(s%%s)';print(s%s)
Thats funny !
This is called a "quine" and there exist several methods how to do this.
https://en.wikipedia.org/wiki/Quine_(computin
Hi
How do I publish a message of the qspinbox value when the qspinbox sets the
slider with corresponding value.
Thanks
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'laser.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this fi
I have some sample/demo python code for scrolling and outputting text
onto a 16x2 lcd display.
I would like to put my own message or text outputting to the lcd on 2
lines. I have tried using lcd.message('my message',1) and
lcd.message('my message', 2), but the output says:
TypeError: message
On 26/09/19 9:14 PM, RobH wrote:
I have some sample/demo python code for scrolling and outputting text
onto a 16x2 lcd display.
I would like to put my own message or text outputting to the lcd on 2
lines. I have tried using lcd.message('my message',1) and
lcd.message('my message', 2), but the
On 26/09/2019 11:08, DL Neil wrote:
On 26/09/19 9:14 PM, RobH wrote:
I have some sample/demo python code for scrolling and outputting text
onto a 16x2 lcd display.
I would like to put my own message or text outputting to the lcd on 2
lines. I have tried using lcd.message('my message',1) and
On 26 Sep 2019 10:28, Christian Gollwitzer wrote:
Am 26.09.19 um 08:34 schrieb ast:
> Hello
>
> A line of code which produce itself when executed
>
> >>> s='s=%r;print(s%%s)';print(s%s)
> s='s=%r;print(s%%s)';print(s%s)
>
> Thats funny !
==> Also impressive, a 128-language quine:
https://git
Hello
In the following code found here:
https://www.pythonsheets.com/notes/python-object.html
__init__ is not invoked when we create an object
with "o = ClassB("Hello")". I don't understand why.
I know the correct way to define __new__ is to write
"return object.__new__(cls, arg)" and not "retur
On 26/09/2019 13:20, ast wrote:
Hello
In the following code found here:
https://www.pythonsheets.com/notes/python-object.html
__init__ is not invoked when we create an object
with "o = ClassB("Hello")". I don't understand why.
I know the correct way to define __new__ is to write
"return object.
Le 26/09/2019 à 14:20, ast a écrit :
Hello
In the following code found here:
https://www.pythonsheets.com/notes/python-object.html
__init__ is not invoked when we create an object
with "o = ClassB("Hello")". I don't understand why.
I know the correct way to define __new__ is to write
"return ob
On 26/09/2019 11:58, RobH wrote:
Thanks, but was is Python REPR.
DL was referring to the interactive program you get when you type
"python" at a Linux or Windows command prompt. Here's an example,
copied from my Linux box:
rhodri@scrote:~$ python
Python 2.7.15+ (default, Jul 9 2019, 16:51
ast wrote:
> Hello
>
> In the following code found here:
> https://www.pythonsheets.com/notes/python-object.html
>
> __init__ is not invoked when we create an object
> with "o = ClassB("Hello")". I don't understand why.
> I know the correct way to define __new__ is to write
> "return object.__ne
Hello list.
This little program should print the location of all
my installed Python packages:
-- 8< -- 8< ---
import pip
try:
packages = pip.get_installed_distributions (local_only=False, skip=())
except AttributeError:
import pkg_resources # Python3
packages = pkg_
Hello,
I tried to set a value from setCmd. Execution doesn't return any error but the
snmp request is not sent !
g = setCmd(SnmpEngine()
, CommunityData('public', mpModel=1)
, UdpTransportTarget(('x.x.x.x', 161))
, ContextData()
, ObjectType(ObjectIdentity('1.3.6.1.2.1.2.2.1.7.364904448'), int('1'
On Thu, Sep 26, 2019 at 9:01 PM RobH wrote:
>
> import Adafruit_CharLCD as LCD
>
>
> # Raspberry Pi pin configuration:
Ah, it's an RPi with Adafruit. That's the same library that my brother
uses. I don't know much of the details, but in case it's helpful,
here's the code that currently runs his s
On Thu, 26 Sep 2019 at 14:19, Peter Otten <__pete...@web.de> wrote:
>
> __init__ is called only if __new__ returns an instance of ClassB:
>
> """
> /* If the returned object is not an instance of type,
>it won't be initialized. */
> if (!PyType_IsSubtype(Py_TYPE(obj), type))
>
On Thu, 26 Sep 2019 at 13:39, Rhodri James wrote:
>
> On 26/09/2019 13:20, ast wrote:
> >
> > >>> class ClassB(object):
> > ... def __new__(cls, arg):
> > ... print('__new__ ' + arg)
> > ... return object
> > ... def __init__(self, arg):
> > ... print('__init__ ' +
On 26/09/2019 15:35, Oscar Benjamin wrote:
On Thu, 26 Sep 2019 at 13:39, Rhodri James wrote:
You have returned the class object, not
an instance of anything,
Well object is an instance of object as well as of type:
Fair point. I keep forgetting that.
--
Rhodri James *-* Kynesim Ltd
--
http
Le 26/09/2019 à 15:17, Peter Otten a écrit :
ast wrote:
__init__ is called only if __new__ returns an instance of ClassB:
I was ignoring that. thank you
--
https://mail.python.org/mailman/listinfo/python-list
On 26/09/2019 12:55, Rhodri James wrote:
On 26/09/2019 11:58, RobH wrote:
Thanks, but was is Python REPR.
DL was referring to the interactive program you get when you type
"python" at a Linux or Windows command prompt. Here's an example,
copied from my Linux box:
rhodri@scrote:~$ python
P
Skip Montanaro writes:
> How about just replacing *\(([^)]*)\)* with *"\1"* in a wrapper class's
> line reading method? (I think I have the re syntax approximately right.)
> The csv reader will "just work". Again, nesting parens not allowed.
>
> Skip
here is some working code:
def PReader(csvfi
On 26/09/2019 15:22, Chris Angelico wrote:
On Thu, Sep 26, 2019 at 9:01 PM RobH wrote:
import Adafruit_CharLCD as LCD
# Raspberry Pi pin configuration:
Ah, it's an RPi with Adafruit. That's the same library that my brother
uses. I don't know much of the details, but in case it's helpful,
h
On 26/09/2019 17:51, Dennis Lee Bieber wrote:
On Thu, 26 Sep 2019 11:58:15 +0100, RobH declaimed the
following:
import Adafruit_CharLCD as LCD
FYI: from Adafruit's download site:
https://github.com/adafruit/Adafruit_Python_CharLCD
"""
DEPRECATED LIBRARY. Adafruit Python CharLCD
T
On 26/09/2019 20:21, RobH wrote:
On 26/09/2019 17:51, Dennis Lee Bieber wrote:
On Thu, 26 Sep 2019 11:58:15 +0100, RobH declaimed
the
following:
import Adafruit_CharLCD as LCD
FYI: from Adafruit's download site:
https://github.com/adafruit/Adafruit_Python_CharLCD
"""
DEPRECATED LIBR
On 27/09/19 7:21 AM, RobH wrote:
On 26/09/2019 17:51, Dennis Lee Bieber wrote:
On Thu, 26 Sep 2019 11:58:15 +0100, RobH declaimed
the
following:
...
Check out this guide for info on using character LCDs with the
CircuitPython library:
https://learn.adafruit.com/character-lcds/python-circuit
Hi,
I use python on Debian, when running some python codes, I meet the
following error:
---
input_username.py", line 18, in read_input
if msvcrt.kbhit():
NameError: name 'msvcrt' is not defined
How to solve this issue?
--
https://mail.python.org/mailman/listinfo/pyt
On 2019-09-27 03:14, Hongyi Zhao wrote:
Hi,
I use python on Debian, when running some python codes, I meet the
following error:
---
input_username.py", line 18, in read_input
if msvcrt.kbhit():
NameError: name 'msvcrt' is not defined
How to solve this issue?
That
Gisle Vanem writes:
> ... pip list ...
> But for my Python 3.6 installation, it claims I have
> an '-ip' package:
> -ip-> f:\programfiler\python36\lib\site-packages
>
> I fail to find one, but I do have a:
> f:\programfiler\python36\lib\site-packages\~ip-19.1.1.dist-info
>
> directory wi
27 matches
Mail list logo