Python Forum
Code problem - probably easy fix?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code problem - probably easy fix?
#2
Since you don't show script names, for this example: call first module ModuleA and second ModuleB

in ModuleB, you need to import first module
like import ModuleA

Then create an instance of first module (in second script) like calcRating = ModuleA().calculate_initial_rating

Now to call, for example, calculate_initial_rating in ModuleA from ModuleB
use: udict = calcrating(your_dctname) replacing your_dictname with actual name
Reply


Messages In This Thread
Code problem - probably easy fix? - by colin_dent - Jun-29-2023, 04:19 AM
RE: Code problem - probably easy fix? - by Larz60+ - Jun-29-2023, 02:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  easy name problem Steinsack 1 1,803 Jun-16-2021, 02:03 PM
Last Post: snippsat
  Problem with very easy code. janekk9002 1 1,871 Dec-10-2020, 12:57 PM
Last Post: buran
  What was my mistake in this Python code (easy)? voltman 4 3,550 Nov-19-2019, 09:58 PM
Last Post: snippsat
  How to start with this easy problem? Fran 8 4,314 Sep-11-2018, 09:04 AM
Last Post: Fran
  Making a Easy Password/code system nmsturcke 4 3,946 Jul-09-2018, 02:50 AM
Last Post: ichabod801
  probably a easy problem for you krheigh 4 4,764 May-12-2017, 06:45 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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