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,508

Full Statistics

Online Users
There are currently 44 online users.
» 1 Member(s) | 37 Guest(s)
Applebot, Bing, Google, AOL, AOL, Noya_Yonatan

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

 
  Closing a program using a G10 button
Posted by: MBDins - May-23-2021, 10:30 AM - Forum: General Coding Help - Replies (2)

I am looking for a Python script to close a program using a push button connected to a G10 pin on a Raspberry Pi4. Can anybody help please?

Print this item

Exclamation New Code
Posted by: r_anees - May-23-2021, 06:02 AM - Forum: General Coding Help - Replies (4)

[python]name1 = input('Please enter your name: ')
if name1 == str (anees) or str (clow) :
print( 'Authentication Success, You are allowed ..... More

Print this item

  python logrotate adding other handlers
Posted by: RRR - May-23-2021, 06:02 AM - Forum: General Coding Help - No Replies

Hi , I am new to python. I am trying to have a logrotate feature and also try to print the logs in formatted fashion.
So I have created two handlers ..... More

Print this item

  BeautifulSoup
Posted by: andre_kadomoto - May-23-2021, 04:54 AM - Forum: Web Scraping & Web Development - Replies (5)

Hello, guys!

Need a little help here...
I've tried many ways, but I couldn't hack it..

I need to extract a list of the titles in the html below
The ..... More

Print this item

  Python LogisticRegression
Posted by: albertjblack - May-23-2021, 04:25 AM - Forum: General Coding Help - Replies (1)

Hello can anyone help
I do not understand what is happening here...
I do not understand what is happening here... PYTHON CODE

[python]
for i..... More


Attached Files

.py   logistic_regression.py (Size: 2.92 KB / Downloads: 349)
.csv   data.csv (Size: 10.67 KB / Downloads: 388)
Print this item

Shocked School project -- need help with it it says syntax error
Posted by: XPGKNIGHT - May-23-2021, 03:50 AM - Forum: Homework - Replies (6)

Hi,

I have a year 7 school project due in 1 week. Cant figure out why it wont work. Please help. The program I use wont tell me where the error is...... More

Print this item

  Setting the x-axis to a specific column in a dataframe
Posted by: devansing - May-23-2021, 12:11 AM - Forum: Data Science - No Replies

Hi,

I am trying to update the x-axis on a line chart that contains two y-axes. The data is being read from two separate Excel files and the column..... More


Attached Files

.xlsx   test_END.xlsx (Size: 10.54 KB / Downloads: 0)
.xlsx   test_START.xlsx (Size: 20.35 KB / Downloads: 0)
Print this item

  What does this code?
Posted by: Elvin - May-22-2021, 08:22 PM - Forum: Homework - Replies (4)

Hello,


What does is this code doing?

[python]def what(n):
if n<10:
return n
else:
k = what((n//100)*10 + n%10)
return (k*10..... More

Print this item

  Scraping based on years BeautifulSoup
Posted by: rhat398 - May-22-2021, 06:42 PM - Forum: Web Scraping & Web Development - No Replies

I am practicing my python skills by scraping different websites and I came across The Hacker News Website I manage to scrape the article's title, link..... More

Print this item

  Is that code correct?
Posted by: Sameh - May-22-2021, 01:43 PM - Forum: Homework - Replies (7)

Hi there,

This is my first participation. to answer ►How many miles are there in 10 kilometers?
Is this way correct:

[python]
miles_in_kilome..... More

Print this item

  curses issue
Posted by: otalado - May-22-2021, 08:12 AM - Forum: General Coding Help - Replies (2)

I have a fresh install of Debian 10 /lxde. The installed Python3 version is 3.7.3 I intended to learn how to use the curses with Python (https://docs...... More

Print this item

  Help with autostart
Posted by: homac - May-22-2021, 06:44 AM - Forum: General Coding Help - Replies (1)

Have a question about autostarting a screen change. The command below works perfectly...

xrandr --output HDMI-1 --scale-from 1600x960 --display :0..... More

Print this item

  arduino and colaboratory with wifi
Posted by: rithikreddypalla - May-22-2021, 06:21 AM - Forum: General Coding Help - No Replies

Does anyone have an idea into how to read and write data to google colaboratory from Arduino with wifi?
Thank You.

Print this item

  Selecting the first occurrence of a duplicate
Posted by: knight2000 - May-22-2021, 03:10 AM - Forum: General Coding Help - Replies (8)

Hi all,

I'm new to coding and thought I would try and practice a little website scraping.

I've come across an instance where an element (?) I'..... More

Print this item

  Looping/Scheduling webelement select
Posted by: Dredd - May-22-2021, 01:58 AM - Forum: Web Scraping & Web Development - Replies (1)

Hi guys,

I am wanting help with either turning this below code into either a For statement so I can ultimately create a loop for hourly or scheduli..... More

Print this item

  How to resolve Index Error in my code?
Posted by: codify110 - May-21-2021, 10:59 PM - Forum: General Coding Help - Replies (6)

This is the code
[code]

MAX, MIN = 1000, -1000


# Returns optimal value for current player
# (Initially called for root and maximizer)
def minimax(..... More

Print this item

  Set Text in Open Dialog Box
Posted by: giddyhead - May-21-2021, 06:31 PM - Forum: General Coding Help - No Replies

Hello everyone,

I am trying send text to the File Name box and then click the button open. It is the textbox from the open dialog box you get when ..... More


Attached Files

Thumbnail(s)
   
Print this item

  Using regex for type validation
Posted by: ranbarr - May-21-2021, 04:53 PM - Forum: Homework - Replies (5)

Hi everyone,
I'm stating to learn regex and I'm trying to solve a problem using it.
I need to write a function that gets a file and need to check so..... More

Print this item

  dictionary
Posted by: coral_raha - May-21-2021, 08:39 AM - Forum: General Coding Help - Replies (5)

hi i have this code with 4 files f.text, n.text, j.text, a.text
[python]

import os
currentPath =__file__

directoryPath = os.path.dirname(cur..... More

Print this item

  Dictionaries
Posted by: ChloeH - May-21-2021, 03:03 AM - Forum: General Coding Help - Replies (2)

I need help with looping through the values of a dictionary.
[python]
def combine_dict(year_dict, headers):
borough={}
i=0
for x in ..... More

Print this item

  common element in some lists
Posted by: Skaperen - May-21-2021, 12:50 AM - Forum: News and Discussions - Replies (4)

i am wanting a function that does this. i get a list of list (any type sequence of any type sequences). it can even be sets (of course the inner con..... More

Print this item

  Microsoft Funds a Team with Guido van Rossum to Double the Speed of Python
Posted by: Larz60+ - May-20-2021, 11:48 PM - Forum: News and Discussions - No Replies

Interesting: https://developers.slashdot.org/story/21...-of-python

Print this item

  is an f-sting not a literal?
Posted by: Skaperen - May-20-2021, 10:50 PM - Forum: News and Discussions - Replies (7)

is an f-sting not a literal? it fails in ast.literal_eval():
[output]
lt2a/forums /home/forums 4> py
Python 3.6.9 (default, Jan 2..... More

Print this item

  Can't install Python 2.6.9 with Pyenv
Posted by: Whyze - May-20-2021, 07:39 PM - Forum: General Coding Help - Replies (6)

Hi,

I'm trying to install Python 2.6.9 in Pyenv 1.2.27. I used Doctor to check if everything is in working order. It says I'm ready to build Python..... More

Print this item

  Convert several columns to int in dataframe
Posted by: Krayna - May-20-2021, 05:31 PM - Forum: Data Science - Replies (2)

I have imported data into dataframe. Some columns have been formatted as float64 but when I try to convert to int, I get a ValueError and 'cannot conv..... More

Print this item

  Import multiple CSV files into pandas
Posted by: Krayna - May-20-2021, 04:56 PM - Forum: Data Science - No Replies

Hello,
I have an iPython notebook which I am using. I am attempting to import several CSV files in one go - each into an individual dataframe. Howev..... More

Print this item

  fuzzy regression in python
Posted by: mohamed_L - May-20-2021, 03:33 PM - Forum: Data Science - No Replies

hello there

I just want to ask if anybody knows how to make a fuzzy regression in python or have an article explaining it because I am stuck trying..... More

Print this item

  Making certain texts stop at a certain time
Posted by: Arikiu - May-20-2021, 02:52 PM - Forum: General Coding Help - Replies (6)

Hello , i'm trying to create a loop with 3 text messages . All of them run in the same time using just a time.sleep to create a pause but i don't kno..... More

Print this item

  Checking if string starts the same but end differently using re module
Posted by: ranbarr - May-20-2021, 02:21 PM - Forum: Homework - Replies (1)

Hi!
Im learning the re module and having a difficulties with the writing of it so Ill be happy to have some explanations.
I have a file with a lot o..... More

Print this item

  help on django issue
Posted by: jip31 - May-20-2021, 01:37 PM - Forum: Web Scraping & Web Development - Replies (1)

Hi
I follow the tuto below in order to display a simple "hello" message with django in windows
but when I launch my web page from http://127.0.0.1:800..... More

Print this item

  cannot print DateEntry date
Posted by: euras - May-20-2021, 12:57 PM - Forum: GUI - Replies (4)

Can someone help me with DateEntry, printing a value? Now I'm stuck on this part and for some reason .get_date() does not work :/
[python]import tkin..... More

Print this item

  readline inside and outside functions
Posted by: paul18fr - May-20-2021, 12:33 PM - Forum: General Coding Help - Replies (2)

Hi

Because of the size of files I'm working on (often more than a billion lines for example), and the number of different types of data to be recor..... More

Print this item

  Unable to upload files to my thread?
Posted by: MDRI - May-20-2021, 03:11 AM - Forum: Board - Replies (2)

Thanks for reviewing my threads.

I opened a new thread, where I tried to upload .xml, .xsd files. It is not allowing to upload.

It shows the att..... More

Print this item

  IWhat is the cause to get XPath in weird format using Python?
Posted by: MDRI - May-20-2021, 02:56 AM - Forum: General Coding Help - Replies (7)

IWhat is the cause to get XPath in weird format using Python?
==============================================

Thanks for reviewing this thread.
..... More


Attached Files

.xml   W2TestfileS.xml (Size: 2.73 KB / Downloads: 483)
.zip   IRSW2.zip (Size: 2.71 KB / Downloads: 533)
Print this item

  expression vs statement
Posted by: Skaperen - May-20-2021, 12:35 AM - Forum: News and Discussions - Replies (1)

given a string with a snippet of Python code, is there an easy way to determine if it is an expression or a statement or group of statements like a sc..... 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 Anunderling 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... 576478
  Tutorial Requ... 498343
  Web Scraping ... 440371
  Newbie with P... 384264
  New Users Int... 367355
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 6891
metulburr 5151
Top referrers
Googlepro 23
python 6
metulburr 6
NonEntity 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