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,464
» Latest member: EZEKIELGRAPHICSMEDIA
» Forum threads: 38,576
» Forum posts: 174,799

Full Statistics

Online Users
There are currently 527 online users.
» 0 Member(s) | 524 Guest(s)
Bing, Yandex, Google

Latest Threads
Return a string or byte o...
Forum: General Coding Help
Last Post: Calab
28 minutes ago
» Replies: 3
» Views: 124
class Blockage not projec...
Forum: General Coding Help
Last Post: Azdaghost
1 hour ago
» Replies: 0
» Views: 12
Retired and Learning Pyth...
Forum: Code sharing
Last Post: BarbaraGonzalez
5 hours ago
» Replies: 1
» Views: 324
Pip help
Forum: General Coding Help
Last Post: Larz60+
8 hours ago
» Replies: 4
» Views: 296
Paste text with caret alr...
Forum: General Coding Help
Last Post: armorerratic
Today, 01:12 AM
» Replies: 2
» Views: 942
problems with netcdf if I...
Forum: General Coding Help
Last Post: Larz60+
Yesterday, 10:16 PM
» Replies: 14
» Views: 961
Library Management System
Forum: Homework
Last Post: deanhystad
Yesterday, 01:56 AM
» Replies: 1
» Views: 144
smbus.SMBus i2c code whic...
Forum: General Coding Help
Last Post: NewbyTyro
May-12-2025, 03:51 PM
» Replies: 2
» Views: 266
Why are the PythonT symli...
Forum: News and Discussions
Last Post: gernophil
May-12-2025, 08:10 AM
» Replies: 0
» Views: 129
Send SMS from my phone nu...
Forum: General Coding Help
Last Post: TheTechNexus
May-11-2025, 05:48 PM
» Replies: 4
» Views: 3,812

 
Video Get a executable file (.exe) from a .py file add a promoted class in a QWidget
Posted by: MiguelonReyes - Oct-17-2023, 11:31 PM - Forum: GUI - No Replies

Hi!! guys,
I am trying to get a .exe file ready to be executed from a click of a button on a screen (QMainWindow). In fact, in the past I have done ..... More


Attached Files

.py   000_Main.py (Size: 6.61 KB / Downloads: 192)
.py   mplwidget.py (Size: 698 bytes / Downloads: 223)
.py   SC002_GetChart_plotter.py (Size: 3.48 KB / Downloads: 234)
Print this item

  Sudoku making with base Python
Posted by: wep - Oct-17-2023, 05:46 PM - Forum: Homework - Replies (1)

Good evening,

i am doing some exercises from the course i am attending and one of them is requiring me to realize with base Python a valid sudoku 4..... More

Print this item

  output values change
Posted by: akbarza - Oct-17-2023, 10:11 AM - Forum: General Coding Help - Replies (3)

hi
int the below code:
[python]
def something(num,my_list):
num=3
my_list[0]=3

a=2
b=[2]
something(a,b)
print(a)
# 2 is printed
p..... More

Print this item

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: 254)
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: 236)
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

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Return a string or byte o... 28 minutes ago Calab Calab General Codin...
  class Blockage not projec... 1 hour ago Azdaghost Azdaghost General Codin...
  Retired and Learning Pyth... 5 hours ago breacsealgaire BarbaraGonzalez Code sharing
  Pip help 8 hours ago meditek Larz60+ General Codin...
  Paste text with caret alr... Today, 01:12 Wehaveall armorerratic General Codin...
  problems with netcdf if I... Yesterday, 22:16 Blaubart Larz60+ General Codin...
  Library Management System Yesterday, 01:56 annajoy deanhystad Homework
  smbus.SMBus i2c code whic... 05-12, 15:51 NewbyTyro NewbyTyro General Codin...
  Why are the PythonT symli... 05-12, 08:10 gernophil gernophil News and Disc...
  Send SMS from my phone nu... 05-11, 17:48 aster TheTechNexus General Codin...
  [SOLVED] [Beautiful Soup]... 05-11, 17:32 Winfried Winfried General Codin...
Most views
  The best Prog... 563224
  Tutorial Requ... 447308
  Web Scraping ... 428254
  Newbie with P... 362062
  Thread remain... 334699
Most reputation
buran 580
snippsat 506
Larz60+ 452
Gribouillis 362
deanhystad 327
Most replies
  New Users Int... 449
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12050
buran 8169
snippsat 7324
deanhystad 6826
metulburr 5151
Top referrers
Googlepro 22
metulburr 6
python 6
NonEntity 5
buran 3
Newest members
EZEKIELGRAPHICSMEDIA Today
BarbaraGonzalez Today
william224477 Today
ellena Today
armorerratic Today

User Panel Messages

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