Re: Jupyter Notebook -> PDF with A4 pages?

2019-11-22 Thread Martin Schöön
Den 2019-11-01 skrev Andrea D'Amore :
> On Thu, 31 Oct 2019 at 22:08, Martin Schöön  wrote:
>> Den 2019-10-16 skrev Piet van Oostrum :
>>> Why should that not work?
>> pip install --user pip broke pip.  I have not been able to repair pip
>
> I guess that's just the local pip shadowing the system one when you
> let the command "pip" to be resolved by the shell.
> , try calling the absolute path /usr/bin/pip .
>
Thanks, that seems to work -- "seems" because I have only had time try
out list and search functions. Which explains the slow response on my
part...

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


Re: Global variable is undefined at the module level

2019-11-22 Thread jacksonhaenchen
This is not accurate. I just tested this in python3 and using the global 
keyword allowed me to declare a variable inside the function that was then 
visible from the outer scope.

On Tuesday, September 13, 2016 at 6:50:39 AM UTC-5, dieter wrote:
> Daiyue Weng  writes:
> 
> > Hi, I defined a global variable in some function like this,
> >
> > def some_function(self):
> >
> >  global global_var
> >
> > PyCharm inspection gave me,
> >
> > Global variable is undefined at the module level
> >
> > How to fix this?
> 
> You define the global variable at the module level.
> 
> "global VVV" (in a function) actually does not define "VVV"
> as a global variable. Instead, it tells the interpreter that
> "VVV" should not be treated as a local variable but be looked up
> in the "global" (usually module) namespace.
> 
> In order to define "VVV", you must assign a value to it -- either
> directly in the "global" (i.e. module) namespace or in your function
> (together with a "global VVV" declaration).

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