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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,242
» Latest member: johnsonlucas83
» Forum threads: 38,777
» Forum posts: 175,797

Full Statistics

Online Users
There are currently 47 online users.
» 2 Member(s) | 40 Guest(s)
Bing, Google, Apple, AOL, woooee, buran

Latest Threads
I’m building a Python Dat...
Forum: GUI
Last Post: woooee
1 minute ago
» Replies: 3
» Views: 125
[split] print two differe...
Forum: General Coding Help
Last Post: Gribouillis
11 hours ago
» Replies: 1
» Views: 54
Data Science
Forum: Data Science
Last Post: mamta25
11 hours ago
» Replies: 3
» Views: 2,579
Two arguments in input fu...
Forum: General Coding Help
Last Post: Pedroski55
Yesterday, 12:56 AM
» Replies: 4
» Views: 154
Backward compatibility qu...
Forum: News and Discussions
Last Post: buran
Nov-08-2025, 10:39 AM
» Replies: 3
» Views: 139
[openpyxl] Set the lockin...
Forum: General Coding Help
Last Post: Pedroski55
Nov-07-2025, 11:59 AM
» Replies: 3
» Views: 137
New Users Introduce Yours...
Forum: Bar
Last Post: BelleroDev
Nov-07-2025, 09:09 AM
» Replies: 452
» Views: 375,418
Best book on learning Pyt...
Forum: News and Discussions
Last Post: mamta25
Nov-07-2025, 06:07 AM
» Replies: 2
» Views: 3,385
Recommend me a Python boo...
Forum: Data Science
Last Post: mamta25
Nov-06-2025, 08:33 AM
» Replies: 7
» Views: 5,584
Code runs perfectly and j...
Forum: General Coding Help
Last Post: noisefloor
Nov-05-2025, 05:56 PM
» Replies: 2
» Views: 218

 
Question mypy unable to analyse types of tuple elements in a list comprehension
Posted by: tomciodev - Oct-17-2023, 09:27 AM - Forum: General Coding Help - Replies (1)

All presented code samples were tested with Python 3.11, and mypy 1.6.0.

And the problem is: mypy sees no problems in the following code:

