Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
urllib can't find "parse"
#5
It doesn't surprise me that IDLE makes your program act differently. IDLE runs your program inside of IDLE, changing things here and there to intercept things here and override things there to keep IDLE informed about what is going on. For example, IDLE replaces stdin and stdout with IDLE specific versions. A few months ago there was a post on the forum asking why their program, which worked fine when run form the command line failed when run from IDLE. The reason was that the IDLE stdout did not support some features that have become standard in newer versions of Python. There are many posts on the forum wondering why tkinter programs run differently when using IDLE (the programs never exit because they are running inside the IDLE shell). It didn't take long for me to get tired of all the IDLE weirdness and move on to a different IDE.

I couldn't find where IDLE imports parse when your program imports urllib. I dug around for half an hour and lost interest. All I know is in IDLE:
Output:
import urllib dir(urllib)[/python] ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'parse']
From the CMD shell
Output:
c:\>python Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> dir(urllib) ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
Reply


Messages In This Thread
urllib can't find "parse" - by rjdegraff42 - Jul-23-2023, 10:26 PM
RE: urllib can't find "parse" - by menator01 - Jul-23-2023, 11:16 PM
RE: urllib can't find "parse" - by rjdegraff42 - Jul-24-2023, 12:19 AM
RE: urllib can't find "parse" - by bowlofred - Jul-24-2023, 03:30 AM
RE: urllib can't find "parse" - by deanhystad - Jul-24-2023, 05:05 PM
RE: urllib can't find "parse" - by rjdegraff42 - Jul-24-2023, 05:20 PM
RE: urllib can't find "parse" - by deanhystad - Jul-24-2023, 05:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with urllib.request Brian177 2 3,876 Apr-21-2021, 01:58 PM
Last Post: Brian177
  urllib.request ericmt123 2 3,213 Dec-21-2020, 06:53 PM
Last Post: Larz60+
  urllib is not a package traceback cc26 3 8,120 Aug-28-2020, 09:34 AM
Last Post: snippsat
  urllib request error 404 Coco 2 5,460 May-11-2019, 02:47 PM
Last Post: Larz60+
  KeyError urllib DavidFernandez 4 4,741 Nov-21-2018, 08:34 PM
Last Post: DavidFernandez
  urlparse to urllib.parse - the script stopped working apollo 5 8,094 Oct-26-2017, 06:57 AM
Last Post: apollo
  URLLIB.REQUEST Not Working hallofriends 1 7,127 Sep-18-2017, 05:00 PM
Last Post: Larz60+
  how to loop data in urllib? pythonlover 4 9,077 Jan-18-2017, 06:53 PM
Last Post: pythonlover

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020