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,394
» Latest member: braillescribe
» Forum threads: 38,822
» Forum posts: 176,021

Full Statistics

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

Latest Threads
Willing to pay for help w...
Forum: General Coding Help
Last Post: braillescribe
2 hours ago
» Replies: 2
» Views: 56
How to Integrate External...
Forum: General Coding Help
Last Post: noisefloor
Yesterday, 06:21 PM
» Replies: 1
» Views: 109
Calling python from anoth...
Forum: General Coding Help
Last Post: eedjsa
Yesterday, 04:06 PM
» Replies: 9
» Views: 253
IP address for users
Forum: Networking
Last Post: itx_sumeet
Yesterday, 05:53 AM
» Replies: 4
» Views: 7,074
Lottery generator (beginn...
Forum: General Coding Help
Last Post: Pedroski55
Yesterday, 01:10 AM
» Replies: 5
» Views: 9,911
[split] How to ask Smart ...
Forum: General Coding Help
Last Post: Pedroski55
Dec-25-2025, 07:58 AM
» Replies: 2
» Views: 150
Need Help with Pandas Con...
Forum: Bar
Last Post: Axel_Erfurt
Dec-24-2025, 10:07 AM
» Replies: 1
» Views: 86
requests.post not sending...
Forum: Web Scraping & Web Development
Last Post: noisefloor
Dec-24-2025, 09:20 AM
» Replies: 2
» Views: 155
Looking for constructive ...
Forum: News and Discussions
Last Post: cecrease
Dec-24-2025, 03:16 AM
» Replies: 2
» Views: 1,299
Switching from batch proc...
Forum: GUI
Last Post: arbiel
Dec-23-2025, 09:38 PM
» Replies: 0
» Views: 120

 
  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: 321)
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: 312)
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

  input function question
Posted by: barryjo - Jan-17-2022, 04:11 PM - Forum: General Coding Help - Replies (12)

I am going crazy and spent hours on this.
it seems my input function does not work.

I have a two line program

[python]x = input()
print(x)[/p..... More

Print this item

  Trying to change BLE name on pi
Posted by: korenron - Jan-17-2022, 12:08 PM - Forum: General Coding Help - No Replies

Hello,
I'm trying to make an app that will change the BLE name on command
this is what I have done:
[python]
"""Example of how to create a Periphera..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Willing to pay for help w... 2 hours ago braillescribe braillescribe General Codin...
  How to Integrate External... Yesterday, 18:21 finallen321 noisefloor General Codin...
  Calling python from anoth... Yesterday, 16:06 eedjsa eedjsa General Codin...
  IP address for users Yesterday, 05:53 Robots itx_sumeet Networking
  Lottery generator (beginn... Yesterday, 01:10 Hullari Pedroski55 General Codin...
  [split] How to ask Smart ... 12-25, 07:58 yoanselcp Pedroski55 General Codin...
  Need Help with Pandas Con... 12-24, 10:07 naproxy_1 Axel_Erfurt Bar
  requests.post not sending... 12-24, 09:20 JarredAwesome noisefloor Web Scraping ...
  Looking for constructive ... 12-24, 03:16 decuser cecrease News and Disc...
  [PyQt] Switching from bat... 12-23, 21:38 arbiel arbiel GUI
  Exploring Different Pytho... 12-23, 13:01 girish_benvanshi ankitsharma32 News and Disc...
Most views
  The best Prog... 580382
  Tutorial Requ... 519245
  Web Scraping ... 442774
  Newbie with P... 386961
  New Users Int... 386358
Most reputation
buran 581
snippsat 511
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+ 12117
buran 8198
snippsat 7398
deanhystad 6920
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
python 6
NonEntity 5
buran 3
Newest members
braillescribe Today
aurelio12282025 Today
bejaminmaarleyo1374 Today
taylorlitleoz476 Today
desy845 Today

User Panel Messages

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