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,934
» Latest member: alexguemez
» Forum threads: 38,721
» Forum posts: 175,508

Full Statistics

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

Latest Threads
403 Error
Forum: Web Scraping & Web Development
Last Post: CaptainNewb
2 hours ago
» Replies: 9
» Views: 2,654
Too much space between gr...
Forum: GUI
Last Post: RonR
8 hours ago
» Replies: 4
» Views: 1,080
datetime in SQL query.
Forum: General Coding Help
Last Post: Dibbley
9 hours ago
» Replies: 3
» Views: 97
Another app idea - intera...
Forum: News and Discussions
Last Post: Lenowell
Yesterday, 07:07 AM
» Replies: 1
» Views: 463
real community
Forum: News and Discussions
Last Post: decuser
Sep-15-2025, 08:16 PM
» Replies: 3
» Views: 1,635
variable changing types f...
Forum: General Coding Help
Last Post: Gribouillis
Sep-15-2025, 06:45 PM
» Replies: 1
» Views: 559
looking for help
Forum: Bar
Last Post: Azdaghost
Sep-15-2025, 05:03 PM
» Replies: 0
» Views: 176
Seeking feedback: dynamic...
Forum: General Coding Help
Last Post: Bona2000
Sep-15-2025, 03:28 PM
» Replies: 7
» Views: 3,072
Select Python comment (#)...
Forum: General Coding Help
Last Post: Pedroski55
Sep-14-2025, 11:27 PM
» Replies: 6
» Views: 1,303
data input while debuggin...
Forum: General Coding Help
Last Post: deanhystad
Sep-14-2025, 03:32 PM
» Replies: 2
» Views: 975

 
  do you have an idea for optimizing this code?
Posted by: netanelst - May-19-2022, 07:12 AM - Forum: General Coding Help - Replies (3)

[python]
ip=0
import html
from imp import C_EXTENSION
import pandas as pd
from werkzeug import utils
from asyncio import get_running_loop
from..... More

Print this item

Bug do you have an idea to optimize this code[recursion]]?
Posted by: netanelst - May-19-2022, 06:50 AM - Forum: Code Review - No Replies

thanks
netanel

[python]class l():
def __init__(self,name,created_on,last_valid_on):
self.name=name
self.created_on=created_..... More

Print this item

  I am trying to run pytest and getting error that doesn't show up when running pytest.
Posted by: uobouhb - May-19-2022, 03:01 AM - Forum: Web Scraping & Web Development - Replies (1)

Hi,

This is in python flask.

I am getting an error in pytest. When I run pytest it says it is working but I get the output below
[output]app\t..... More

Print this item

  [Solved]Help displaying SQLite Database
Posted by: Extra - May-19-2022, 01:19 AM - Forum: GUI - Replies (9)

Hello,

I'm trying to display my database on my TableWidgetItem in PyQt.

This is a snippet of my SQLite part of the code:
[python]
#---..... More

Print this item

  Get input for reading DB and refreshing plotly.graph_objects
Posted by: michel77777 - May-18-2022, 08:51 PM - Forum: GUI - Replies (1)

Hi,

there is a simple Python appilaction, which reads data from SQL database and shows the result as plotly.graph_objects.

I want the get two val..... More

Print this item

  NameError: name 'self' is not defined
Posted by: walter - May-18-2022, 02:31 PM - Forum: Code Review - Replies (11)

Hi guys,
i am a newbie in Python. I have a problem with an OOP issue. This is my code

[python]class Solution:
def __init__(self):
se..... More

Print this item

  trying to recall a regex for re.split()
Posted by: Skaperen - May-18-2022, 09:56 AM - Forum: General Coding Help - Replies (23)

i can't find where this was and can't recall it. regex stuff still doesn't sink in.

what i am wanting to do is split with all leading decimal digi..... More

Print this item

  how to parse this array with pandas?
Posted by: netanelst - May-18-2022, 09:26 AM - Forum: General Coding Help - Replies (2)

i glad for any help because I tried without succeed



I attached link to data in array:
https://pastebin.com/WnQMnn54

thanks
netanel

Print this item

  pysftp connection issue
Posted by: geil007 - May-18-2022, 08:40 AM - Forum: General Coding Help - No Replies

hi all,

i am trying to connect to an AWS hosted SFTP server from my Azure Databricks Notebook.

[python]import pysftp as sftp
from base64 import..... More

Print this item

  python update binary object (override delivered Object properties)
Posted by: pierre38 - May-17-2022, 03:30 PM - Forum: General Coding Help - Replies (4)

