Python Forum
Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 19,526
» Latest member: tomanadoveza
» Forum threads: 38,660
» Forum posts: 175,187

Full Statistics

Online Users
There are currently 363 online users.
» 2 Member(s) | 349 Guest(s)
Apple, Bing, Google, AOL, Baidu, Yandex, Mojeek, Twitter, Axel_Erfurt, tomanadoveza

Latest Threads
Qt Event Filtering
Forum: GUI
Last Post: Axel_Erfurt
50 minutes ago
» Replies: 1
» Views: 27
Convert .pdf to .txt
Forum: General Coding Help
Last Post: Pedroski55
3 hours ago
» Replies: 7
» Views: 360
Trouble Importing cell2lo...
Forum: General Coding Help
Last Post: snippsat
Yesterday, 04:00 PM
» Replies: 3
» Views: 225
Why is bool() an instance...
Forum: General Coding Help
Last Post: deanhystad
Yesterday, 02:41 AM
» Replies: 5
» Views: 228
[SOLVED] Why does regex f...
Forum: General Coding Help
Last Post: Pedroski55
Jul-11-2025, 11:52 PM
» Replies: 7
» Views: 3,980
Custom Sorting List of Di...
Forum: Homework
Last Post: Larz60+
Jul-11-2025, 03:34 PM
» Replies: 1
» Views: 141
Coding Standards
Forum: General Coding Help
Last Post: snippsat
Jul-11-2025, 01:12 PM
» Replies: 2
» Views: 222
Make code run faster: poi...
Forum: General Coding Help
Last Post: FrankBuckland
Jul-11-2025, 07:24 AM
» Replies: 3
» Views: 763
Cleaning my code to make ...
Forum: General Coding Help
Last Post: FrankBuckland
Jul-11-2025, 07:20 AM
» Replies: 14
» Views: 4,340
Data cleaning help
Forum: General Coding Help
Last Post: FrankBuckland
Jul-11-2025, 07:18 AM
» Replies: 2
» Views: 2,915

 
  Different rows colours in treeview tkinter
Posted by: Krissstian - Nov-20-2022, 06:45 PM - Forum: GUI - Replies (1)

I have a treeview wich is populated from an sql DB:

