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,539
» Latest member: Rolas
» Forum threads: 38,664
» Forum posts: 175,202

Full Statistics

Online Users
There are currently 52 online users.
» 1 Member(s) | 46 Guest(s)
Google, Bing, Baidu, Gribouillis

Latest Threads
How to package code for d...
Forum: General Coding Help
Last Post: mayukun
1 hour ago
» Replies: 0
» Views: 22
pip3 install certifi fail...
Forum: General Coding Help
Last Post: Pedroski55
3 hours ago
» Replies: 1
» Views: 39
My first python game : Ti...
Forum: Game Development
Last Post: walterliz
4 hours ago
» Replies: 8
» Views: 55,194
A penny doubled every day...
Forum: Homework
Last Post: walterliz
5 hours ago
» Replies: 6
» Views: 682
Exercise on reading a chu...
Forum: Homework
Last Post: walterliz
5 hours ago
» Replies: 3
» Views: 1,189
While loop is terminating...
Forum: Homework
Last Post: walterliz
5 hours ago
» Replies: 3
» Views: 421
Custom Sorting List of Di...
Forum: Homework
Last Post: walterliz
5 hours ago
» Replies: 3
» Views: 191
Unable to define function...
Forum: Homework
Last Post: walterliz
5 hours ago
» Replies: 2
» Views: 55
RemoTe server operation w...
Forum: General Coding Help
Last Post: snippsat
Yesterday, 10:14 AM
» Replies: 6
» Views: 672
Qt Event Filtering
Forum: GUI
Last Post: deanhystad
Yesterday, 09:36 AM
» Replies: 3
» Views: 165

 
  QAction bold part of the string argument
Posted by: malonn - Sep-12-2022, 12:58 PM - Forum: GUI - Replies (4)

My knowledge of PyQt6 is limited. I can't figure how to bold part of a string passed to a QAction. Other widgets support rich text, so it's easy wit..... More

Print this item

  precision & recall
Posted by: gracenz - Sep-12-2022, 12:42 PM - Forum: Data Science - Replies (1)

Hi all.

There are tons of examples about precision and recall online.
But I have difficulty explaining by connecting both metrics to the use case...... More

Print this item

  PyQt6 QAction with icon and string
Posted by: malonn - Sep-12-2022, 11:26 AM - Forum: GUI - Replies (2)

