Python Forum
Importing module from outside of the current directory
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing module from outside of the current directory
#2
sys.path search for files with suffix .py only.
Quote:Oh, I should add that this file is not a python file, is it possible to do this ?
You most explain what you trying do eg "i want call/run C code from Python".
Suffix .h is a header file for C.
Reply


Messages In This Thread
RE: Importing module from outside of the current directory - by snippsat - Mar-17-2017, 11:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  importing variables from module 8376459 1 418 Feb-18-2024, 02:24 PM
Last Post: deanhystad
  no module named 'docx' when importing docx MaartenRo 1 1,375 Dec-31-2023, 11:21 AM
Last Post: deanhystad
  My code displays too much output when importing class from a module lil_e 4 1,368 Oct-22-2022, 12:56 AM
Last Post: Larz60+
  Get Current Directory From ShortCut. Oshadha 1 1,090 Jul-30-2022, 04:41 PM
Last Post: snippsat
  importing functions from a separate python file in a separate directory Scordomaniac 3 1,550 May-17-2022, 07:49 AM
Last Post: Pedroski55
  No Module found in other directory than source code [SOLVED] AlphaInc 1 2,233 Nov-10-2021, 04:34 PM
Last Post: AlphaInc
  Importing module in jupyter Noteboook ajitnayak1987 0 1,825 Jun-04-2021, 12:26 PM
Last Post: ajitnayak1987
  ERROR: importing desired module mbgamer28 0 1,758 Apr-05-2021, 07:46 PM
Last Post: mbgamer28
  importing module - not working jdhamblett 3 3,187 Jun-22-2020, 07:33 PM
Last Post: jdhamblett
  importing same python library in multiple custom module escape_freedom13 6 4,046 May-10-2020, 07:01 PM
Last Post: escape_freedom13

Forum Jump:

User Panel Messages

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