[pytho..... More

Print this item

  Waiting for input from serial port, then move on
Posted by: KenHorse - Oct-16-2023, 09:27 PM - Forum: General Coding Help - Replies (3)

Why doesn't this leave the while loop?


[python]#wait for % and then move on
indata = ""
Counter = 0
while indata != "%":
indata = ser.rea..... More

Print this item

  Loop through values and compare
Posted by: edroche3rd - Oct-16-2023, 08:38 PM - Forum: General Coding Help - Replies (6)

Hi everyone

My 2nd inquiry as I try to learn Python and ways to expand my network engineering toolkit.

I found a script on Packetswitch by Sures..... More

Print this item

  difference between statement and expression
Posted by: akbarza - Oct-16-2023, 12:39 PM - Forum: General Coding Help - Replies (6)

hi
On the site realpython.com, I saw that was said that yield is a statement.
what is the difference between a statement and an expression in..... More

Print this item

  A more efficient code
Posted by: titanif - Oct-16-2023, 10:49 AM - Forum: General Coding Help - Replies (2)

I just started with Python. I want to add the information of the array ‘toc’ to the array ‘toc_n.’ The first two columns of both ones are ‘year’ and ‘..... More

Print this item

  How would I be able to detect a media player app playing a video.
Posted by: phpjunkie - Oct-16-2023, 02:05 AM - Forum: General Coding Help - Replies (2)

I'm trying to stop windows from powering off the monitor while playing a game or from watching movies and the only way I've found so far is using open..... More

Print this item

  regex findall() returning weird result
Posted by: Radical - Oct-15-2023, 04:31 PM - Forum: General Coding Help - Replies (1)

EDIT: You can likely just skip to the "update" at the bottom of this post.

What I am trying to do is test out regular expression usage ..... More

Print this item

  Modal window
Posted by: DPaul - Oct-15-2023, 06:51 AM - Forum: GUI - Replies (16)

Hi,
I'm getting pretty confused, reading about modal windows in tKinter.
I thought it would be simple.

I have an existing app,where users make a ..... More

Print this item

  Newbie question about switching between files - Python/Pycharm
Posted by: Busby222 - Oct-15-2023, 05:10 AM - Forum: General Coding Help - Replies (3)

Hi all,

My background is not coding, so I am not familiar with coding lingo, everything I know is self taught and my knowledge is limited.

I am usi..... More

Print this item

  permutations algorithm in python
Posted by: monkeyPlus - Oct-15-2023, 12:22 AM - Forum: Code sharing - Replies (1)

for a very fast permutation algoirithm check
https://andrealbergaria.github.io/fastPe...tions.html

Print this item

  TKinter Widget Attribute and Method Quick Reference
Posted by: zunebuggy - Oct-14-2023, 08:27 PM - Forum: GUI - Replies (3)

I made this from compiled data from 3 different Python sites. I find these just as useful as tutorial sites. I thought I'd share. I hope someone els..... More


Attached Files

.xlsx   Python_TKinter_Widget_Reference.xlsx (Size: 22.18 KB / Downloads: 330)
Print this item

  Looking for Part Time Python
Posted by: cbrum11 - Oct-14-2023, 05:53 PM - Forum: Jobs - No Replies

Hi folks,

I'm a mechanical engineer by education but I have been working in software adjacent niches my whole career. I'm looking for part time Py..... More

Print this item

  Can I use logging in a class (without multiple messages)
Posted by: mevan - Oct-14-2023, 04:18 PM - Forum: General Coding Help - Replies (2)

I'm new to using classes. In the code below I'm finding with the use of

log_alt.info()
messages will appear once, as desired. However..... More

Print this item

  Why am I getting this TypeError?
Posted by: pitosalas - Oct-14-2023, 12:22 PM - Forum: General Coding Help - Replies (5)

Maybe it's early morning brain...The line called out is:

self.new_queue = Queue("New", sim)
and the error says:
[error]TypeError: ..... More


Attached Files

Thumbnail(s)
   
Print this item

  Replace a text/word in docx file using Python
Posted by: Devan - Oct-14-2023, 11:31 AM - Forum: General Coding Help - Replies (4)

Hello all,
I have few MS Word documents. I need to replace a particular text in that word document. This particular text can be found in paragraphs o..... More

Print this item

  list in dicitonary element problem
Posted by: jacksfrustration - Oct-14-2023, 11:29 AM - Forum: General Coding Help - Replies (3)

ok so basically im trying to build a workout tracker app. my problem is i want to check if there is already the date inside the json fille so it won't..... More

Print this item

  Help! Logistic regression with balanced data.
Posted by: xstazzie - Oct-13-2023, 11:49 PM - Forum: Homework - No Replies

Hello, I'm doing an AI course where i need to complete an exercise about classification and machine learning, and I'm really struggling with it. I've ..... More

Print this item

  Confusion over an Except branch
Posted by: Mark17 - Oct-13-2023, 06:17 PM - Forum: General Coding Help - Replies (1)

Hi all,

Here's some code:

[code]
#Create Custom Exceptions
class InvalidTitle(Exception):
pass

try:
title = input("Type the title..... More

Print this item

  'NoneType' object has no attribute 'get'
Posted by: zunebuggy - Oct-13-2023, 04:26 PM - Forum: GUI - Replies (8)

I used to develop in VB 6 and am new to Python. I am finding it to be very powerful but a little difficult to debug at times. I am going through som..... More

Print this item

  Need Guidance
Posted by: mridrees - Oct-13-2023, 02:53 PM - Forum: News and Discussions - Replies (4)

Hy Python Community,
Hope Everyone is good
I am bachelor's Student and learning Python this year
I request everyone that please provide me best Pyt..... More

Print this item

  difference between next() and .__next__
Posted by: akbarza - Oct-13-2023, 06:57 AM - Forum: General Coding Help - Replies (4)

Hi
in the below code:
[python]def g():
for i in range(3):
yield i*i
my_g=g()
my_g.__next__()
next(my_g)
#what is difference betwee..... More

Print this item

  Making my way back into programming and need a little help.
Posted by: joegibbstruck - Oct-12-2023, 07:47 PM - Forum: General Coding Help - Replies (2)

Hey guys, my name is James I'm from Houston, TX, it's been roughly 22yrs since I last tried any programming in college. I recently decided to try and ..... More

Print this item

  Active Directory integration
Posted by: dady - Oct-12-2023, 07:10 PM - Forum: General Coding Help - Replies (2)

Hi all,

I would like to know what's the best way for working with Python and Active Directory?

Thanks in advance.

Print this item

  Can Python be my replacement for VBScript?
Posted by: Moondoggy - Oct-12-2023, 05:53 PM - Forum: News and Discussions - Replies (3)

I read yesterday that Microsoft is going to discontinue VBScript in future releases of Windows which will eventually create a few problems for me so I..... More

Print this item

  datetime module question
Posted by: jacksfrustration - Oct-12-2023, 11:01 AM - Forum: General Coding Help - Replies (9)

Basically i want to make a list of days and dates for the current month. I want to be able to make the list as options in an optionmenu widget. The fo..... More

Print this item

  Does @ at sign used for tother than decorators?
Posted by: ggpython000 - Oct-12-2023, 08:57 AM - Forum: General Coding Help - Replies (1)

I have simple example for decorator usage which is straightforward to understand:
[python]
def print_fcn_name(func):
def wrapper():
..... More

Print this item

  Facing issue in python regex newline match
Posted by: Shr - Oct-12-2023, 08:54 AM - Forum: General Coding Help - Replies (6)

Hi Everyone,

.Myc PGGGGG_UIII_Q9999_AB A0 B11 B22 D1 D2 D3
+ 4I 3B

I am trying to match the above two line using regex.

\.(myc|Myc)\s+([a-zA..... More

Print this item

  replace text in a txt
Posted by: cartonics - Oct-12-2023, 07:48 AM - Forum: General Coding Help - Replies (19)

[python]# Read in the file
with open('lista.txt', 'r') as file:
filedata = file.read()

# Replace the target string
filedata = filedata.replace..... More

Print this item

  Noon Beginner
Posted by: stix77 - Oct-12-2023, 05:36 AM - Forum: News and Discussions - Replies (2)

I just would like to know where I could learn python for a beginner? What would be the best path for this?

Print this item

  my python project for school
Posted by: vavervirus - Oct-12-2023, 03:15 AM - Forum: Homework - Replies (2)

Hello I am in grade 11 and have to finish a comp sci project, but my teacher doesn't really teach I was wondering if anyone can make me a simple code ..... More


Attached Files

.pdf   3.02 lab 2023.pdf (Size: 133.77 KB / Downloads: 291)
Print this item

  JSON Dump and JSON Load
Posted by: foxholenoob - Oct-12-2023, 12:27 AM - Forum: General Coding Help - Replies (8)

I apologize, the insert code snippet button isn't working.

I am having an issue dumping to json and then reading back in. When I read it back in corr..... More

Print this item

  __name__ and __main__ in functions
Posted by: Mark17 - Oct-11-2023, 06:09 PM - Forum: General Coding Help - Replies (3)

Here's a short program:
[code]
lwords = ["a", "an", "and", "as", "at", "but", "for", "how", "if", "in", "of", "off", "nor", "or", "so", "the", "to",..... More

Print this item

  macOS Sonoma (14) seems to need a newer version of Tcl/Tk
Posted by: gernophil - Oct-11-2023, 02:44 PM - Forum: GUI - Replies (1)

Window behavior is buggy with Tcl/Tk version 8.6.12:
https://github.com/Anjok07/ultimatevocal...issues/840
https://github.com/TomSchimansky/..... More

Print this item

  Object Detection with ESP32 CAM.
Posted by: MateoG - Oct-11-2023, 01:44 PM - Forum: Homework - No Replies

Hello, I'm trying to do the following: https://youtu.be/A1SPJSVra9I?si=hI7GlHYcjmXrZWXj but when I click "Run," the "live streaming" and "detection" w..... More

Print this item

  `VSCODE_ENV_REPLACE` in vscode
Posted by: cdaman - Oct-11-2023, 10:24 AM - Forum: General Coding Help - No Replies

Hello,
I am using poetry to managing python project. In vscode terminal when i open that project I got an env variable VSCODE_ENV_REPLACE which con..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  [Tkinter] I’m building a ... 1 minute ago tsgiannis woooee GUI
  [split] print two differe... 11 hours ago Reema Gribouillis General Codin...
  Data Science 11 hours ago Oshadha mamta25 Data Science
  Two arguments in input fu... Yesterday, 00:56 Alfredd Pedroski55 General Codin...
  Backward compatibility qu... 11-08, 10:39 yutaozhou buran News and Disc...
  [openpyxl] Set the lockin... 11-07, 11:59 BelleroDev Pedroski55 General Codin...
  New Users Introduce Yours... 11-07, 09:09 Yoriz BelleroDev Bar
  Best book on learning Pyt... 11-07, 06:07 almahdi mamta25 News and Disc...
  Recommend me a Python boo... 11-06, 08:33 woodward mamta25 Data Science
  Code runs perfectly and j... 11-05, 17:56 compuman145 noisefloor General Codin...
  Natural language processi... 11-05, 14:03 maaaa2401 offsoar Homework
Most views
  The best Prog... 578741
  Tutorial Requ... 509467
  Web Scraping ... 441876
  Newbie with P... 385841
  New Users Int... 375418
Most reputation
buran 581
snippsat 510
Larz60+ 452
Gribouillis 362
deanhystad 328
Most replies
  New Users Int... 452
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12102
buran 8194
snippsat 7388
deanhystad 6907
metulburr 5151
Top referrers
Googlepro 23
python 6
metulburr 6
NonEntity 5
buran 3
Newest members
johnsonlucas83 Today
ColorTig Today
AcoolPurpleOne1863 Today
racingsubby Today
Reema Today

User Panel Messages

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