I cannot get a QAction initialized with a icon to show the text/string it's supposed to. Here's what I have (simple):
[python]write = QIcon('./imag..... More

Print this item

  PIL Image im.show() no show!
Posted by: Pedroski55 - Sep-12-2022, 09:17 AM - Forum: General Coding Help - Replies (2)

I had this problem before, but when I moved to a virtual environment, it went away.

Now, I can't do img.show() in either of my VENVs nor outside of..... More


Attached Files

Thumbnail(s)
   
Print this item

  Need Help: Convert .pcl file to .pdf file
Posted by: ManuRaval - Sep-12-2022, 06:01 AM - Forum: General Coding Help - Replies (6)

I need your help to know how to convert .pcl file to .pdf using python code. Can you please suggest the python library or code to convert .pcl file to..... More

Print this item

  Python crawler reports errors for some Chinese characters
Posted by: yliu315 - Sep-11-2022, 06:17 PM - Forum: Web Scraping & Web Development - No Replies

I have a python crawler that downloads Baidu index data for the search keywords I provide. It works for most Chinese characters. When it comes to some..... More

Print this item

  Folding in ATOM
Posted by: XavierPlatinum - Sep-11-2022, 05:34 PM - Forum: General Coding Help - Replies (5)

All of a sudden the folding doesn't work right in ATOM. I must have hit something or a hotkey I didn't mean to. Some things fold and others don't. ..... More

Print this item

  Add one to binary string
Posted by: uwl - Sep-11-2022, 04:25 PM - Forum: General Coding Help - Replies (2)

I have a string with the value '0101', it is a binary number. I wish to add one bit to it in order to obtain '0110'. Is someone able to help me accomp..... More

Print this item

  Need Help: FileNotFoundError:[Errno 2] No such file or directory
Posted by: python202209 - Sep-11-2022, 03:21 PM - Forum: General Coding Help - Replies (5)

I save a txt file with name 1pytest.txt and python the codes as a python file with name 1py.py in the same folder c:\Users\tiger\Downloads\

[python..... More


Attached Files

Thumbnail(s)
       
Print this item

  Word game revisited
Posted by: menator01 - Sep-11-2022, 07:42 AM - Forum: Code sharing - Replies (1)

hangman/word guessing game with tkinter

words.txt:
https://my-python.org/files/python/words.txt

[python]
#! /usr/bin/env python3
import rando..... More

Print this item

  (python) Can i get some help fixing a English to Morse translator? Pls
Posted by: AlexPython - Sep-11-2022, 04:40 AM - Forum: General Coding Help - Replies (8)

The problem that I have is that when I type a message for example (hello) instead of only translating those words the program would translate from the..... More

Print this item

  Help on ModuleNotFoundError
Posted by: JonWayn - Sep-11-2022, 03:45 AM - Forum: General Coding Help - No Replies

I cant seem to get import commands to work unless I'm working from the same folder as the file I want to import. What is puzzling is that sys.path lis..... More

Print this item

  df.to_csv('saved_data.csv')
Posted by: Led_Zeppelin - Sep-10-2022, 11:03 PM - Forum: General Coding Help - Replies (1)

I I want to save a dataframe to a csv file I would use:

df.to_csv('saved_data.csv')
or do I use

[code]
df4.to_csv('saved_da..... More

Print this item

  Logging in many submodules
Posted by: veysel - Sep-10-2022, 07:22 PM - Forum: General Coding Help - No Replies

Let's say I have 20 modules, and I want to log all messages in this modules.

For example

Project
-- package1
-- test1.py
-- test..... More

Print this item

Sad Find Longest streak for habits
Posted by: johnconar - Sep-10-2022, 05:30 PM - Forum: Homework - Replies (3)

HI
I am creating a habit tracking application and have to find the longest Streak for a given habit. for ex:- if a user swim for 5 straight days tha..... More

Print this item

Sad how to validate user input from database
Posted by: johnconar - Sep-10-2022, 05:21 PM - Forum: General Coding Help - Replies (3)

hi
i am creating a application i want to verify the user input name from my database.


These are my Two table

[python]
def create_tables(db):..... More

Print this item

  file transfer via python SFTP SCP
Posted by: mg24 - Sep-10-2022, 04:36 AM - Forum: General Coding Help - Replies (3)

Hi Team,

I am transfering csv files to cloud via SFTM transfer.
below code is works when i use subprocess.Popen


but doesnt work if i use run ..... More

Print this item

  Confused with Pygame documentation. (Newbie here)
Posted by: monkeydesu - Sep-10-2022, 04:07 AM - Forum: Game Development - Replies (3)

Sorry, I'm new and really confused by a few things with the tutorial I'm using. I've been looking for answers for like 3 hours. Please help!

[pytho..... More

Print this item

  Basic experiment with the bdb module
Posted by: Gribouillis - Sep-09-2022, 04:53 PM - Forum: Code sharing - Replies (2)

The standard module bdb deserves to be more widely known. I'm experimen..... More

Print this item

  Facing problem with Pycharm - Not getting the expected output
Posted by: amortal03 - Sep-09-2022, 04:35 PM - Forum: General Coding Help - Replies (1)

Hi there!
I am a beginner who is very interested in learning Python.
So, I have written the following code in pycharm.
[python]project = 'course ..... More


Attached Files

Thumbnail(s)
   
Print this item

  cv2 error
Posted by: dankochkurov - Sep-09-2022, 07:30 AM - Forum: Data Science - No Replies

Hello! I am doing object recognition on a windows system.
I have a code:
import cv2

[python]img = cv2.imread('Doroga_na_ylitce1.jpg')

classNam..... More


Attached Files

.py   real_time_object_detection.py (Size: 607 bytes / Downloads: 2)
Print this item

  help with adding duplicates elements together in a list
Posted by: 2ECC3O - Sep-09-2022, 03:03 AM - Forum: Homework - Replies (5)

given a list(just an example list, the actual test list is much MUCH longer)

d = [6610013121,4,6610021021,5, 6610021021,5,6610061121,5, 6610061121,5,..... More

Print this item

  Module not found question
Posted by: sighhhh12 - Sep-09-2022, 02:36 AM - Forum: General Coding Help - No Replies

Hello,
New to python,I'm used to Matlab and Arduino. I have 3.10.6 python,and just downloaded current version of spyder.
All I'm trying to do is read ..... More

Print this item

  Saving progress in a Python program to use later
Posted by: Led_Zeppelin - Sep-08-2022, 06:16 PM - Forum: General Coding Help - Replies (9)

I have a program that takes forty-five minutes to run. That makes it harder to debug.

It takes 40 minutes to get to the critical area. If I do not..... More

Print this item

  Compound if else statement
Posted by: Led_Zeppelin - Sep-08-2022, 12:42 PM - Forum: General Coding Help - Replies (8)

I am using the following statement in my program

[code]
df2["machine_status"] = df2["machine_status"].map(
lambda x: 0
if x == "NORMAL"..... More

Print this item

  GUI does not appear
Posted by: flash77 - Sep-08-2022, 12:29 PM - Forum: GUI - Replies (5)

Hi,
I'm using Pycharm and QT-Designer - I'm totally new to QT-Designer...

I did an example from a python book - it was about to create a GUI, in w..... More


Attached Files

.py   hauptdialog.py (Size: 6.27 KB / Downloads: 256)
.py   main.py (Size: 1.13 KB / Downloads: 238)
Print this item

  Sort of a general "best practices" question
Posted by: malonn - Sep-08-2022, 09:11 AM - Forum: News and Discussions - Replies (2)

Hi, I am writing an email client in Python (of course) 3. But, I wonder something. I want to remove security vulnerabilities from HTML emails. I kn..... More

Print this item

  How to assign a value to pandas dataframe column rows based on a condition
Posted by: klllmmm - Sep-08-2022, 06:07 AM - Forum: General Coding Help - No Replies

Hello,

I want to assign a value in "Value" column into a new column and up to all next empty rows until next value comes. My expected value is avai..... More

Print this item

  Error with pip install
Posted by: coffeeguy - Sep-07-2022, 11:16 PM - Forum: General Coding Help - Replies (1)

3rd week learning python. I am trying to pip install pyperclip. When I run this in the command prompt I am getting a permission error -

Permission..... More

Print this item

  Play Midi Keyboard using fluidsynth and soundfonts
Posted by: Axel_Erfurt - Sep-07-2022, 08:17 PM - Forum: Code sharing - No Replies

A GUI using PyQt5 for choosing soundfont and play midi keyboard with fluidsynth.

The (QProcess) command must be adapted accordingly for operating s..... More

Print this item

Sad Newbie needs help part 2
Posted by: dvejsa - Sep-07-2022, 07:12 PM - Forum: General Coding Help - Replies (14)

Hello once again guys! im back with yet another question regarding my car script :P
some text or all text is in Swedish, I apoligize for that :D
Im ..... More

Print this item

  How to print the output of a defined function
Posted by: bshoushtarian - Sep-07-2022, 06:42 PM - Forum: General Coding Help - Replies (4)

How to print the output of make_matrix function defined in the following code:

[python]from typing import List, Callable
Matrix = List[List[float]..... More

Print this item

  Tkinter + Multiprocessing startmap makes UI Freeze
Posted by: sunny9495 - Sep-07-2022, 05:13 PM - Forum: General Coding Help - Replies (4)

Hi,

the UI freezes when apply the following code to the tkinter

[code]
from selenium import webdriver
from selenium.webdriver.chrome.options i..... More

Print this item

  Match and extract if found
Posted by: Calli - Sep-07-2022, 05:00 PM - Forum: General Coding Help - Replies (21)

For instance I have a list of IP address in one file IPfile1.txt

192.168.0.1
192.168.0.2
192.168.0.3
2001:4800:7819:104:be76:4eff:fe04:5819
192..... More

Print this item

  Scraping and breaking out of Loop
Posted by: giddyhead - Sep-07-2022, 02:41 PM - Forum: Web Scraping & Web Development - Replies (3)

Hello everyone, Need your help with the following script the problem I am running into it pages down in a continuous loading page, until it reaches th..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  How to package code for d... 1 hour ago mayukun mayukun General Codin...
  pip3 install certifi fail... 3 hours ago rb9594 Pedroski55 General Codin...
  My first python game : Ti... 4 hours ago ForsakenDusk walterliz Game Developm...
  A penny doubled every day... 5 hours ago esoyboy walterliz Homework
  Exercise on reading a chu... 5 hours ago Nit_Picker walterliz Homework
  While loop is terminating... 5 hours ago jumpsworthnow walterliz Homework
  Custom Sorting List of Di... 5 hours ago aryasinner walterliz Homework
  Unable to define function... 5 hours ago gmonroe walterliz Homework
  RemoTe server operation w... Yesterday, 10:14 mario17 snippsat General Codin...
  Qt Event Filtering Yesterday, 09:36 deanhystad deanhystad GUI
  processing nested json da... Yesterday, 01:32 Kumo_Koloo Pedroski55 Web Scraping ...
Most views
  The best Prog... 572689
  Tutorial Requ... 485721
  Web Scraping ... 437145
  Newbie with P... 380094
  Thread remain... 351375
Most reputation
buran 581
snippsat 507
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+ 12073
buran 8174
snippsat 7352
deanhystad 6857
metulburr 5151
Top referrers
Googlepro 23
python 6
metulburr 6
NonEntity 5
buran 3
Newest members
Rolas Today
mayukun Today
richardkrt Today
SAHIL54554 Today
walterliz Today

User Panel Messages

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