Python.org
908 FOLLOWERS
Visit this Python community, a place for the developers of various Python-in-WebAssembly projects to coordinate and collaborate. Talk about CPython core development workflow and related infrastructure, and discuss all aspects of Python's documentation.
Python.org
2h ago
I’m using Python 3.12 on Windows 10 Pro. I’m still somewhat new to Python. But I’ve been practicing writing different programs which do different things.
I didn’t make the PDF, it’s an 800 page bill from a vendor (Fedex). I don’t know what’s in it but it’s fairly tabular in structure.
I can’t post an example because it has private data in it.
I will start by extracting data from the first 3 pages. That will be my test case.
I’ve found these options that I will be researching:
Camelot: This library excels at extracting tabular data from PDFs. It identifies tables and extracts them into a str ..read more
Python.org
2h ago
Hello there,
I have come to adjust an old (but by me daily used) program using pygtk to be running on modern systems. I decided to switch to tkinter instead of GTK, because I want to reduce dependencies.
When rewriting some code I now ran into a problem for which I cannot find a solution by searching the web or the forum:
I need a function being executed in the mainloop after another function in a background thread is finished. The problem is also that this background thread is running a for loop and has to run the mentioned function to be executed in mainloop many times; after every for loop ..read more
Python.org
3h ago
I am trying to uninstall python but when I am again checking by running command “python --version” in cmd then it is showing the version of python.
2 posts - 2 participants
Read full topic ..read more
Python.org
4h ago
Hi All,
My first task on Python,
I would like to convert a SQL query (not query result) into JSON, I’m searching for some pre-build libraries and found few like mo_sql_parsing, sqlparse but need more structured JSON. Like below, any quick help is appreciated
INPUT:
SELECT A, B FROM (SELECT A, B FROM FROMTABLE WHERE FROMCONDITION = ‘FROMCONDITION’)
WHERE C = (SELECT C FROM WHERETABLE WHERE WHERECONDITION = ‘WHERECONDITION’)
ORDER BY A
EXPECTED OUTPUT:
{
“CRUD”: [“SELECT”],
“COLUMN”: [
“A”,
“B”
],
“ORDER_BY”: [“A”],
“TABLE”: [“(SELECT A, B FROM FROMTABLE WHERE FROMCONDITION = ‘FROMCONDITION ..read more
Python.org
6h ago
Hello
I want to connect C# and Python
Is there a library that integrates with C# and Python?
Please Help me
2 posts - 2 participants
Read full topic ..read more
Python.org
21h ago
Hello , This is my first game.
1 post - 1 participant
Read full topic ..read more
Python.org
23h ago
Currently, I’m reading Tutorial, Class Definition Syntax to learn some basic grammar about Python, especially the part of how Python creates and resolves the binding between name and object.
Please look at the following code:
def C():
breakpoint() # 1
class C:
breakpoint() # 2
C
C()
According to the tutorial:
When a class definition is entered, a new namespace is created … …
When a class definition is left normally, a class object is created.
This is basically a wrapper around the contents of the namespace created by the class definition.
The original local scope ..read more
Python.org
23h ago
I am trying to create sparksession as below
< spark = SparkSession.builder
.appName(“PySpark-Get-Started”)
.getOrCreate() >
While executing I am getting file not found error. Please let me know what is missing.
FileNotFoundError Traceback (most recent call last)
Cell In[12], line 3
1 spark = SparkSession.builder
2 .appName(“PySpark-Get-Started”)
----> 3 .getOrCreate()
File ~.pyspark-env\Lib\site-packages\pyspark\sql\session.py:497, in SparkSession.Builder.getOrCreate(self)
495 sparkConf.set(key, value)
496 # This SparkContext may be an existing one.
→ 497 sc = SparkContext.getOrCreate ..read more
Python.org
23h ago
Zipfile offers a testzip() to check the files of a zip against its CRC (crc32? I think). Tarfile doesn’t have an equivalent method but it does have a TarInfo.chksum property for it’s files. Although I’m not even sure what kind of checksum is it to begin with. So how would I go about achieving something like testtar()?
1 post - 1 participant
Read full topic ..read more