Skip to main content

All Questions

0 votes
0 answers
40 views

How should i import a c extension function i wrote into a sibling module?

I'm developing a package that has c extensions and some pure python modules in the same package. (maybe this is the real problem and they shouldn't be in the same package?) the project structure looks ...
gnarlyninja's user avatar
1 vote
1 answer
405 views

How to download all folders of folders and files from Share point using python script

I have seen many questions and answers in stackoverflow regarding sharepoint topics, but my requirement is quite different I need to download all folders of folders and files from in that folders, but ...
lAkShMipythonlearner's user avatar
1 vote
2 answers
367 views

Extract text from first page of word document and use it as a folder name, then move the file inside that folder

I have hundreds of word documents that needs to be processed but need to organized them first by versions in subfolders. I basically get a drop of these word documents within a single folder and need ...
raver83's user avatar
  • 25
3 votes
1 answer
3k views

Change the default folder structure in Azure Function project with Python

I'd like to create a Python project using Azure Functions. When creating, files are allocated into the default layout (as recommended in documentation), so currently my project has the following ...
Julia S.'s user avatar
0 votes
1 answer
642 views

How to loop over a folder, and recreate them in another folder with same structure?

I want to process a folder and blur the images and recreate them in another folder while preserving the structure. My source folder has the following structure Data/ test1/ test2/ 6....
Sabzaliev Shukur's user avatar
0 votes
1 answer
56 views

Python Imports from self-created Project Directory Structure

I have created a simple python project, which has following directory structure: > my-project |--> processors |--> data-processor.py |--> process-customizations.py |...
vish4071's user avatar
  • 5,187
1 vote
1 answer
776 views

How to import a file in the ROOT folder from a file in a subfolder?

I'm working with Python 3.8 and I have a project tree as: project folder/ |__OuterFile.py |__folder1/ |__ folder2/ |__ folder3/ |__ InnerFile.py How could I import OuterFile....
rainbow's user avatar
  • 255
2 votes
1 answer
2k views

Data structure for files and folder tree?

For python, is there any common data structure for representing the tree in the file system in all OSs? I currently use a dictionary and store the tree in this way. C/ ├─ C1 ├─ C3/ │ ├─ C31 tree = ...
Luk Aron's user avatar
  • 1,357
0 votes
1 answer
154 views

Cannot find the path specified when attempting to rename certain files in Python

I am attempting to write a script that would rename all my tv show files I have on an external HDD. Using regular expressions, it should find the season and episode number for each episode then rename ...
Scorps's user avatar
  • 3
18 votes
3 answers
23k views

What is the correct folder structure to use for a Python project using pytest?

I try to organized my Python projects using a folder structure. When I need to make tests I use something like the following. . |-- src | |-- b.py | `-- main.py `-- tests `-- test_main.py ...
Ed1123's user avatar
  • 310
0 votes
2 answers
43 views

How to find the same folder on different machine in Python?

I have the following folder structure: demo ├── module1 │ └── demo.py ├── module2 └── somefile.txt I want to be able to find somefile.txt from demo.py no matter from where demo.py is ...
Song Tùng's user avatar
0 votes
1 answer
28 views

Can't refer to Django templates

Below is my directories created by using Django isap/users needs to get templates from isap/isap/templates/users/login.html isap/ L isap L templates L users L login.html L ...
Gyu's user avatar
  • 9
0 votes
1 answer
29 views

Failed Python3 imports when calling files in same/sub/super directories

I know there are many questions related to import errors and file/folder structure, but none seem to have the same structure as my file tree I have been struggling with ordering my files and importing ...
mfgeng's user avatar
  • 89
1 vote
2 answers
2k views

ModuleNotFoundError: No module named 'app' when trying absolute imports

I have been trying to import files into my main.py file by using imports from the sources root. Here is a pic of my file structure... I am simply using source root imports to try and import seed.py ...
Robert O'Brien's user avatar
0 votes
1 answer
109 views

Not able to import python files needed in main.py

I have this file structure which i am not too sure is considered good practice. here is the directory structure I am trying to import the content of seed.py and wallet_generation.py into my main.py ...
Robert O'Brien's user avatar

15 30 50 per page