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,941
» Latest member: Noya_Yonatan
» Forum threads: 38,722
» Forum posts: 175,510

Full Statistics

Online Users
There are currently 60 online users.
» 0 Member(s) | 54 Guest(s)
Bing, Google, AOL, AOL, Apple

Latest Threads
Using a For Loop to subtr...
Forum: General Coding Help
Last Post: bowlofred
2 hours ago
» Replies: 2
» Views: 144
403 Error
Forum: Web Scraping & Web Development
Last Post: snippsat
Yesterday, 04:28 PM
» Replies: 11
» Views: 4,379
what does % stand for in ...
Forum: General Coding Help
Last Post: arbiel
Sep-19-2025, 07:55 PM
» Replies: 2
» Views: 803
Scraping a page with log ...
Forum: Web Scraping & Web Development
Last Post: Hershien
Sep-19-2025, 12:30 PM
» Replies: 1
» Views: 3,655
C++ program embedding Pyt...
Forum: General Coding Help
Last Post: Alexandros
Sep-19-2025, 11:11 AM
» Replies: 4
» Views: 1,151
Too much space between gr...
Forum: GUI
Last Post: RonR
Sep-17-2025, 11:22 AM
» Replies: 4
» Views: 2,663
datetime in SQL query.
Forum: General Coding Help
Last Post: Dibbley
Sep-17-2025, 10:31 AM
» Replies: 3
» Views: 1,477
Another app idea - intera...
Forum: News and Discussions
Last Post: Lenowell
Sep-16-2025, 07:07 AM
» Replies: 1
» Views: 1,668
real community
Forum: News and Discussions
Last Post: decuser
Sep-15-2025, 08:16 PM
» Replies: 3
» Views: 2,593
variable changing types f...
Forum: General Coding Help
Last Post: Gribouillis
Sep-15-2025, 06:45 PM
» Replies: 1
» Views: 1,769

 
  Exclude unwanted match-result
Posted by: jimsxxl - Apr-25-2021, 01:57 PM - Forum: Web Scraping & Web Development - Replies (2)

Hello guys!
I encountered a situation which i think is good to learn.
I get 2 matches when im trying to find_all with Selenium.
Im trying to scrape..... More

Print this item

  Help with Websocket-Client Module - Infinite Loop
Posted by: CluelessChris - Apr-25-2021, 01:53 PM - Forum: Networking - No Replies

I need some help with the Websocket-Client (documentation). I have written a program to permanen..... More

Print this item

  logger option , where is the file?
Posted by: korenron - Apr-25-2021, 12:49 PM - Forum: General Coding Help - Replies (1)

