Nov-16-2019, 11:35 PM
Hi Python Experts,
I am extremely new to Python and am trying to work out a small problem.
I am using the latest version of Anaconda Navigator and am launching Jupyter Notebook and VS Code from Anaconda.
In the Python Notebook in Jupyter I can run this code and get the expected result.
However, when I run this code using VS Code and the Powershell terminal I just get another prompt (if that is the correct term).
I saved the identical code in the file getURL.py
PS C:\Users\Matthew> python getURL.py
PS C:\Users\Matthew>
I have downloaded and imported the pip install requests for VS Code
I'm wondering if there's something I need to do in VS Code to make sure it's actually sending a request out to the web. Since I launch both Jupyter and VS Code from Anaconda I thought the environments would be set up in a similar way. Apologies if I don't have the terminology correct.
Thanks in advance to anyone who responds. It's much appreciated.
Matt
I am extremely new to Python and am trying to work out a small problem.
I am using the latest version of Anaconda Navigator and am launching Jupyter Notebook and VS Code from Anaconda.
In the Python Notebook in Jupyter I can run this code and get the expected result.
import requests url = 'https://www.bing.com/' requests.get(url)<Response [200]>
However, when I run this code using VS Code and the Powershell terminal I just get another prompt (if that is the correct term).
I saved the identical code in the file getURL.py
PS C:\Users\Matthew> python getURL.py
PS C:\Users\Matthew>
I have downloaded and imported the pip install requests for VS Code
I'm wondering if there's something I need to do in VS Code to make sure it's actually sending a request out to the web. Since I launch both Jupyter and VS Code from Anaconda I thought the environments would be set up in a similar way. Apologies if I don't have the terminology correct.
Thanks in advance to anyone who responds. It's much appreciated.
Matt