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,977
» Latest member: hoki1881
» Forum threads: 38,732
» Forum posts: 175,563

Full Statistics

Online Users
There are currently 52 online users.
» 0 Member(s) | 41 Guest(s)
Google, Bing, Facebook Dev, Applebot, AOL, AOL, Mojeek

Latest Threads
Integer Factorization Too...
Forum: Code sharing
Last Post: buran
11 hours ago
» Replies: 2
» Views: 231
My goal to be hired worki...
Forum: News and Discussions
Last Post: GnomeSweetGnome
Today, 12:21 AM
» Replies: 2
» Views: 862
Unable to resolve FileNot...
Forum: General Coding Help
Last Post: noisefloor
Yesterday, 05:45 PM
» Replies: 6
» Views: 909
Comparing 2 100GB Drives/...
Forum: General Coding Help
Last Post: snippsat
Yesterday, 12:59 PM
» Replies: 8
» Views: 602
Select Python comment (#)...
Forum: General Coding Help
Last Post: tester_V
Sep-28-2025, 06:39 PM
» Replies: 7
» Views: 2,950
what does % stand for in ...
Forum: General Coding Help
Last Post: Gribouillis
Sep-27-2025, 06:49 PM
» Replies: 4
» Views: 2,365
My First App
Forum: Code Review
Last Post: carlbidwell
Sep-27-2025, 10:53 AM
» Replies: 8
» Views: 8,944
how to export a dictionar...
Forum: GUI
Last Post: noisefloor
Sep-26-2025, 05:13 PM
» Replies: 4
» Views: 1,371
Is the interpreter that c...
Forum: General Coding Help
Last Post: noisefloor
Sep-26-2025, 01:17 PM
» Replies: 1
» Views: 1,283
pdf file processing: how ...
Forum: General Coding Help
Last Post: noisefloor
Sep-26-2025, 01:14 PM
» Replies: 6
» Views: 5,612

 
  [Python3] Trailing newline in readlines.
Posted by: LWFlouisa - Mar-09-2020, 09:47 PM - Forum: General Coding Help - Replies (4)

I seem to have having an issue with trailing newlines when reading in a file.

Steps to reproduce the problem:

(1. Create a file with newlines.
..... More

Print this item

  Help with Scrollbar
Posted by: JJota - Mar-09-2020, 09:19 PM - Forum: GUI - Replies (6)

Hi Folks, could someone help me with this code below please?
I just need to add a scrollbar to my result frame. I tried many ways but unfortunately ..... More

Print this item

  nidmm error
Posted by: stemacDublin - Mar-09-2020, 09:03 PM - Forum: General Coding Help - Replies (2)

Hi All,

I'm having a problem if anyone has come across it before or can shed some light on it, it would be greatly appreciated.

I'm trying to se..... More

Print this item

  calling a variable in a for loop in windows
Posted by: dwaynes - Mar-09-2020, 07:29 PM - Forum: General Coding Help - Replies (1)

I am new to python and I am trying to figure out how to call some windows commands inside a python script, below is the powershell script that works b..... More

Print this item

  AttributeError ?
Posted by: JohnnyCoffee - Mar-09-2020, 06:57 PM - Forum: General Coding Help - Replies (4)

Good.

Can someone give me a hint how do I treat this o 'NoneType' object has no attribute 'string' ? Because I need to print an error message on th..... More

Print this item

  Machine Learning: Process
Posted by: Enanda - Mar-09-2020, 06:55 PM - Forum: Data Science - Replies (13)

Hi All,

I am quite confuse how I should proceed with my Data.

I have data/report from a rental cars company with many location: Number of cars p..... More

Print this item

  POPUP on widget Entry
Posted by: taratata2020 - Mar-09-2020, 06:06 PM - Forum: GUI - Replies (4)

Hi everyone,

I made a script in python version 3.7, to test the context menu on the Entry widget via the right mouse button. The command is "Paste"..... More

Print this item

  How can i continue the game?
Posted by: Guga - Mar-09-2020, 05:22 PM - Forum: Homework - Replies (1)

First of all, I apologize for my bad English. Smile
I tried coding a simple console game

[python]
import time
import random


class pla..... More

Print this item

  scipy.optimize.basinhopping generates unstable output
Posted by: bb19x11 - Mar-09-2020, 04:07 PM - Forum: Data Science - No Replies

Given expected returns "u" (11x1 vector)
, covariance matrix "Cov" (11x11 matrix), and risk coefficient alpha (constant)
I tried to find out the ma..... More

Print this item

  JBrowseEntry
Posted by: kenwatts275 - Mar-09-2020, 03:32 PM - Forum: GUI - Replies (2)

Hello,
I am converting all my PERL scripts to Python.
There is an entry widget in PERL Tk called JBrowseEntry which is an extension of the Entry wid..... More

Print this item

  Pandas dataframe merge
Posted by: snmmat - Mar-09-2020, 12:03 PM - Forum: Data Science - Replies (1)

[python]

my two datasets are

patient_info:

patient_id year_born sex
a7G2n 1985 m
h9GH5 1981 f
b75GH 1991 f
AGK..... More

Print this item

  Help for guessing game code
Posted by: Kronos - Mar-09-2020, 11:39 AM - Forum: General Coding Help - Replies (5)

i am very new to python and began a few days ago, and decided to build a guessing game. i have completed the game but need help in the end part. here ..... More

Print this item

  replace if\else with loop?
Posted by: mcmxl22 - Mar-09-2020, 07:03 AM - Forum: General Coding Help - Replies (3)

I have this program.
This question involves lines 25-51.
To solv..... More

Print this item

  Cannot download pygame
Posted by: JamWeird - Mar-09-2020, 06:26 AM - Forum: General Coding Help - Replies (2)

When I try, this message pops up

ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u ..... More

Print this item

  initialisation and metaclass
Posted by: GuiOhm - Mar-09-2020, 04:27 AM - Forum: General Coding Help - Replies (1)

I try to write classes tied to a database.
I want to build properties with each fields of the database without writing all them by hand.
I'd think t..... More

Print this item

  multiprocessing Pipe.poll very slow
Posted by: seandepagnier - Mar-09-2020, 03:10 AM - Forum: General Coding Help - No Replies

I reduced the cpu usage of my program by more than half by using select.poll rather than the Pipe's own poll routine:

in __init__
[python]
...
..... More

Print this item

  XGboost Regressor output
Posted by: Scott - Mar-09-2020, 01:43 AM - Forum: Data Science - No Replies

Hi everyone,

I am running an XGBoost regressor model with a lot of independent variables. I want to get the model out put for each of the independe..... More

Print this item

  Coding error- help
Posted by: FatherYeals - Mar-08-2020, 10:51 PM - Forum: General Coding Help - Replies (3)

Hello, I'm new to the forum! I'm having an issue with my double dice game code, I keep getting a syntax error. Help and any advice would be appreciat..... More

Print this item

  Game pad controlled helicopter
Posted by: michael1789 - Mar-08-2020, 10:49 PM - Forum: Code sharing - No Replies

I made this little program if anyone wants to make a game with it. It's a helicopter that you fly around, with scrolling.

It's the first time I us..... More

Print this item

  append into json
Posted by: luisbatalla - Mar-08-2020, 10:01 PM - Forum: General Coding Help - Replies (3)

Hi people.

I have this json:

{
	"blocks": [
		{
			"type": "context",
			"elements": [

			]
		}
	]
}
I need to a..... More

Print this item

  Help setting text/title in dock/panel in tkinter gui
Posted by: FluxApex - Mar-08-2020, 08:43 PM - Forum: GUI - Replies (2)

Hello all, I have tried doing a bit of searching elsewhere and within this forum with various kselfey phrases/words for my issue and I am either not a..... More

Print this item

  Creating new list based on exact regex match in original list
Posted by: interjectdirector - Mar-08-2020, 07:38 PM - Forum: General Coding Help - Replies (1)

I've searched pretty well for a preexisting topic but I can't find anything. I know the answer must be out there, I just don't think I perfectly under..... More

Print this item

  ValueError: substring not found
Posted by: nby2001 - Mar-08-2020, 06:10 PM - Forum: General Coding Help - Replies (4)

Let me first start this off by stating that I am a complete beginner to coding and my attempts to fix this have been limited. I am trying to follow th..... More

Print this item

  Tkinter focus
Posted by: catlessness - Mar-08-2020, 05:24 PM - Forum: GUI - Replies (5)

[python]
import tkinter as tk
window=tk.Tk()
window.title('Impedance simulation')
window.geometry('900x700')

entry1=tk.Entry(window,show=None,t..... More

Print this item

  Syntax error
Posted by: gray1306 - Mar-08-2020, 03:33 PM - Forum: General Coding Help - Replies (4)

Hi,

I have a syntax error on line 67 and can't seem to figure out why? can someone please help and explain why please?

[python]# games_database...... More

Print this item

  How to detect key presses
Posted by: BlinkyGamer99 - Mar-08-2020, 03:03 PM - Forum: General Coding Help - Replies (3)

How do you detect key events?

Print this item

  unexpected object?
Posted by: urufu - Mar-08-2020, 02:04 PM - Forum: General Coding Help - Replies (2)

[python]
name = input("Your name, plz:")
file = "temp.txt"
with open(file, "w") as file:
file.write(name + "\n")

file = "temp.txt"
while True:
..... More

Print this item

  Splitting a string twice
Posted by: bazcurtis - Mar-08-2020, 01:22 PM - Forum: General Coding Help - Replies (2)

Hi,

I am splitting a string at a comma and then at a colon. Although this is working I think there must be a nice way.

[python] cn_on..... More

Print this item

  First time coding need a little help
Posted by: Noah - Mar-08-2020, 12:45 PM - Forum: General Coding Help - Replies (1)

When i enter some python and i want to go on an another line i have to press enter which also then just makes the program try and run and come up with..... More

Print this item

  Playtesting...do not assume anything (part 10)
Posted by: metulburr - Mar-08-2020, 11:48 AM - Forum: Game Tutorials - No Replies

When you are making games (or anything for the matter) do not assume anything. Do not assume the user knows how to do this or that. This might sound s..... More

Print this item

  Help python not installing properly
Posted by: Noah - Mar-08-2020, 11:16 AM - Forum: News and Discussions - Replies (1)

I am running windows 10, i have done the download but when i click the shortcut it just brings up a 'modify, repair, uninstall' window i have tried th..... More

Print this item

  How do i multiply elements in a list together
Posted by: Olavv - Mar-08-2020, 11:13 AM - Forum: General Coding Help - Replies (6)

How can I multiply all elements in a list together with a for loop?

Print this item

  Error after installing Python3.8.2: "No module named 'apt_pkg'"
Posted by: Chromie - Mar-08-2020, 07:49 AM - Forum: General Coding Help - Replies (3)

Installation for Python3.8.2 went smoothly. No direct errors. But attempting to update the system (Linux Mint) afterward gives the error message: "N..... More

Print this item

  Iterate through __slots__
Posted by: deanhystad - Mar-08-2020, 05:46 AM - Forum: General Coding Help - Replies (2)

I have a class that uses slots (not the class shown below). The class has a generator that iterates through the attributes and returns those of a cer..... More

Print this item

  String formatting issues?
Posted by: lolatyou - Mar-08-2020, 05:27 AM - Forum: Homework - Replies (2)

#I created a program with two functions and a variable as follows:

[python]def isHarshad(num):
if num % sum([int(x) for x in list(str(num))]) ..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Integer Factorization Too... 11 hours ago fosuwxb buran Code sharing
  My goal to be hired worki... Today, 00:21 GnomeSweetGnome GnomeSweetGnome News and Disc...
  Unable to resolve FileNot... Yesterday, 17:45 llarkin6 noisefloor General Codin...
  Comparing 2 100GB Drives/... Yesterday, 12:59 tester_V snippsat General Codin...
  Select Python comment (#)... 09-28, 18:39 SpongeB0B tester_V General Codin...
  what does % stand for in ... 09-27, 18:49 arbiel Gribouillis General Codin...
  My First App 09-27, 10:53 BCopeland64 carlbidwell Code Review
  [Tkinter] how to export a... 09-26, 17:13 RonR noisefloor GUI
  Is the interpreter that c... 09-26, 13:17 helendamdam noisefloor General Codin...
  pdf file processing: how ... 09-26, 13:14 Pavel_47 noisefloor General Codin...
  Regarding pdf for PCEP an... 09-26, 09:50 P212 Biks News and Disc...
Most views
  The best Prog... 577371
  Tutorial Requ... 500760
  Web Scraping ... 441026
  Newbie with P... 385071
  New Users Int... 369599
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+ 12091
buran 8178
snippsat 7370
deanhystad 6897
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
NonEntity 6
python 6
buran 3
Newest members
hoki1881 Today
stephaniehendrix Today
Schirag Today
Jacobjoift Today
sophielane Yesterday

User Panel Messages

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