[python] def fetch_data():
con = pymysql.connect(host='localhost', user='ro..... More

Print this item

  AssertionError when trying the sys module in python
Posted by: BliepMonster - Nov-20-2022, 12:50 PM - Forum: General Coding Help - Replies (10)

I was trying to make it so that it wrote the variable 'hp' in red.
[python]
import sys
color = sys.stdout.shell
hp = 100
color.write(hp, 'COMMENT')
[..... More

Print this item

Star Let me know what do you think about my app.
Posted by: wrcbit - Nov-20-2022, 11:56 AM - Forum: Code Review - No Replies

Hi guys,
Im new here and this is my first post, but it doesn't matter. Be as critic as possible. I code in python for a while and today I created too..... More

Print this item

  pygame double jump problem
Posted by: Yegor123 - Nov-20-2022, 05:04 AM - Forum: Game Development - Replies (2)

Im making a platformer game and I added the jump function but for some reason my player can do double jumps triple jumps and so on how do I fix this
..... More

Print this item

  better way to return a selected value
Posted by: Skaperen - Nov-20-2022, 04:23 AM - Forum: News and Discussions - Replies (2)

which is better or more Pythonic?

A:

...
if s1 < s2:
    return -1
if s1 > s2:
    return 1
return 0
B:
[python]
........ More

Print this item

  2 if statements happening at the same time
Posted by: M0TH - Nov-19-2022, 10:14 PM - Forum: General Coding Help - Replies (3)

hi I'm looking at all these other forum posts and they seem a lot more complex so sorry if this is a waste of time

im really new to python but i ca..... More

Print this item

  python code tp determin a userName and print message
Posted by: jackAmin - Nov-19-2022, 07:58 PM - Forum: Homework - Replies (4)

am new to programming bearly two weeks and have this question below to answer: i need assistance

5-8. Hello Admin: Make a list of five or more userna..... More

Print this item

  How do I emulate a Forza telemetry server and a Bluetooth OBD device?
Posted by: eswsdeth - Nov-19-2022, 07:38 PM - Forum: Game Development - Replies (3)

I'm making a driving game in Pygame, and want to give a player the option to send game data to a Forza compatible dashboard app or to an OBD app like ..... More

Print this item

  BCP Export sql data to csv
Posted by: mg24 - Nov-19-2022, 05:16 PM - Forum: General Coding Help - Replies (2)

Hi Team,

I found below code on google, while searching for BCP Export with header.

-h-1 ------ this removes header as per their explanation, Bu..... More

Print this item

  Python Scripting Environment
Posted by: jpotter0 - Nov-19-2022, 12:09 PM - Forum: General Coding Help - Replies (1)

Two or so years ago I wrote a Python Program for ANSYS scripting that had the following code snippet in it:
[python]
import ScriptEnv
ScriptEnv.Ini..... More

Print this item

  Old style TIF compression
Posted by: DPaul - Nov-19-2022, 11:01 AM - Forum: Bar - Replies (2)

Hi,
I have come across a huge batch of tifs, scanned a long time ago.
When opened in the normal fashion with PIL:
[python]img = Image.open(scanPath)[/..... More

Print this item

  Check DataFrames with different sorting in columns and rows
Posted by: Foxyskippy - Nov-19-2022, 07:49 AM - Forum: General Coding Help - No Replies

Hi,

I got multiple excel file which needs to be need if OLD data is matching NEW data. Normally I use dataframe.equals but since the NEW data is co..... More


Attached Files

.xlsx   AA_Table002.xlsx (Size: 15.61 KB / Downloads: 228)
.xlsx   AA_Table001.xlsx (Size: 14.71 KB / Downloads: 279)
Print this item

  Python with C
Posted by: Skaperen - Nov-19-2022, 03:25 AM - Forum: News and Discussions - Replies (3)

i want to get started writing some code that involves C. one aspect i want to ask those here that mix Python and C. is it preferred to have C coded ..... More

Print this item

  How to remove patterns of characters from text
Posted by: aaander - Nov-19-2022, 02:16 AM - Forum: General Coding Help - Replies (4)

I'm still in the learning process with Python, I need to delete each iteration of "%", and the two characters that follow it, which should be alphanum..... More

Print this item

Question log.exception() without arguments in old Python versions?
Posted by: cthart - Nov-18-2022, 09:16 PM - Forum: General Coding Help - Replies (5)

I have inherited some very old Python code:

import logging
_log = logging.getLogger('blah')
and later:

[python]
try:
..... More

Print this item

  which design / pattern when building classes and subclasses
Posted by: Phaze90 - Nov-18-2022, 08:53 PM - Forum: General Coding Help - Replies (2)

I need to build a mother-child-like class tree.

Dont know which is the best practice how to structure it.

I could define a top-level class A whi..... More

Print this item

Photo String comparison in a csv file in Python Pandas
Posted by: fleafy - Nov-18-2022, 08:05 PM - Forum: General Coding Help - Replies (2)

I am currently working on a huge csv file which I need to select a row and compare it with every other row. Which then should return me how much of th..... More

Print this item

  QGridLayout, QProgressBar bar fills widgets shrink
Posted by: malonn - Nov-18-2022, 07:54 PM - Forum: GUI - Replies (5)

I have a QGridLayout with some QLabels and QLineEdits and a QProgressBar. As the progress bar fills, the QLineEdits shrink. What's up with that. Co..... More

Print this item

  python sql query single quote in a string
Posted by: mg24 - Nov-18-2022, 07:40 PM - Forum: General Coding Help - Replies (1)

Hi Team,

I am extracting sql table data via python , while extracting data , portfolio contains single quote in its records.


hence my second ..... More

Print this item

  command require close window
Posted by: Krissstian - Nov-18-2022, 06:49 PM - Forum: GUI - Replies (14)

Hi,
I have defined a command for a button wich terminates like this:

[python] # save map data to data object
data = io.BytesI..... More

Print this item

  Reading large crapy text file in anaconda to profile data
Posted by: syamatunuguntla - Nov-18-2022, 06:15 PM - Forum: Data Science - No Replies

Hello,

I am new to python and learning on my own pace. i have a large text file with over 200 columns and few million rows. i am trying to profile ..... More

Print this item

  Command error - cursor.executemany(comandoSQL,valoresInserir)
Posted by: TecInfo - Nov-18-2022, 01:05 PM - Forum: General Coding Help - Replies (2)

Good morning,
I'm developing a program that records data coming from JSON in the MySQL database, but it's generating the following error.
[error]
T..... More

Print this item

  Attempting to read keyboard outside of console
Posted by: Jimmy998 - Nov-18-2022, 12:16 PM - Forum: General Coding Help - Replies (5)

You know the input function? where you store a string into a variable? Yeah, I don't need that, for at least that does not benefit me.

My attempt ..... More

Print this item

  pycharm debug help
Posted by: mg24 - Nov-18-2022, 03:15 AM - Forum: General Coding Help - Replies (1)

Hi Team,

how to debug in pycharm ?
in a situation where I am accepting input value via command line argument.

But when I run python script via comma..... More

Print this item

  Need to match two words in a line
Posted by: tester_V - Nov-18-2022, 12:28 AM - Forum: General Coding Help - Replies (2)

Good evening!
I'm trying to match two words and the "(" in a line.
these are" FAILED (Exit ", there is a space before the FAILED and after the Exit..... More

Print this item

  Python code a Max7219/7221 7 segment driver
Posted by: Aggie64 - Nov-17-2022, 10:31 PM - Forum: General Coding Help - Replies (11)

I am trying to use Pythons 3 SPI code to write directly to a MAX7219/7221 seven segment driver. I have written the code and connected a MAX7219 to my..... More

Print this item

  Help with list homework
Posted by: eyal123 - Nov-17-2022, 08:40 PM - Forum: Homework - Replies (5)

I have a list that compared from 3 lists that compered from 0,1,2
like that:
[python][
[0, 0, 2, 2, 0, 1, 1],
[1, 0, 0, 0, 1, 0, 0],
..... More

Print this item

  Replace columns indexes reading a XSLX file
Posted by: Larry1888 - Nov-17-2022, 04:53 PM - Forum: General Coding Help - Replies (2)

Hi all!

I am trying to make my code read certain indexes of an excel file depending on the type of configuration it has in the database, for exampl..... More

Print this item

  New2Python: Help with Importing/Mapping Image Src to Image Code in File
Posted by: CluelessITguy - Nov-17-2022, 04:46 PM - Forum: General Coding Help - No Replies

I am creating an item catalogue of our products and need to import the item images besides their product codes'. The Image Code in the file is the sam..... More


Attached Files

Thumbnail(s)
   
Print this item

  PDF file split and copy
Posted by: rob101 - Nov-17-2022, 02:20 PM - Forum: Code sharing - No Replies

Mostly in the interests of learning, but also for a practical application, I've been looking for a way to copy pages from a PDF file and write said pa..... More

Print this item

  python multiprocessing help -- to extract 10 sql table into csv
Posted by: mg24 - Nov-17-2022, 08:23 AM - Forum: General Coding Help - Replies (3)

Hi Team,

Need your help in improving my existing code using multithreading or multiprocessing as per below situation.

I have 10 sql tables in a ..... More

Print this item

  Print the line before the corrent line
Posted by: tester_V - Nov-16-2022, 08:30 PM - Forum: General Coding Help - Replies (9)

Greetings!
I'm searching lines for two words "PASSED" and "FAILED"
I need to get the line before "PASSED" and the "FAILED" line.
I'm definitely doi..... More

Print this item

  String to Number in Python
Posted by: Godjuned - Nov-16-2022, 06:36 PM - Forum: Homework - Replies (3)

Number: positive, up to billion (10 digits)

Example 1:
Input : I bought twenty three packs of bread
Output : I bought 23 packs of bread

Exampl..... More

Print this item

  [SOLVED] [Linux] Script in cron stops after first run in loop
Posted by: Winfried - Nov-16-2022, 05:35 PM - Forum: General Coding Help - Replies (2)

Hello,

For some reason, the following Python script that runs every hour through cron stops after the first run in the loop after downloading the R..... More

Print this item

  Problem : IndexError...
Posted by: JohnnyCoffee - Nov-16-2022, 03:52 PM - Forum: General Coding Help - Replies (5)

I'm capturing a string (url) where the array will be assembled at runtime, but I'm facing the following error ( IndexError: list index out of range ),..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Qt Event Filtering 50 minutes ago deanhystad Axel_Erfurt GUI
  Convert .pdf to .txt 3 hours ago vmars316 Pedroski55 General Codin...
  Trouble Importing cell2lo... Yesterday, 16:00 haileyp snippsat General Codin...
  Why is bool() an instance... Yesterday, 02:41 voidtrance deanhystad General Codin...
  [SOLVED] Why does regex f... 07-11, 23:52 Winfried Pedroski55 General Codin...
  Custom Sorting List of Di... 07-11, 15:34 aryasinner Larz60+ Homework
  Coding Standards 07-11, 13:12 kency snippsat General Codin...
  Make code run faster: poi... 07-11, 07:24 Bennygib FrankBuckland General Codin...
  Cleaning my code to make ... 07-11, 07:20 BSDevo FrankBuckland General Codin...
  Data cleaning help 07-11, 07:18 ClimbAddict FrankBuckland General Codin...
  Data cleaning and analysy... 07-11, 00:13 siriuslight Pedroski55 General Codin...
Most views
  The best Prog... 572637
  Tutorial Requ... 485675
  Web Scraping ... 437098
  Newbie with P... 380026
  Thread remain... 351368
Most reputation
buran 581
snippsat 507
Larz60+ 452
Gribouillis 362
deanhystad 327
Most replies
  New Users Int... 451
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12073
buran 8174
snippsat 7351
deanhystad 6854
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
python 6
NonEntity 5
buran 3
Newest members
tomanadoveza Today
zaelizabethwift4333 Today
lessonanthony Today
sitedata Today
natalishtolze9977 Yesterday

User Panel Messages

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