Hello,
I did many trials without success. I need to have flexibility in my Python code, so I use already .yaml configuration for deliverable scripts ..... More

Print this item

  how to parse this array with pandas?
Posted by: netanelst - May-17-2022, 12:30 PM - Forum: Data Science - Replies (1)

i glad for any help because I tried without succeed



I attached link to data in array:
https://pastebin.com/WnQMnn54

thanks
netanel

Print this item

  Populating an array dynamically
Posted by: zxcv101 - May-17-2022, 10:40 AM - Forum: General Coding Help - Replies (1)

Hi guys - am new to Python, so if my questions seem basic, pls bear with me.

I have a script which returns rows of data in this format :

2022051..... More

Print this item

  ValueError: Length mismatch: Expected axis has 8 elements, new values have 1 elements
Posted by: ilknurg - May-17-2022, 08:50 AM - Forum: General Coding Help - Replies (1)

[python]import mysql.connector
import pandas as pd


def to_camel_case(col_name: str) -> str:
#""function to convert column names to camel c..... More

Print this item

  Mysql Syntax error in pymysql
Posted by: ilknurg - May-17-2022, 07:43 AM - Forum: General Coding Help - Replies (4)

I have the code below for migration from mysql to postgresql.

[python]def get_mysql_connection(database_name: Optional[str] = None) -> MysqlConnect..... More

Print this item

  break out of for loop?
Posted by: User3000 - May-16-2022, 07:48 PM - Forum: General Coding Help - Replies (3)

