General chat, help, discussion and ideas about the Mu code editor. Don't be afraid to ask a question. We're friendly! Please follow the Code of Conduct (https://www.python.org/psf/codeofconduct/)
That's because it's not a third-party package, it's, as I said above, part of the Python default packages just do an import and it should work.
from multiprocessing import <list the packages within processing you want>
It's generally not a good idea to import everything with an *.
pip install mu-editor==1.1.0b6
I think what they mean is
fancy_variable = 123
other_variable = 456
def some_function():
global other_variable
fancy_variable = 234
other_variable = 789
print(fancy_variable, other_variable) # ← Breakpoint here ←
some_function()
print(fancy_variable, other_variable)
Doesn't indicate other_variable
is global, and doesn't show the shadowed fancy_variable
Thanks Zander, that's it! For another example, if I was to run the following in Mu debugger and IDLE debugger, at line 3 within the function:
def add(number):
number += 1
print (number)
number = 1
add(number)
print(number)
For teaching purposes I'd like to be able to follow a program through and demonstrate scope, parameters, returns clearly.
def PatrickMoney(self):
print("Patrick's Money: 9 Patrickillion")
print("Last month's Money: 7 PatrickIllion")
def Patrick_Products(self):
print("Patrick has many products, but his favorite has to be bacon")
new_products = ["Bacon Bits", "Bacon Cupcakes", "Chocolate Flavored Bacon"]
# welcome to Patrick's Puppy Portions! #
class sales:
def __init__(self, Products_Sold):
self.Products_Sold = Products_Sold
if Products_Sold > 534767897323:
print("Good work.")
elif Products_Sold < 534767897323:
print("Patrick is dissapointed.")
def PatrickMoney(self):
print("Patrick's Money: 9 Patrickillion")
print("Last month's Money: 7 PatrickIllion")
def Patrick_Products(self):
print("Patrick has many products, but his favorite has to be bacon")
new_products = ["Bacon Bits", "Bacon Cupcakes", "Chocolate Flavored Bacon"]
Hi, I am experiencing strange behavior when using the plotter together with an ESP32 microcontroller. The attached image shows the output of a function that clearly should produce a uniform sawtooth looking plot. The REPL window shows data correct but the plotter is giving a strange shape. The error changes from run to run.
What am I doing wrong?