import numpy as np filename = 'input1.txt' output_file = 'output.txt' delimiters = ',.?!' with open(filename, 'r') as f: text = f.read() for delimiter in
i'am new to python and try to get the new value for my bool in a class . i try create a global, set in the init. How can i get the new value of the test bool in
I need to display all png files in directory 'images'. The problem is there is subdirectory 'additional files' with one more png in it. import glob my_path = "
how do you pass a value into a QWidget in PyQt5? Let's say everytime the user runs the GUI, the widget shows today's date for example. Appreciate the help!!
Suppose we have a string that looks like this: fake_bytes = "b'This is a check - \xe2\x9c\x94\xef\xb8\x8f'" So this fake_bytes string is a text that is encoded
I am very new to Python, but need to work with it during my study for a project. We are trying to make a camera scanning system. I have found an amazing code by
[This is DataFrame loaded with data from an Excel file] STUDY Teacher UPDATE_DATE 0 math A 2022-02-25 1 math
I'm trying to put all the images in a directory into a single PDF. I'm writing in python 3 and using PyFPDF. This is my code: import os from fpdf import FPDF pd
I have a Django view that serves the content of a file. The Django application was running with WSGI until recently. This worked fine. Then I adapted my applica
how would i integrate a progressbar into this code? ive actually got a progressbar in the code, i just need someone to show me how to make it work.thanks. the w
My project structure is: main.py ----gui/load_ui.py ----gui/resource.py in load_ui.py I am importing resouce.py. in main.py im importing load_ui.py since it's
I'm looking for a way to convert the data of a 3d model (contained in an .obj file) into three different meshgrids, corresponding to the three x,y and z coordin
I'm trying to get the price of this object into a variable and print it out/put it in a CSV. This is the section of html that I am trying to parse: <span cla
I used pip install to install django taggit, I am confirming that is there with pip freeze I am including taggit on installed apps and when I want to do the mig
I am trying to use MCP3008 for sampling. I want obtain 8000 samples/second, but i really can't obtain much than 1000 samples/second. This is my code: spi =
A view in my Django app takes a URL variable/argument which in my case is a URL like: https://google.com so it would look something like this: localhost:8000/a
I would like to modify a QTableWidget table, taking whole rows and moving them in place of other rows (reversing the position of the rows, in a way). All the at
I am trying to execute a code of mine, but i keep getting the following error: ModuleNotFoundError: No module named 'hcaptcha' When I try installing 'hcaptcha
I'm reading the "Learn Python the Hard Way" and the now the author is saying to run, in the terminal, pydoc input. I do this and get the response:miguel@MBP-de-
I have a python client that receives a string from a C server. I always receive a 6 byte string, in C everything after the '\0' byte is junk,