Re: importlib: import X as Y; from A import B

2020-08-10 Thread Jason Friedman
> > import pandas; pd = pandas > > >df = pd.from_csv (...) > >from selenium import webdriver > > import selenium.webdriver; webdriver = selenium.webdriver > Thank you, this works. -- https://mail.python.org/mailman/listinfo/python-list

Re: importlib: import X as Y; from A import B

2020-08-09 Thread Dieter Maurer
Jason Friedman wrote at 2020-8-8 21:23 -0600: > ... >The cherry-on-top would be to import with the "aliasing" and "from" they >will most likely see on the web, so that my code matches what they see >there. In other words, instead of: > >import pandas >df = pandas.from_csv (...) >import selenium >br

Re: importlib: import X as Y; from A import B

2020-08-08 Thread Chris Angelico
On Sun, Aug 9, 2020 at 1:25 PM Jason Friedman wrote: > > I have some code I'm going to share with my team, many of whom are not yet > familiar with Python. They may not have 3rd-party libraries such as pandas > or selenium installed. Yes I can instruct them how to install, but the path > of least

Re: importlib: import X as Y; from A import B

2020-08-08 Thread dn via Python-list
On 09/08/2020 15:23, Jason Friedman wrote: I have some code I'm going to share with my team, many of whom are not yet familiar with Python. They may not have 3rd-party libraries such as pandas or selenium installed. Yes I can instruct them how to install, but the path of least resistance is to ha

importlib: import X as Y; from A import B

2020-08-08 Thread Jason Friedman
I have some code I'm going to share with my team, many of whom are not yet familiar with Python. They may not have 3rd-party libraries such as pandas or selenium installed. Yes I can instruct them how to install, but the path of least resistance is to have my code to check for missing dependencies