Python Forum
Importing files to other python scripts
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing files to other python scripts
#1
Hey everyone

I need help, when I import from ex_part1 import loadData it decides to execute the part1 python script instead of part2 python script, but I want python to execute part2 script not part1. I don't understand why this is occurring when importing the file. If anyone has suggestions on how to fix this, it would be great help.
Reply
#2
we don't know what part1 and part2 are. what is executed depends on what's in ex_part1 module. show us your code.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to us python.exe from our network to run scripts cubangt 3 814 Aug-17-2023, 07:53 PM
Last Post: deanhystad
  Can I get some clarification on importing functions from external files. wh33t 3 859 Feb-25-2023, 08:07 PM
Last Post: deanhystad
  Opinion: how should my scripts cache web download files? stevendaprano 0 700 Dec-17-2022, 12:19 AM
Last Post: stevendaprano
  python standard way of importing library mg24 1 872 Nov-15-2022, 01:41 AM
Last Post: deanhystad
  Running python scripts from github etc pacmyc 7 3,608 Mar-03-2021, 10:26 PM
Last Post: pacmyc
  Reading SQL scripts from excel file and run it using python saravanatn 2 2,459 Aug-23-2020, 04:49 PM
Last Post: saravanatn
  importing a list of numbers into python script barrypyth 8 4,428 Aug-22-2020, 09:10 PM
Last Post: barrypyth
  Importing python data to Textfile or CSV yanDvator 0 1,720 Aug-02-2020, 06:58 AM
Last Post: yanDvator
  importing a CSV file into Python russoj5 1 2,917 Aug-02-2020, 12:03 AM
Last Post: scidam
  No Scripts File present after python installation ag2207 5 4,765 Jul-30-2020, 11:11 AM
Last Post: buran

Forum Jump:

User Panel Messages

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