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,933
» Latest member: bennyanderson482
» Forum threads: 38,721
» Forum posts: 175,503

Full Statistics

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

Latest Threads
C++ program embedding Pyt...
Forum: General Coding Help
Last Post: Gribouillis
4 hours ago
» Replies: 2
» Views: 187
403 Error
Forum: Web Scraping & Web Development
Last Post: CaptainNewb
Yesterday, 05:56 PM
» Replies: 9
» Views: 3,217
Too much space between gr...
Forum: GUI
Last Post: RonR
Yesterday, 11:22 AM
» Replies: 4
» Views: 1,625
datetime in SQL query.
Forum: General Coding Help
Last Post: Dibbley
Yesterday, 10:31 AM
» Replies: 3
» Views: 614
Another app idea - intera...
Forum: News and Discussions
Last Post: Lenowell
Sep-16-2025, 07:07 AM
» Replies: 1
» Views: 872
real community
Forum: News and Discussions
Last Post: decuser
Sep-15-2025, 08:16 PM
» Replies: 3
» Views: 1,951
variable changing types f...
Forum: General Coding Help
Last Post: Gribouillis
Sep-15-2025, 06:45 PM
» Replies: 1
» Views: 970
looking for help
Forum: Bar
Last Post: Azdaghost
Sep-15-2025, 05:03 PM
» Replies: 0
» Views: 549
Seeking feedback: dynamic...
Forum: General Coding Help
Last Post: Bona2000
Sep-15-2025, 03:28 PM
» Replies: 7
» Views: 3,519
Select Python comment (#)...
Forum: General Coding Help
Last Post: Pedroski55
Sep-14-2025, 11:27 PM
» Replies: 6
» Views: 1,742

 
  batch file for running python scipt in Windows shell
Posted by: MaartenRo - Jan-21-2022, 07:46 AM - Forum: General Coding Help - Replies (2)

Hi,

I am doing an assignement in a Python learning book in which i have to run my Python script in the Windos shell. It says that i have to make a ..... More

Print this item

  Snake game: how to get an instance for my snake's body multiple times?
Posted by: hajebazil - Jan-21-2022, 04:27 AM - Forum: Game Development - Replies (2)

i am totaly begginer in programming and i am learning all by myself,sooo ty in andvance for any help. i am trying to make a snake game using pygame.My..... More

Print this item

  Understanding a piece of code
Posted by: Michael1 - Jan-20-2022, 06:25 PM - Forum: General Coding Help - Replies (4)

def area(x,y = 3.14): # formal parameters
    a = y*x*x
    print (a)
    return a

a = area(10)
print("area",a)
* Here is w..... More

Print this item

  Homework Hangman Game
Posted by: jagr29 - Jan-20-2022, 05:32 PM - Forum: Homework - Replies (3)

Can someone tell me please how the code parts commented with # ******************** work?
It works but I don´t understand what they..... More


Attached Files

.py   Hangman_2.py (Size: 4.2 KB / Downloads: 312)
Print this item

  Calling exe on network drive
Posted by: GrahamL - Jan-20-2022, 03:33 PM - Forum: General Coding Help - Replies (4)

Hi
I am trying to call an exe on a network drive
[python]
d = "x:\\\RequirmentsEditorInstall.exe"
subprocess.run([d,
'/silen..... More

Print this item

  match type with value in csv parsing function
Posted by: vinci - Jan-20-2022, 01:33 PM - Forum: General Coding Help - Replies (2)

Hello,

In the following code I do some parsing of files (csv):
[CODE]
#!/usr/bin/env python3

import csv

def parse_csv(filename, select=None, types=..... More

Print this item

  add Escape charcters in string
Posted by: GrahamL - Jan-20-2022, 10:45 AM - Forum: General Coding Help - Replies (3)

Hi
I am trying to call an application from a python script in an Azure Devops pipeline
I build a string to the app path
[python]cmd = "C:\Program F..... More

Print this item

  Chatbot AI
Posted by: mmagner2022 - Jan-20-2022, 04:01 AM - Forum: Data Science - Replies (1)

Hello. I am following a tutorial to create an AI chatbot yet I keep getting this error. Any help would be greatly appreciated.

json.decoder.JSOND..... More

Print this item

  Cannot convert the series to <class 'int'> when trying to create new dataframe column
Posted by: Mark17 - Jan-20-2022, 12:53 AM - Forum: General Coding Help - Replies (3)

Hi all,

I have a dataframe df2 with a 'DATE' column that starts with 17169 in row 2. I'm trying to create a new column with a human readable forma..... More

Print this item

Question Scraping Wikipedia Article (Name in 1 column & URL in 2nd column) ->CSV! Anyone?
Posted by: BrandonKastning - Jan-19-2022, 11:39 PM - Forum: Web Scraping & Web Development - Replies (4)

Scraping Wikipedia Article (Name in 1 column & URL in 2nd column) ->CSV! Anyone?

Targeted Columns & All Links

Does anyone ..... More

Print this item

  Python keeps running the old version of the code
Posted by: quest - Jan-19-2022, 11:22 PM - Forum: General Coding Help - Replies (2)

Hello
I have a very weird problem
I am using ubuntu 20.04
I am running my code in terminal like that:

python3 code.py
A..... More

Print this item

  Switch case or match case?
Posted by: Frankduc - Jan-19-2022, 06:14 PM - Forum: General Coding Help - Replies (9)

Hello,

I hate to ask again but i am trying to introduce a switch statement to get rid of if, else statements.

This is the original code and i wo..... More

Print this item

  Handling pdf files with python.
Posted by: fuzzin - Jan-19-2022, 02:11 PM - Forum: General Coding Help - Replies (1)

I'm working on a project that identifies certain words in a PDF file. Once I find the words, I want to leave them marked in the file. Is it possible t..... More

Print this item

Question Installing Security only updates for 3.7.12
Posted by: DailyLlama - Jan-19-2022, 12:47 PM - Forum: General Coding Help - Replies (3)

I am not a Python developer, I am an IT admin who manages SCCM deployments. Part of my role is to keep applications up to date so that security patche..... More

Print this item

  Write the Matrix2 by using Matrix1
Posted by: quest - Jan-19-2022, 12:20 PM - Forum: General Coding Help - Replies (18)

I have this matrix1 which has free values(means that not have numbers but have variables):
[python]
[[rho00 rho01 rho02 rho03 rho04 rho05 rho06 rho..... More

Print this item

  Receiving snmp traps with more than one Community String
Posted by: ilknurg - Jan-19-2022, 09:02 AM - Forum: General Coding Help - No Replies

I have the below snmp trap receiver. I have two community string, public and private.
I want to get traps from the devices who has com. string public..... More

Print this item

  AttributeError: 'list' object has no attribute 'values'
Posted by: ilknurg - Jan-19-2022, 07:50 AM - Forum: General Coding Help - Replies (4)

I have a query. My query returns the result that i want as a dictionary.

Like:

[python][{'community_string': 'public'}, {'community_string': 'p..... More

Print this item

  Calling a base class variable from an inherited class
Posted by: CompleteNewb - Jan-19-2022, 05:39 AM - Forum: General Coding Help - Replies (3)

I have this little program

[code]
class Generic_Player:

def __init__(self):
self.hit = True

def Bust(self):
print(..... More

Print this item

  displaying empty list
Posted by: vlearner - Jan-19-2022, 05:34 AM - Forum: General Coding Help - Replies (5)

I want to fetch all the respective ID's from the given text file but it is giving me empty list. kindly help me in this.

[python]
with open('json-..... More


Attached Files

.txt   json-data.txt (Size: 582 bytes / Downloads: 304)
Print this item

  nsimplify, make zero the really small numbers in the matrix
Posted by: quest - Jan-19-2022, 05:22 AM - Forum: General Coding Help - Replies (5)

I created a symbolic matrix with sympy:

[python]
states = [1,2,3,4,5,6,7,8]
rho = np.array([[sympy.Symbol("rho{}{}".format(i,j)) for j in range(len(s..... More

Print this item

  A python library to create html (domonic)
Posted by: domonic - Jan-18-2022, 10:12 PM - Forum: Code sharing - No Replies

Hi there, nice place. I tried to join last year but it wouldn't let me.

I've been working on a pure python dom in my spare time for learning and pr..... More

Print this item

Question about Numpy indexing.
Posted by: water - Jan-18-2022, 07:54 PM - Forum: Data Science - Replies (1)

a = np.arange(25).reshape(5, 5)
a
[output]
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 1..... More

Print this item

  Can a variable equal 2 things?
Posted by: Extra - Jan-18-2022, 06:42 PM - Forum: General Coding Help - Replies (4)

Hello,

I'm looking to add a text input for my voice assistant in case a mic isn't around.
So if a mic isn't available I'd like to be able to switc..... More

Print this item

  Processing "I am not a spammer" with requests
Posted by: rhubarbpieguy - Jan-18-2022, 05:09 PM - Forum: Web Scraping & Web Development - Replies (1)

I'd like to download all posts from a support site. Can I process the "I am not a spammer" button using requests?

The site has a search feature bu..... More

Print this item

  Tkinter and lambda
Posted by: Cristopher - Jan-18-2022, 03:54 PM - Forum: General Coding Help - Replies (4)

I'm trying to make a button with a simple function with a variable defined in another function. I want the program to check if the key the user entere..... More

Print this item

  File not appending
Posted by: Nu2Python - Jan-18-2022, 03:51 PM - Forum: General Coding Help - Replies (3)

Hi All,

I have been testing a small program for a little while now and recently noticed that the program was not logging any data to my text file. ..... More

Print this item

  Show empty categories in catplot with boxplots
Posted by: PBRM - Jan-18-2022, 02:32 PM - Forum: Data Science - No Replies

I have a dataframe like:

ID * Period * value-system
1 * 2021-11 * 1010
2 * 2021-11 * 0
3 * 2021-11 * 988
4 ..... More


Attached Files

Thumbnail(s)
   
Print this item

  mysql.connector.errors.ProgrammingError: Failed processing format-parameters; Python
Posted by: ilknurg - Jan-18-2022, 12:51 PM - Forum: General Coding Help - Replies (3)

Hi everyone. Im a newbie in python.
I have the code below. Im on ubuntu 18.04. the variable "output " is a json data in my code.

[python]
import..... More

Print this item

  How to set Tab size to 4 in Python interpreter?
Posted by: zzzhhh - Jan-18-2022, 11:08 AM - Forum: General Coding Help - Replies (1)

How to set Tab size to 4 in Python interpreter? I am using Python 3.9.5 interpreter in miniconda3 on Windows 10. Thanks.

Print this item

  readline.parse_and_bind() does not work in start-up script of Python interpreter
Posted by: zzzhhh - Jan-18-2022, 11:05 AM - Forum: General Coding Help - No Replies

I created a startup script file

[python]import readline
readline.parse_and_bind("set disable-completion on")
readline.parse_and_bind("tab: se..... More

Print this item

  datatype check
Posted by: arkiboys - Jan-18-2022, 08:49 AM - Forum: General Coding Help - Replies (1)

Hello,
using synapse pipeline, I generate a .parquet file with data in columns such as HoseNo (Which contains numbers), ClientName (which contains te..... More

Print this item

  How to parse a live feed in Python?
Posted by: Daring_T - Jan-18-2022, 04:07 AM - Forum: General Coding Help - Replies (2)

I am using the subprocess.run() to run handbrakecli to compress a media folder. Whenever I run the command I get a live data feed every 1/2 second in ..... More

Print this item

  PyQt6 Version of weather app
Posted by: menator01 - Jan-18-2022, 02:00 AM - Forum: Code sharing - Replies (3)

This is my attempt at a pyqt6 version of a weather app. It gets its data from forecast.weather.gov. I plan on adding an extended feature soon.

[pyt..... More

Print this item

  How to summarize survey requirement data?
Posted by: data_wiz_5 - Jan-17-2022, 05:14 PM - Forum: Data Science - No Replies

Hi All,
I’m currently trying to find out an algorithmic approach to find the most in demand profile group for a set of survey data, this is example of..... More

Print this item

  Avoid multiple repeat in indent
Posted by: Frankduc - Jan-17-2022, 04:35 PM - Forum: General Coding Help - Replies (8)

Hello,

I am trying to count the number of pairs but in the end i only want the variable count give the total.

[python]import itertools

lim = ..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  C++ program embedding Pyt... 4 hours ago Alexandros Gribouillis General Codin...
  403 Error Yesterday, 17:56 CaptainNewb CaptainNewb Web Scraping ...
  [Tkinter] Too much space ... Yesterday, 11:22 RonR RonR GUI
  datetime in SQL query. Yesterday, 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
  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...
Most views
  The best Prog... 576088
  Tutorial Requ... 497598
  Web Scraping ... 440039
  Newbie with P... 383815
  New Users Int... 366352
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+ 12089
buran 8174
snippsat 7367
deanhystad 6891
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
NonEntity 6
python 6
buran 3
Newest members
bennyanderson482 Today
AstoundzSEO Today
tobey12 Today
alexguemez Yesterday
Shadab Yesterday

User Panel Messages

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