hi, I am using Kodi and I have my movies in different folders depending on the resolution, refresh rate and available soundtrack (like Dolby Atmos, DD..... More

Print this item

  How to avoid the extra set of y-axis labels?
Posted by: Mark17 - May-16-2022, 06:48 PM - Forum: General Coding Help - Replies (9)

This programs works fine:

[Python]
import matplotlib.pyplot as plt

sample_data = [[3000,18], [3200,17], [3500,16], [4000,12]]
sample_df = pd.D..... More

Print this item

  Why the NameError?
Posted by: Mark17 - May-16-2022, 02:27 PM - Forum: General Coding Help - Replies (4)

Hi all,

In Jupyter Notebook I ran these cells:

[Python]
sample_data = [[3000,18], [3200,17], [3500,16], [4000,12]]
sample_df = pd.DataFrame(sa..... More

Print this item

  importing functions from a separate python file in a separate directory
Posted by: Scordomaniac - May-16-2022, 01:44 PM - Forum: General Coding Help - Replies (3)

So I can easily call a function from a file in the same directory as the one i'm running:
[python]from functestsetup import functest
functest()
[/p..... More

Print this item

  I have an issue with Netmiko Error reading SSH protocol banner
Posted by: omarhegazy - May-16-2022, 11:54 AM - Forum: General Coding Help - Replies (2)

I wrote a code to go through an inventory list of Cisco devices and do some tasks. My problem is because the inventory list is huge, and no guarantee ..... More

Print this item

Question Program: Assign roles to players depending on priorities
Posted by: raquel86 - May-16-2022, 11:10 AM - Forum: Homework - No Replies

Hi!
I'm new in the forum and I hope this is the right place to ask this. I need guidance to develop a program in Python. I wouldn't exactly need the ..... More

Print this item

  listbox selection
Posted by: DPaul - May-16-2022, 09:30 AM - Forum: GUI - Replies (4)

Hi,
I have a listbox for MULTIPLE selection.

def getElement(event):
    selection = event.widget.curselection()
the variable "sel..... More

Print this item

  Make Random Choices the same [SOLVED]
Posted by: AlphaInc - May-16-2022, 09:17 AM - Forum: General Coding Help - Replies (6)

Hello everybody,

I wanted to set up a list of strings and print one randomly.
This was really easy to set up:
[python]
#Random Variables
myList..... More

Print this item

  Passionate Python developer from India "waiting" :/ to get hired
Posted by: sunando_samaddar - May-16-2022, 07:20 AM - Forum: Jobs - Replies (3)

Hi, I've been struggling, and struggling, and struggling in my city, Kolkata, for the last 8 years. Sad It's time I need somebody who can hire me..... More


Attached Files

.pdf   resume052022.pdf (Size: 76.12 KB / Downloads: 3)
Print this item

  Refresh token for Wyze SDK
Posted by: duckredbeard - May-16-2022, 04:33 AM - Forum: General Coding Help - No Replies

I have added a few Wyze smart bulbs to my home security system, running them on their own program but using door sensors from the security program. E..... More

Print this item

  Mixed types of numeric data in the statistics module
Posted by: stevendaprano - May-16-2022, 02:49 AM - Forum: News and Discussions - Replies (2)

Users of the statistics module, how often do you use it with heterogeneous data (mixed numeric types)?

Currently most of the functions try hard to ..... More

Print this item

  How to instantly update the plot by getting values from a Scale widget?
Posted by: OLE - May-15-2022, 09:30 PM - Forum: GUI - Replies (20)

I have a 3d grid system of 3*4*10 grids (nx*ny*nz), and I have assigned a random value to each grid. I want to plot different surfaces o..... More

Print this item

  How do I solve the second problem?
Posted by: Cranberry - May-15-2022, 05:37 PM - Forum: General Coding Help - Replies (1)

I'm stuck, I'm looking to know how to do the Second Problem. I'll share what I have for the first problem in hopes of getting help with the sec..... More

Print this item

  Problem with searching over Beautiful Soap object
Posted by: Pavel_47 - May-15-2022, 09:37 AM - Forum: Web Scraping & Web Development - Replies (30)

Hello,

Here is BS object where I want to extract "publisher" value.
The value I want to extract is [b]Springer; 1st ed. 2020 edition (April 27, 20..... More

Print this item

  QAbstractTableModel: Indexing a list of dictionaries
Posted by: BigMan - May-15-2022, 03:47 AM - Forum: GUI - Replies (1)

Hi,

I have a list of dictionaires. Something like that:

[python]
addressbook = []
address_1 = {"city": "Berlin", street": "Alexanderplatz"}
a..... More

Print this item

  (OpenCV) Help to improve code for object detection and finding center of it
Posted by: saoko - May-14-2022, 05:34 PM - Forum: General Coding Help - No Replies

Hello. I'm writing the code to find contours and extract the bounding rectangle coordinates, then find center coordinate and draw center point. But I'..... More

Print this item

  Help with passing values in npyscreen
Posted by: Extra - May-14-2022, 02:25 PM - Forum: General Coding Help - Replies (8)

Hello,

I'm playing around with npyscreen to make my terminal application look nicer and be more user friendly.
I'm trying to take in the user's in..... More

Print this item

  error
Posted by: muratuzun - May-14-2022, 02:17 PM - Forum: General Coding Help - Replies (1)

Hello,

When I run the csv file data I have with the following command, I get an error. I wonder if I got this from a ready-made command? What shoul..... More

Print this item

  Web scraping for search results
Posted by: JOE - May-14-2022, 06:32 AM - Forum: Web Scraping & Web Development - Replies (7)

Hi , I was trying to extract search results but has the error "AttributeError: 'list' object has no attribute 'text'[/output]"

Please suggest.

[..... More


Attached Files

Thumbnail(s)
   
Print this item

  sum() list from SQLAlchemy output
Posted by: Personne - May-13-2022, 10:51 PM - Forum: General Coding Help - Replies (5)

Hello guys,

I'm sure it is simple. Have a SQLAlchemy query such as:
[python]qp = db.session.query(UInventory, func.sum(UInventory.quantity).label('to..... More

Print this item

  Invalid syntax
Posted by: Slome - May-13-2022, 08:12 PM - Forum: Homework - Replies (2)

When i run this,


import csv

def main():
with open("battle_royale.csv") as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
..... More


Attached Files

Thumbnail(s)
   
Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  403 Error 2 hours ago CaptainNewb CaptainNewb Web Scraping ...
  [Tkinter] Too much space ... 8 hours ago RonR RonR GUI
  datetime in SQL query. 9 hours ago Dibbley Dibbley General Codin...
  Another app idea - intera... Yesterday, 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
  Seeking feedback: dynamic... 09-15, 15:28 Bona2000 Bona2000 General Codin...
  Select Python comment (#)... 09-14, 23:27 SpongeB0B Pedroski55 General Codin...
  data input while debuggin... 09-14, 15:32 fred1232 deanhystad General Codin...
  New to Python and Pygame 09-14, 11:25 JMcM JMcM Game Developm...
Most views
  The best Prog... 575914
  Tutorial Requ... 497295
  Web Scraping ... 439897
  Newbie with P... 383628
  New Users Int... 365952
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+ 12088
buran 8174
snippsat 7367
deanhystad 6894
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
NonEntity 6
python 6
buran 3
Newest members
alexguemez Today
Shadab Today
Dibbley Today
XenonBlack Yesterday
Lenowell Yesterday

User Panel Messages

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