Linked Questions

46 votes
8 answers
106k views

I am trying to open an HTML file from Python but my script just displays the contents of the HTML file in Python instead of opening it in the browser. How can I fix this problem? How can I open the ...
user avatar
67 votes
2 answers
43k views

I am having difficulty understanding the usage scenarios or design goals of python's __init__.py files in my projects. Assume that I have 'model' directory (refers as a package) which contains the ...
user avatar
11 votes
3 answers
35k views

Below folder structure of my application: rootfolder /subfolder1/ /subfolder2 /subfolder3/test.py my code inside of the subfolder3. But I want to write output of the ...
Qaqa Leveo's user avatar
12 votes
2 answers
14k views

How do I get the current topmost package, i.e., the name defined in setup.py? Here is my tree: . |-- README.md |-- the_project_name_for_this_pkg | |-- __init__.py | |-- __main__.py | |-- ...
A T's user avatar
  • 14k
11 votes
1 answer
4k views

Is there a Python equivalent for this library? https://github.com/r-lib/here/
r0f1's user avatar
  • 3,196
3 votes
1 answer
6k views

I am trying to include a python file in the build/lib directory created when running python setup.py install In particular, I would like to include a simple configuration file ('definitions.py') that ...
Danny Kaufman's user avatar
0 votes
3 answers
9k views

I am trying to create one distributable package in Python.So in my package I need to access a file from the root of the project for which my package is installed inside. I am trying to do that like ...
Ropali Munshi's user avatar
0 votes
2 answers
3k views

my Google-fu has failed me by giving me results I don't understand, so I'm asking here. I'm working on a Python project and I currently have a configuration file, which is also .py, that holds various ...
k huang's user avatar
  • 443
0 votes
1 answer
209 views

Let's say I have the following directory model_folder | | ------- model_modules | | | ---- __init__.py | | | ---- foo.py | | | ---- ...
bismo's user avatar
  • 1,645
1 vote
0 answers
165 views

Example project structure: |-setup.toml |-README.md |-tests/... |-data/... |-src/ |-package1 |-package2 |-module1.py |-package3 |-subpackage4 |-module2.py ...
rudolfovic's user avatar
  • 3,316
0 votes
1 answer
124 views

hi i tried to open some data that i downloaded to my documents using pandas with python 3.7 but it doesnt work this is my code : import pandas as pd users=pd.read_csv("ml-100k/u.user",sep=...
Eliza Romanski's user avatar
0 votes
1 answer
78 views

I have a Python database interface package, which requires configured credentials to work. I would like to tuck those away in a config file, that's not committed to the interface repository. So I have ...
Roberto's user avatar
  • 1,133