Nachricht-
Von: Tutor [mailto:tutor-bounces+marcus.luetolf=bluewin...@python.org] Im
Auftrag von Alan Gauld via Tutor
Gesendet: Samstag, 18. Mai 2019 12:34
An: tutor@python.org
Betreff: Re: [Tutor] simple question about scope
On 18/05/2019 09:20, marcus lütolf wrote:
> in learning the princip
Dear experts
in learning the principles of Python I came across scope in the
control structure's section.
There I read the notion that variables createted inside a
control structute can't be seen or accessed from outside that
structure, Python would raise a Name Error.
However in for loops - al
dear experts,
while working through Alan C. Goulds excellent update on Learning to
Program I copied
the file echoinput.py from the Conversing with the user section:
import sys
inp = sys.stdin.readline()
while inp.strip != '':
print(inp)
inp = sys.stdin.readline()
many thanks, Peter
I could install the newest version of python 3.6 without
any problems but I need python 2.7 for tutorial purposes.
Marcus.
-Ursprüngliche Nachricht-
Von: peter [mailto:peterrisle...@gmail.com]
Gesendet: Montag, 27. November 2017 20:20
An: marcus lütolf
Betreff: Re
dear experts,
cleaning up my computer I removed all my different Python versions,
saving all .py and .txt files.
I could reinstall Python 3.6 but not Python 2.7, getting an error mesage:
a program required for this insatll could not be found.
Searching different websites I could not solve t
dear experts,
before I start digging into writing code I'd like your opinion:
Is it possible to have python compare 2 subsequent *.jpg images in
subtracting
the pixel values of the second from the first image.
If the images and are identical the result should be 0 and the first image
could b
ept KeyboardInterrupt:
> print('PIR deaktiviert')
Marcus.
-Ursprüngliche Nachricht-
Von: Mats Wichmann [mailto:m...@wichmann.us]
Gesendet: Montag, 10. April 2017 15:15
An: marcus lütolf ; tutor@python.org
Betreff: Re: [T
Dear experts,
I have written the following code for motion detection with a PIR sensor
with a function and
I need to count how many times the funtion is called, but I get a traceback:
#!/usr/bin/python3
import sys, time
import RPi.GPIO as gpio
gpio.setmode(gpio.BOARD)
gpio.setup(23, gpio.IN)
coun
Dear Experts,
I was too optimistic. Module jdcal ist indeed installed.
However, I get another trace back concerning et_xmlfile even after I
downloaded and saved it the same way as I did with jdcal.
Since I havent got any responses to my previous calls for help my problem
might be too un
Dear Experts, problem solved, dont bother, Marcus.
.
Dear Experts,
following instructions in a youtube video I thought I finally succeded to
install openpyxl.
However I got the traceback below:
>>> import openpyxl
Traceback (most recent call last):
File
Dear Experts,
following instructions in a youtube video I thought I finally succeded to
install openpyxl.
However I got the traceback below:
>>> import openpyxl
Traceback (most recent call last):
File "", line 1, in
import openpyxl
File
"C:\Users\marcus\AppData\Local\Programs\Python\
dear Experts,
could someone please tell me what exactly I have to type in my a) Python 35
command line or
b) desktopcomputer ( W10, 64bit)-command line in ordert to install openpyxl
which I downloaded in
C:\Users\marcus\Downloads on my computer.
I have used all kinds of commands with pip i
dear Experts,
first question :
could someone please tell me what exactly I have to type in my a) Python 35
command line or
b) desktopcomputer ( W10, 64bit)-command line in ordert to install openpyxl
which I downloaded in
C:\Users\marcus\Downloads on my computer.
I have used all kinds of comm
Hello experts
I'am working exercise 5. of 'Practical Programming 2nd edition, .using
Python 3' (operations on lists).
The following code get's me wrong results:
>>> metals = [['beryllium', 4],['magnesium', 12], ['calcium', 20],
>>> ['strontium', 38], ['barium', 56], ['radium', 88]]
>>> max
-Ursprüngliche Nachricht-
Von: Danny Yoo [mailto:d...@hashcollision.org]
Gesendet: Freitag, 1. Januar 2016 19:17
An: Alan Gauld
Cc: marcus lütolf ; Python Tutor Mailing List
Betreff: Re: [Tutor] trouble with beautiful soup
According to the documentation for Beautiful Soup 3
Thanks, I reinstalled the 64bit version but get the same traceback in Python
Shell, also usin ..from bs4.
Regards, Marcus
-Ursprüngliche Nachricht-
Von: Alan Gauld [mailto:alan.ga...@btinternet.com]
Gesendet: Freitag, 1. Januar 2016 12:25
An: marcus lütolf ; tutor@python.org
Betreff: Re
--
-Ursprüngliche Nachricht-
Von: Tutor [mailto:tutor-bounces+marcus.luetolf=bluewin...@python.org] Im
Auftrag von Alan Gauld
Gesendet: Donnerstag, 31. Dezember 2015 18:54
An: tutor@python.org
Betreff: Re: [Tutor] trouble with beautiful
tor [mailto:tutor-bounces+marcus.luetolf=bluewin...@python.org] Im
Auftrag von Mark Lawrence
Gesendet: Montag, 28. Dezember 2015 20:23
An: tutor@python.org
Betreff: Re: [Tutor] trouble with beautiful soup
On 28/12/2015 17:24, marcus lütolf wrote:
> Dear Pythonistas
> Hi Danny,
>
> I
in...@python.org] Im
Auftrag von Mark Lawrence
Gesendet: Montag, 28. Dezember 2015 20:23
An: tutor@python.org
Betreff: Re: [Tutor] trouble with beautiful soup
On 28/12/2015 17:24, marcus lütolf wrote:
> Dear Pythonistas
> Hi Danny,
>
> I am grateful for your precise instruchtions.
&g
rs.
Regards, Marcus.
--
-Ursprüngliche Nachricht-
Von: Danny Yoo [mailto:d...@hashcollision.org]
Gesendet: Samstag, 26. Dezember 2015 22:00
An: marcus lütolf
Cc: python mail list
Betreff: Re: [Tutor] trouble with beautif
my trouble ?
By the way, I am using W10 64 bit as OS.
Regards, Marcus.
Von: Walter Prins [mailto:wpr...@gmail.com]
Gesendet: Samstag, 26. Dezember 2015 03:13
An: marcus lütolf
Cc: python mail list
Betreff: Re: [Tutor] trouble with beautiful soup
Hi,
On 25 December 2015 at 20:28
s mail.
Bless you, Marcus.
-Ursprüngliche Nachricht-
Von: Jos Kerc [mailto:josk...@gmail.com]
Gesendet: Donnerstag, 24. Dezember 2015 19:50
An: marcus lütolf
Cc: tutor@python.org
Betreff: Re: [Tutor] trouble with beautiful soup
Hi, see below.
On Thu, Dec 24, 2015 at 6:21 PM, marcus l
de by
relieved the trace back mentioned in my previous mail.
Bless you, Marcus.
-Ursprüngliche Nachricht-
Von: Jos Kerc [mailto:josk...@gmail.com]
Gesendet: Donnerstag, 24. Dezember 2015 19:50
An: marcus lütolf
Cc: tutor@python.org
Betreff: Re: [Tutor] trouble with beautiful sou
dear pythonistas,
for hours I'am traying to use Beautiful Soup for scraping some websites as an
exercise.
But each time I run the code below:
>>> import urllib
>>> from BeautifulSpoup import *
>>> url = raw_input( 'Enter -')
>>> html = urllib.urlopen(url).read()
>>> soup = B
dear pythonistas,
thanks for your very valuable help.
I am struggling with a simple piece of code:
>>> x = Marcus
>>> print '{0} {1} x'.format('a', '=')
which gives me
>>> a = x instead of
>>> a = Marcus
What's wrong ?
Marcus.
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren g
dear pythonistas,
i solved my 2. question in my mail of Sunday 22.11.2015 21:59, sorry for
bothering you,
Marcus.
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
___
Tutor maillist - Tutor@pyt
dear pythonistas
i have written the code below for identifying tuples occurring twice or more
times in the list of tuples called "flights".
1. Question: How can i modify this code so it does not matter which string is
first and which is second or (h,i) == (i,h) respectively ?
2. Question: On my
rcus.
--------
-Ursprüngliche Nachricht-
Von: Martin A. Brown [mailto:mar...@linux-ip.net]
Gesendet: Samstag, 26. September 2015 19:38
An:
itertools. I hope I can be successfull with your code below
although it will me take time to comprehend it.
Sorry for this long text, regards, Marcus.
-Ursprüngliche Nachricht-
Von: Martin A. Brown [mailto:mar...@linux-ip.net]
Gesendet: Dienstag, 22. September 2015 03:10
An: marcus lütolf
Cc
on: Tutor [mailto:tutor-bounces+marcus.luetolf=bluewin...@python.org] Im
Auftrag von Alan Gauld
Gesendet: Freitag, 18. September 2015 18:58
An: tutor@python.org
Betreff: Re: [Tutor] Creating lists with 3 (later4) items occuring only once
On 18/09/15 16:41, marcus lütolf wrote:
>>>> s
dear pythonistas
in the code below
>>> import string, itertools
>>> s = ['ab','ac','bc','ad','ae','de']
>>> count = 0
>>> for startlist in itertools.combinations(s, 3):
>>> count = count + 1
>>> stl = list(startlist)
>>> print count, stl
>>> for pair in s:
>>> x = stl
dear pythonistas,
in the code below:
how can I solve my task wit n items ?
Thank you for help, Marcus.
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
___
Tutor maillist - Tutor@python.org
To
Hello Peter, hello Martin,
many thanks for your very quick response !!!
As for Peter's advice:
> At first I thought you might want itertools.combinations()
>
import string, itertools
for t in itertools.combinations(string.ascii_lowercase, 3):
> ... print t # list(t) if you actually
dear pythonistats
as a newcomber I want to create a set of lists containing n items, for
example n = 3: (['a','b','c'], ['a','d','e']...).
The sequence of items in each list should be different. If the letters
'a''z' are used and n = 3 there is a maximum of 301 lists.
The following
Why do I get this traceback with the infinite loop below but not with the
definitw loop (bottom of mail)?
Thanks for help, Marcus.
count = 0
total = 0
while True:
x = raw_input('Enter a number')
count = count + 1
total = total + x
print count, total, (total/count)
T
35 matches
Mail list logo