The problem of files referencing each other in python package

created a new package with a.pypypy.py in it.
a.py needs to refer to the contents of b.py, but it cannot be introduced in the way of import.
what is the reason for this? How to solve it?

Mar.09,2021

try: right-click the folder, Make Directory As--> Sources Root


in PyCharm why not?
Don't you just import b
directly?


Why can't two py files under the same package be import? directly? Looking forward to new answers.


encountered this problem only when other programs call this package, import rule-- changed to--> import ExtractRules.rule

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf3cc5-31e92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf3cc5-31e92.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?