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,265
» Latest member: Rerus3700
» Forum threads: 38,788
» Forum posts: 175,851

Full Statistics

Online Users
There are currently 134 online users.
» 0 Member(s) | 132 Guest(s)
Bing, Google

Latest Threads
Access keys and values fr...
Forum: General Coding Help
Last Post: noisefloor
8 minutes ago
» Replies: 1
» Views: 19
How to make ball stay wit...
Forum: General Coding Help
Last Post: deanhystad
Yesterday, 04:07 PM
» Replies: 2
» Views: 111
PermissionError: [Errno 1...
Forum: GUI
Last Post: deanhystad
Yesterday, 02:42 PM
» Replies: 1
» Views: 70
Graph Interpolate Difficu...
Forum: General Coding Help
Last Post: deanhystad
Yesterday, 01:54 PM
» Replies: 1
» Views: 66
sorting a lisr of file pa...
Forum: News and Discussions
Last Post: DeaD_EyE
Yesterday, 01:00 PM
» Replies: 5
» Views: 321
conditional nested loops
Forum: News and Discussions
Last Post: Skaperen
Nov-14-2025, 11:31 PM
» Replies: 0
» Views: 48
PyQt6 QWidgets and system...
Forum: GUI
Last Post: stevecoh1
Nov-14-2025, 06:38 PM
» Replies: 0
» Views: 82
[solved] re.split issue
Forum: General Coding Help
Last Post: deanhystad
Nov-14-2025, 06:02 PM
» Replies: 10
» Views: 289
Please guide me to comple...
Forum: General Coding Help
Last Post: Larz60+
Nov-14-2025, 03:33 PM
» Replies: 3
» Views: 152
New to python and coding
Forum: Homework
Last Post: jefsummers
Nov-13-2025, 07:58 PM
» Replies: 6
» Views: 254

 
  Would you prefer two 'if' statements or an 'if' and an 'else' statement?
Posted by: AnunnakiKungFu - Dec-09-2020, 10:46 PM - Forum: General Coding Help - Replies (6)

[python]
from tkinter import *
import tkinter.messagebox

root = Tk()

tkinter.messagebox.showinfo("This is the window title!","This is some imp..... More

Print this item

  python3.9 installation missing files kali@win10
Posted by: shajimv - Dec-09-2020, 07:40 PM - Forum: Networking - Replies (1)

I am getting below error while trying to install p3.9 on kali linux installed on windows10. Has any one encountered these errors. The errors says abou..... More

Print this item

  How to merge all the files in a directory in to one file
Posted by: sutra - Dec-09-2020, 07:03 PM - Forum: General Coding Help - Replies (3)

I have a bunch of .log in the directory /home/vs/vs_work2/Chi_DEPB/
I want to merge them into a single file.

output_file.txt..... More

Print this item

  Rocket will only move in two directions
Posted by: djwilson0495 - Dec-09-2020, 05:52 PM - Forum: Game Development - Replies (7)

I'm trying to make a simple game where a rocket can move in 4 directions. however currently it only moves left and right even when pressing the up or ..... More

Print this item

  Merging all file_name.log's files from directory to one and search “PerformanceINFO"
Posted by: sutra - Dec-09-2020, 05:09 PM - Forum: General Coding Help - No Replies

My question is: Following question, I want to achieve it in python although I have done this in bash(i have added my code at the end) but I wan..... More

Print this item

  Basic client server code question
Posted by: swisscheese - Dec-09-2020, 04:24 PM - Forum: Networking - Replies (4)

# This is a simple python web server which displays a button and “Hello”.
# How can I modify the code so that when I click the button the webpage sh..... More

Print this item

  Best distro for old 8' windows tablet?
Posted by: masonjones26 - Dec-09-2020, 03:59 PM - Forum: Bar - No Replies

Hi

I'm looking for Linux with the best chance to work with touch controls straight out of the box.

I bought Z3735F/2048MB/32GB tablet that doesn..... More

Print this item

  problem on creating a small game
Posted by: nayo43 - Dec-09-2020, 02:20 PM - Forum: Homework - Replies (5)

hello, i am making a little card game like hearstone more or less.
but i encounter a difficulty when i try to fight the cards.
I do not understand a..... More

Print this item

  Save/load cargame
Posted by: bilalkh12345 - Dec-09-2020, 01:26 PM - Forum: Game Development - Replies (3)

Hello guys I am creating a simple 2d car game with pygame in which you have to dodge the other cars in front by turning right or left with different l..... More

Print this item

  extract particular strings into a variable
Posted by: lokesh - Dec-09-2020, 10:38 AM - Forum: General Coding Help - Replies (3)

Hi,

I have a requirement to get the string data like below.

str = "dsrc, combo, dsrc_hist, mapping, combo_hist"

If a particular value cont..... More

Print this item

  freeOpcUa - get value of subscription
Posted by: Johna - Dec-09-2020, 08:35 AM - Forum: General Coding Help - No Replies

Hi,

first of all I'm new in this forum and also new to python.

I've set up an OPC UA client in Pyhon by using the freeOpcUa library.

https:..... More

Print this item

  Using Metulburr's state machine, having a lag issue with events
Posted by: cjoe1993 - Dec-09-2020, 04:13 AM - Forum: General Coding Help - Replies (4)

Hi, I am using Metulburr's state machine for a project. I have an event that is lagging when NOT coded directly into the ..... More

Print this item

  Can you please explain what the part after import sys is doing?
Posted by: Pedroski55 - Dec-09-2020, 03:32 AM - Forum: General Coding Help - Replies (3)

Actually, I'm only trying to use the Python wc module to count words in a text file.

wc('/proc/cpuinfo') works nicely in Idle!

But I found this..... More

Print this item

  nbconvert and toc threshold
Posted by: milliewoo - Dec-09-2020, 02:05 AM - Forum: News and Discussions - Replies (3)

Hello Everyone!

I would like to convert my jupyter notebook (with toc) to a single html (images embeded) with the following command:

jupyter nbconve..... More

Print this item

  Latest file with a pattern produces an error
Posted by: tester_V - Dec-09-2020, 01:05 AM - Forum: General Coding Help - Replies (4)

Hi,
I'm trying to find the latest file in a directory but only if a file has a digit in its name.
I globbed the files that have "digit/digits" in th..... More

Print this item

Question dict value, how to change type from int to list?
Posted by: swissjoker - Dec-08-2020, 11:37 PM - Forum: General Coding Help - Replies (3)

I have a dictionary, and one of the keys currently has 1 as value, so the value side is an int. I'm trying to make the value side a list so it can hav..... More

Print this item

  how to return False in ternary condition
Posted by: KEYS - Dec-08-2020, 10:21 PM - Forum: General Coding Help - Replies (7)

The code below is running inside a while True loop

if play=='y':
    print('ok')
else:
    return False
I would like to write ..... More

Print this item

  Generating random business cards
Posted by: Inkanus - Dec-08-2020, 09:23 PM - Forum: General Coding Help - Replies (2)

Hello everyone. I can't write a function that generates random business cards in a python's faker. The function is to assume two parameters: the type ..... More

Print this item

  Stop import from executing function, but allow the function to execute from tk btn.
Posted by: MrBitPythoner - Dec-08-2020, 08:58 PM - Forum: GUI - Replies (4)

Hi,

I have python project I am building. It includes a main.py and several other .py files. When I import these other files into main.py, the impor..... More

Print this item

  Sound Approach for Running a Shell Command?
Posted by: matt_the_hall - Dec-08-2020, 08:31 PM - Forum: General Coding Help - Replies (8)

Hello,

I'm trying to use a python script to set an At job in the shell, and I am wanting to make sure my approach is sound. My understanding is tha..... More

Print this item

  Help with my code due 11:59 pm, can you tell me where I went wrong and help fix it?
Posted by: shirleylam852 - Dec-08-2020, 07:23 PM - Forum: Homework - Replies (1)

[python]
url = 'http://nancymcohen.com/csci133/cpiai.txt'
file = urllib.request.urlopen(url)
lines = file.readlines()
file.close()

cpi = {}
fo..... More

Print this item

  PyGame
Posted by: kat_gamer - Dec-08-2020, 07:12 PM - Forum: Game Development - Replies (8)

Hi, so I'm having a bit of trouble exiting the Pygame window I created.
I'm pretty new to python so I assumed this would be an issue Here's the code..... More

Print this item

  Error on Python Version?
Posted by: ErnestTBass - Dec-08-2020, 07:05 PM - Forum: General Coding Help - Replies (6)

[code]
#per SGD classifier i dati devono essere numerically encoded, not dict
from sklearn.linear_model import SGDClassifier
clf = SGDClassifier()..... More

Print this item

  how to change the range of read CSV file every time python file runs
Posted by: greenpine - Dec-08-2020, 05:52 PM - Forum: General Coding Help - Replies (6)

Hello;

I have a function that uses data from CSV file row by row, until the range has been used.

[Edited]
however I want to use the rest of rows of ..... More

Print this item

  Getting a ship to move in pygame
Posted by: djwilson0495 - Dec-08-2020, 05:41 PM - Forum: Game Development - Replies (2)

I'm trying to make a basic alien invasion game but at the moment my ship won't move left to right. I'm not sure why as it was moving before. Can anyon..... More

Print this item

  how to print all data from all data array?
Posted by: korenron - Dec-08-2020, 03:16 PM - Forum: General Coding Help - Replies (3)

Hello,
maybe the names is incorrect so I will show in example
[python]
x = [{'id': '*1F010121', 'name': 'hotspot/Fonts', 'type': 'directory', 'creat..... More

Print this item

  An absolute beginner
Posted by: sivasiba - Dec-08-2020, 01:51 PM - Forum: News and Discussions - Replies (6)

Hello all,
sorry if this has been asked before, I tried to search google and this forum for similar inquiry but every tutorial I came across always ..... More

Print this item

  splitting UAV/sat images to smaller pieces in order to feed a CNN
Posted by: hobbyist - Dec-08-2020, 11:48 AM - Forum: General Coding Help - No Replies

Hello, I have enormous UAV/sat images (around 600MB each in .tif format). I am trying to do 2 things:
1) Divide/Split the 600 MB image to smaller ones..... More

Print this item

  Turning Client Side Script Into Pseusocode
Posted by: VinceLrj - Dec-08-2020, 06:47 AM - Forum: Bar - Replies (3)

Hi, I need help turning this line of client side script to pseudocode.

if(slides.length<2){
var nextPrevBtns=document.querySelector(".lef..... More

Print this item

  Convert looping home security to a one time scan of switches and sensors
Posted by: duckredbeard - Dec-08-2020, 04:31 AM - Forum: General Coding Help - No Replies

I present to you my home security program that monitors several doors and the activity of one PIR sensor. This program runs on boot and monitors GPIOs..... More

Print this item

  Examples of Customer requirements
Posted by: ComputerAstronaut - Dec-08-2020, 02:02 AM - Forum: General Coding Help - Replies (1)

Hello world,
Any body know of a website that has made up customer scenarios that can help hone my python skills. For example:

This tire warehou..... More

Print this item

  input interrupt
Posted by: Nickd12 - Dec-07-2020, 09:52 PM - Forum: General Coding Help - Replies (1)

how can i get this to just interrupt the input and continue down the while true loop. instead if there is no input after 3 seconds it end the program...... More

Print this item

  Button to clear all output labels?
Posted by: AnunnakiKungFu - Dec-07-2020, 09:28 PM - Forum: GUI - Replies (5)

[python]
from tkinter import *
from random import randint

def rollD4():
label = Label(root, text=randint(1, 4), font=(None, 12), height=2, w..... More

Print this item

Question closing a "nested" window with a button in PySimpleGUI and repeating this process
Posted by: Robby_PY - Dec-07-2020, 08:47 PM - Forum: GUI - Replies (9)

Hello,

I'm currently experimenting with my first GUI in Python (or in any other programming language) using PySimpleGUI and I'm stumbling on some i..... More

Print this item

  Txt File to CSV
Posted by: Andie19 - Dec-07-2020, 08:45 PM - Forum: General Coding Help - Replies (2)

Hi
Hoping someone can help. I am trying to convert a txt file (hundred of lines)- (sample below)
pc_account = An account is an entity (person or com..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Access keys and values fr... 8 minutes ago Winfried noisefloor General Codin...
  How to make ball stay wit... Yesterday, 16:07 nathanael deanhystad General Codin...
  PermissionError: [Errno 1... Yesterday, 14:42 Tuurbo46 deanhystad GUI
  Graph Interpolate Difficu... Yesterday, 13:54 Tuurbo46 deanhystad General Codin...
  sorting a lisr of file pa... Yesterday, 13:00 Skaperen DeaD_EyE News and Disc...
  conditional nested loops 11-14, 23:31 Skaperen Skaperen News and Disc...
  PyQt6 QWidgets and system... 11-14, 18:38 stevecoh1 stevecoh1 GUI
  [solved] re.split issue 11-14, 18:02 paul18fr deanhystad General Codin...
  Please guide me to comple... 11-14, 15:33 pbkurd Larz60+ General Codin...
  New to python and coding 11-13, 19:58 lary_p jefsummers Homework
  Backward compatibility qu... 11-13, 11:52 yutaozhou noisefloor News and Disc...
Most views
  The best Prog... 579024
  Tutorial Requ... 510885
  Web Scraping ... 442030
  Newbie with P... 386069
  New Users Int... 377483
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+ 12108
buran 8195
snippsat 7388
deanhystad 6913
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
python 6
NonEntity 5
buran 3
Newest members
Rerus3700 Today
pas88 Today
aanthonymaaleyo3938 Today
chuhlowe Yesterday
SledgeNE Yesterday

User Panel Messages

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