Python Forum
Calling cell / modules in PyCharm Community
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling cell / modules in PyCharm Community
#1
Hi,

I moved to PyCharm community from spyder. I have issues with calling modules that are defined in a cell. All are stored in the same folder.
Let me give you a dummy example below;

#............................... Class - I ............................................#
class DataRetrieve():

    def __init__(self):
        self.filename = r'C:/Users/... .png'

        # Get the basics of data
    def main_extractInfo(self):
        ...................
    return data_sampling_rate

if __name__ == '__main__':
    runner = DataRetrieve()
    runner.main_extractInfo()
#................................................................................................#

#.........................Class - II to call Class - I ......................#

from DataRetrieve.DataRetrieve import main_extractInfo # At this point the message is ''cannot find the reference DataRetrieve in DataRetrieve.py''

class DataPreProc():

    def main_Data_PreProc(self):
    .....................................................................................
    return data_new

if __name__ == '__main__':
    runner = DataPreProc()
    runner.main_Data_PreProc()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Slicing String cell by cell Vigneshkumarsakthivel 0 2,358 Sep-02-2018, 05:59 PM
Last Post: Vigneshkumarsakthivel

Forum Jump:

User Panel Messages

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