Hello ,
I notice in many examples there is a logger
[python]
import loggin
logger = logging.getLogger('localGATT')
logger.setLevel(logging.D..... More

Print this item

  Bluetooth send message after connecting?
Posted by: korenron - Apr-25-2021, 11:40 AM - Forum: General Coding Help - Replies (2)

Hello,
I'm running python on my PI-Zero
and I want to the following :
1. be able to change the BLuetooth name from the code (NOT BLE , simple\ru..... More

Print this item

Photo Windows 10 PowerShell doesn't work
Posted by: Amy - Apr-25-2021, 09:37 AM - Forum: General Coding Help - Replies (3)

This is the first day for me to learn python.
I don't know why PowerShell can't show my code.
file:///C:/Users/%E6%9E%97%E5%96%86/Desktop/%E5%B1%8F%..... More

Print this item

  Python generics: How to infer generic type from class attribute?
Posted by: Thoufak - Apr-25-2021, 09:31 AM - Forum: General Coding Help - No Replies

Let's say I have a number of requests types each of which correspond to exactly one reponse type. Each request is represented as a subclasse of the Re..... More

Print this item

  If match not found print last line
Posted by: tester_V - Apr-25-2021, 04:22 AM - Forum: General Coding Help - Replies (2)

Greetings!
I need to print the last line of a file if a match (second match) not found.
I'm printing all the lines with "match-2" for each "match-1"..... More

Print this item

  _tkinter.TclError: can't invoke "destroy" command: application has been destroyed
Posted by: knoxvilles_joker - Apr-25-2021, 03:34 AM - Forum: GUI - Replies (6)

Still sorting through how to make a splash window close automatically after application starts

I think it has to do with the way I have to format t..... More

Print this item

  Beginner dumb questions related to job search
Posted by: Nata444 - Apr-25-2021, 01:50 AM - Forum: News and Discussions - Replies (5)

Posted this in the wrong forum, sorry. Don't see how to delete it.

Hi, all,

This will be a weird post but I'm really hoping to get answers.

So, ..... More

Print this item

  Synchronizing tkinter with serial baud rate
Posted by: xbit - Apr-25-2021, 01:21 AM - Forum: GUI - Replies (3)

I am creating an appplication, for displaying my arduino serial data that i receive.

However, my application has bugs.

Sometimes, after some tim..... More

Print this item

  Can I use Python in ns3 simulator to create an IGP routing protocol?
Posted by: leemao - Apr-24-2021, 10:55 PM - Forum: Networking - Replies (1)

Hello,

I would like to know if it's possible to code an OSPF-based routing protocol in Python in ns3 simulator ?

Otherwise, what are your sugges..... More

Print this item

  More elegant way to remove time from text lines.
Posted by: Pedroski55 - Apr-24-2021, 10:24 PM - Forum: General Coding Help - Replies (6)

I have 10 text files and 10 mp3s

The text files have some lines with no time headers, but most lines look like this:

[11:29.53]Good morning, everyon..... More

Print this item

  Prevent urllib.request from using my local proxy
Posted by: spacedog - Apr-24-2021, 08:55 PM - Forum: General Coding Help - No Replies

Using the code below I can still pull a page from the web. Where you see:
'xxxx'

Should be a valid proxy.
[python]proxy_handler = urllib.request..... More

Print this item

  code for CSV file to html file without pandas
Posted by: jony057 - Apr-24-2021, 05:51 PM - Forum: General Coding Help - Replies (1)

Need to write information into csv and then transfer this information to HTML file.

Print this item

  Arc_AntsHunt: Game Developed In Python Arcade
Posted by: adt - Apr-24-2021, 02:44 PM - Forum: Code sharing - Replies (2)

Link to github page listing this repository along with other ones:
Arc_AntsHunt

This game, de..... More

Print this item

  textvariable not updating on threshold value
Posted by: knoxvilles_joker - Apr-24-2021, 10:07 AM - Forum: GUI - No Replies

On the fire screen class SecondFrame. I have a button that is not updating once ammo hits a certain level. I have it kind of updating like I want wh..... More

Print this item

Question running Flask with waitress having web traffic log...
Posted by: SpongeB0B - Apr-24-2021, 09:50 AM - Forum: Web Scraping & Web Development - Replies (3)

Hi everyone,

Following my previous thread: Flask-Self-hosted-deployme[url=https://python-forum.io/thread-33422.html]..... More

Print this item

  My WIndow isnt opening at all.
Posted by: SovietMilkerGenerak - Apr-24-2021, 09:48 AM - Forum: GUI - Replies (1)

[python]import sys
from PyQt5.QtWidgets import *


class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init..... More

Print this item

  drawing textvariable from Button inside canvas
Posted by: knoxvilles_joker - Apr-24-2021, 08:38 AM - Forum: General Coding Help - Replies (7)

In the top left and right I am trying to draw a circle that a button will exist in that will change as certain keys are pressed.

[python]import tki..... More

Print this item

  urllib.request.ProxyHandler works with bad proxy
Posted by: spacedog - Apr-24-2021, 08:02 AM - Forum: General Coding Help - No Replies

I'm using urllib.request to read pages for scraping. Things were connecting and reading OK but I wanted to add some exception handling in-case one of..... More

Print this item

  Redirecting all print statements from all functions inside a class to Tkinter
Posted by: Anan - Apr-24-2021, 04:37 AM - Forum: GUI - Replies (1)

I have written the below code for displaying some content on the GUI window. Some of the code I have removed from between which was not needed here. _..... More

Print this item

  Need help with XPath using requests,time,urllib.request and BeautifulSoup
Posted by: spacedog - Apr-24-2021, 12:32 AM - Forum: General Coding Help - Replies (3)

I have an xpath expression that I know works. Using the URL:
https://www.yellowpages.com/houston-tx/m...1657186981

a..... More

Print this item

  [split] [split] How to make a window stay on top
Posted by: knoxvilles_joker - Apr-23-2021, 11:07 PM - Forum: GUI - Replies (10)

Is there a trick to ensure that each popup window always stays on top, or do I have to click on each popup window to make it the active window?

Print this item

  How to measure execution time of a multithread loop
Posted by: spacedog - Apr-23-2021, 07:41 PM - Forum: General Coding Help - Replies (2)

I have a small app that does work on about 100 loops each on a new thread. How can I measure the total execution time from the point where the app st..... More

Print this item

Question Sublist/ Subarray into string Python
Posted by: SantiagoPB - Apr-23-2021, 06:29 PM - Forum: General Coding Help - Replies (2)

I have a little problem , I have this code and I need to convert the final print to a string, to be able to printthe final results in different lines ..... More

Print this item

  ValueError: I/O operation on closed file problem
Posted by: aliwien - Apr-23-2021, 05:49 PM - Forum: General Coding Help - No Replies

[python]import random
import discord
from discord.ext import commands

cad = commands.cad()

my_files=[discord.File('A:\\mar\\as.jpg'), discord...... More

Print this item

  Return won't stop a function
Posted by: jonagold - Apr-23-2021, 04:56 PM - Forum: Game Development - Replies (3)

I'm currently making a menu for my game in python. And I encountered a problem with code, that switches between different menu pages. When it needed t..... More

Print this item

  beginner text formatting single line to column
Posted by: jafrost - Apr-23-2021, 03:47 PM - Forum: General Coding Help - Replies (4)

Hello, I'm brand new to python having worked through an online python course for beginners, but with no other experience. For my first project I've be..... More

Print this item

  Moving specific files then unzipping/decompressing
Posted by: christophereccles - Apr-23-2021, 02:51 PM - Forum: General Coding Help - Replies (2)

So I have a folder with a number of subfolders inside. Inside these folders are a couple of .gz files. I need to recursively copy these files to there..... More

Print this item

  fpdf adding a new font to my report
Posted by: KatMac - Apr-23-2021, 02:19 PM - Forum: General Coding Help - No Replies

Hi

I have created a class to set up the headers and footers for my pdf file.

In my header function inside the class, I would like the heading 'B..... More

Print this item

  Random pictures from a file
Posted by: aliwien - Apr-23-2021, 11:37 AM - Forum: General Coding Help - Replies (2)

Hello I'm trying to create a discord bot and I'm stuck one subject. I want to share a random photo from a folder when someone write in the chat specif..... More

Print this item

  using WinRt module in python script
Posted by: akhilgnair - Apr-23-2021, 05:38 AM - Forum: General Coding Help - No Replies

I want to enable sim pin using WinRT API MobileBroadbandPin. I have imported the API in my script but it is giving an error while initializing.

[py..... More

Print this item

  Appropriate data-structure / design for business-day relations (week/month-wise)
Posted by: sx999 - Apr-22-2021, 06:24 PM - Forum: General Coding Help - Replies (2)

Hi guys,

I'm just trying to figure out "the best", i.e. cleanest and most appropriate way to do the following:

For a specified day, e.g. thursda..... More

Print this item

  Shorter or more descriptive?
Posted by: estarq - Apr-22-2021, 05:44 PM - Forum: Code Review - Replies (2)

Which one should I commit?

[python]for i in range(0, len(data), 2):
decimal_number = int(data[i:i + 2], 16)
binary_number = bin(decimal_numbe..... More

Print this item

  In put path and directory
Posted by: Led_Zeppelin - Apr-22-2021, 05:11 PM - Forum: General Coding Help - Replies (1)

I have a question about the following python 3 code.

[python]
def _create_df(path, directory):
"""
Creates a df (with shuffled entries)..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Using a For Loop to subtr... 2 hours ago Anunderling bowlofred General Codin...
  403 Error Yesterday, 16:28 CaptainNewb snippsat Web Scraping ...
  what does % stand for in ... 09-19, 19:55 arbiel arbiel General Codin...
  Scraping a page with log ... 09-19, 12:30 iamaghost Hershien Web Scraping ...
  C++ program embedding Pyt... 09-19, 11:11 Alexandros Alexandros General Codin...
  [Tkinter] Too much space ... 09-17, 11:22 RonR RonR GUI
  datetime in SQL query. 09-17, 10:31 Dibbley Dibbley General Codin...
  Another app idea - intera... 09-16, 07:07 decuser Lenowell News and Disc...
  real community 09-15, 20:16 decuser decuser News and Disc...
  variable changing types f... 09-15, 18:45 Azdaghost Gribouillis General Codin...
  looking for help 09-15, 17:03 Azdaghost Azdaghost Bar
Most views
  The best Prog... 576510
  Tutorial Requ... 498418
  Web Scraping ... 440399
  Newbie with P... 384295
  New Users Int... 367438
Most reputation
buran 581
snippsat 508
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+ 12087
buran 8175
snippsat 7368
deanhystad 6892
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
NonEntity 6
python 6
buran 3
Newest members
Noya_Yonatan Today
Saipython555 Today
Anunderling Today
Monir Today
atylerfraces2254 Yesterday

User Panel Messages

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