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,458
» Latest member: bonaven
» Forum threads: 38,565
» Forum posts: 174,750

Full Statistics

Online Users
There are currently 490 online users.
» 1 Member(s) | 487 Guest(s)
Bing, Google, suburbanprojects

Latest Threads
total Noob question: Why ...
Forum: General Coding Help
Last Post: MarkMan
2 hours ago
» Replies: 0
» Views: 30
Noob programmer - game of...
Forum: Homework
Last Post: russellbeckwith
3 hours ago
» Replies: 4
» Views: 1,407
problems with netcdf if I...
Forum: General Coding Help
Last Post: Larz60+
5 hours ago
» Replies: 5
» Views: 249
How to use isintance with...
Forum: General Coding Help
Last Post: buran
Yesterday, 01:22 PM
» Replies: 3
» Views: 191
Gomoku game problem
Forum: General Coding Help
Last Post: snl_9527
Yesterday, 12:10 AM
» Replies: 6
» Views: 431
500 Internal Server error...
Forum: Web Scraping & Web Development
Last Post: Larz60+
May-07-2025, 05:04 PM
» Replies: 3
» Views: 191
How to put my game loop i...
Forum: Game Development
Last Post: ekaintan1590
May-07-2025, 12:54 PM
» Replies: 8
» Views: 2,077
Text frame
Forum: Homework
Last Post: Larz60+
May-07-2025, 05:47 AM
» Replies: 1
» Views: 134
tkinter only storing last...
Forum: General Coding Help
Last Post: deanhystad
May-06-2025, 11:54 PM
» Replies: 8
» Views: 535
Question regarding Python
Forum: General Coding Help
Last Post: Larz60+
May-06-2025, 07:04 AM
» Replies: 1
» Views: 248

 
  Gmpy2 Newbie Working on Precision
Posted by: charlesrkiss - Jan-21-2024, 11:54 PM - Forum: General Coding Help - Replies (7)

I am trying to calculate minute angles, and would like precision of at least 15 digits:

But I fail to understand how Python is rounding.

[b][i]A..... More


Attached Files

Thumbnail(s)
   
Print this item

  Seeking guidance on PyQt Instantiation and correct way to use an instance of QWidget
Posted by: BrewBarred - Jan-21-2024, 10:37 PM - Forum: GUI - Replies (3)

Hey everyone,

I have a few questions (sorry), please see the example code to understand what the questions are referring to. I also recommend runni..... More

Print this item

  Last record in file doesn't write to newline
Posted by: gonksoup - Jan-21-2024, 09:30 PM - Forum: General Coding Help - Replies (3)

Apologies in advance for something that I'm sure you all have encountered before - but I cant find an answer!

The following code happily writes e..... More

Print this item

  json loads throwing error
Posted by: mpsameer - Jan-21-2024, 09:14 AM - Forum: General Coding Help - Replies (8)

Hi All,

I have python code written using netmiko library which does SSH to a switch and run the command "show env power | json". I need to convert ..... More

Print this item

  Retrieve word from string
Posted by: knob - Jan-21-2024, 12:06 AM - Forum: General Coding Help - Replies (4)

Good day !

Based on the example below how could i print the word "fruits" ?
considering that it may change the position in the sentence and
..... More

Print this item

  Draw bounding boxes on live feed
Posted by: Jerome - Jan-20-2024, 10:50 PM - Forum: General Coding Help - No Replies

Working on a robot, using a esp32cam live feed, it's supposed to draw bounding boxes for detected objects with the label name "cup", can't get the box..... More

Print this item

  Question
Posted by: arlindsherifi - Jan-20-2024, 08:26 PM - Forum: General Coding Help - Replies (1)

Hello, I am Arlind Sherifi. I have just started to learn Python and I have written this code:

[python]import numpy as np

perihelion = 70
veloci..... More

Print this item

  Create dual folder on different path/drive based on the date
Posted by: agmoraojr - Jan-20-2024, 06:51 PM - Forum: General Coding Help - Replies (2)

Hello Team,

Below script creates a folder based from a previous date,
My question is,
1. How to declare the if/ else statement that says print(..... More

Print this item

  AttributeError: 'NoneType' re.search
Posted by: philnyland - Jan-20-2024, 02:47 AM - Forum: General Coding Help - Replies (1)

python 3.12.1 Windows 11 command prompt (cmd)
TURN THIS:
this85_e1.txt
the other38_4e.asc
INTO THIS:
this
the other

This was working a fe..... More

Print this item

  Variable for the value element in the index function??
Posted by: Learner1 - Jan-20-2024, 12:16 AM - Forum: General Coding Help - Replies (8)

Let's say that I have a list with all the letters of the English alphabet in it.

Is it possible to allow a user to input an alpha character,

the..... More

Print this item

  Best way to secure API key when sharing
Posted by: quarinteen - Jan-19-2024, 04:25 PM - Forum: General Coding Help - Replies (2)

Hello I have a script that has an api key in it in plain text. This has been okay because only myself and 1 other person uses it. I have been asked to..... More

Print this item

  run SQL without user intervention python
Posted by: dawid294 - Jan-19-2024, 01:11 PM - Forum: General Coding Help - No Replies

Hello, Is possible connect SQL from python without using password and username in the script. But the script should run without user intervention. Exi..... More

Print this item

  PyImport_ImportModule
Posted by: milonass - Jan-19-2024, 11:32 AM - Forum: General Coding Help - Replies (2)

This C++-code is not able to import numy:

[python]#include <iostream>
#include <filesystem>
//#include "C:\Program Files\Python311\include\Python..... More

Print this item

Photo SYNTAX ERROR
Posted by: Yannko - Jan-19-2024, 11:03 AM - Forum: General Coding Help - Replies (3)

Hi, guys, do you have any ideas why "syntax error" occurs when trying to run this trivial piece of code? Thanks!


Attached Files

Thumbnail(s)
   
Print this item

  Creating a Browser Extension using Python
Posted by: j49857 - Jan-19-2024, 03:19 AM - Forum: Web Scraping & Web Development - Replies (3)

I am trying to create a Browser Extension that uses Python and have been unable to make my script work as an extension in any way.
I believe I need ..... More

Print this item

  strange behavior of chess library in Python
Posted by: max22 - Jan-18-2024, 05:02 PM - Forum: General Coding Help - Replies (1)

I have a rather simple chess endgame Python code implementinng negamax strategy given below but it behaves strange.
Negamax means that when both p..... More

Print this item

  KivyMD android app - problem with permission
Posted by: polak7gt - Jan-18-2024, 01:27 PM - Forum: General Coding Help - No Replies

I created a simple app for viewing my weekly meal plan. It reads the SQLite database. The app worked on my old smartphone; however, it does not work o..... More

Print this item

  all of attributes and methods related to a special type
Posted by: akbarza - Jan-18-2024, 06:48 AM - Forum: General Coding Help - Replies (4)

hi
how can I see all attributes and methods related to a special type? for example, I want to see all methods and attributes related to lists,..... More

Print this item

  Int.From_Bytes Method - Conversion of Non-Escaped Bytes Objects
Posted by: new_coder_231013 - Jan-17-2024, 08:54 PM - Forum: General Coding Help - Replies (2)

Hello,

Sorry in advance for the likely basic nature of this question. I'm wondering how the "int.from_bytes" method returns the output that it does..... More

Print this item

  Basic syntax
Posted by: zenkalidas - Jan-17-2024, 07:40 PM - Forum: General Coding Help - Replies (2)

sorry if this seems too basic . What is wrong with the following statement : ..... More

Print this item

  cmath.rect accepts a negative modulus
Posted by: JMB - Jan-17-2024, 07:14 PM - Forum: General Coding Help - Replies (2)

The function cmath.rect(r, phi) accepts negative values for r. For example: cmath.rect(-1, 0) returns (-1-0j).

The returned value is according to w..... More

Print this item

  loop through csv format from weburl in python
Posted by: maddyad82 - Jan-17-2024, 04:23 PM - Forum: General Coding Help - Replies (3)

what I need to do is , extract hostnames from the weburl which is in csx format , loop through it , extract the first column starting with xyz, assign..... More

Print this item

  Precision with Decimal Type
Posted by: charlesrkiss - Jan-16-2024, 06:03 PM - Forum: General Coding Help - Replies (10)

I'm having some problems with getting the desired precision, and something like this also happens.

>>> G=Decimal(0.99999999999999999999990000000000..... More


Attached Files

Thumbnail(s)
   
Print this item

  python script is hanging while calling a procedure in database
Posted by: prasanthi417 - Jan-16-2024, 10:42 AM - Forum: General Coding Help - Replies (4)

Need help in how to maintain database connection alive

My python script is connecting to Oracle DB and is calling a stored procedure( this procedu..... More

Print this item

  SendKeys not working
Posted by: SanjayGMusafir - Jan-16-2024, 10:11 AM - Forum: General Coding Help - Replies (4)

Hi Experts

I'm using a code that I downloaded from internet.

It is working fine until the message is composed but for some reason it does not se..... More

Print this item

  i scored 1/8 on python assessment where did i mess up?
Posted by: SAVAGEMIKE - Jan-15-2024, 11:19 PM - Forum: General Coding Help - Replies (5)

This wasn't assessment given by an instructor in class it was to test for a tech talent development program through a recruiter etc so there's no way ..... More

Print this item

  Stuck with using lists to solve task
Posted by: gery576 - Jan-15-2024, 10:59 AM - Forum: Homework - Replies (9)

Hi everyone,

I am struggling with solving below task which I received as a home assignment in my Python course to practice lists (I've been learning ..... More

Print this item

  [split] Pipenv
Posted by: mohammadasadi4 - Jan-15-2024, 10:35 AM - Forum: General Coding Help - No Replies

Hi everyone
i have a problem and it made me really crazy and i am struggling with it for almost a week searching for solutions in the internet but no..... More

Print this item

  TKinter Remove Button Frame
Posted by: Nu2Python - Jan-15-2024, 06:00 AM - Forum: GUI - Replies (8)

Hi All - How can I remove the button frame in my code? I have tried a few examples I found, but have had no luck. I see one argument example for 'bor..... More


Attached Files

Thumbnail(s)
   
Print this item

  Why doesn't list require global keyword?
Posted by: johnywhy - Jan-15-2024, 12:02 AM - Forum: General Coding Help - Replies (9)

Why doesn't appending to a global list require the global keyword, but modifying a scalar variable does?

[code]numbers = []
dog = 5

def enter..... More

Print this item

  How Write Part of a Binary Array?
Posted by: Assembler - Jan-14-2024, 10:46 PM - Forum: General Coding Help - Replies (1)

Windows 7
Python 3.8.10

I wish to read a binary file, and then write it's data to a different file, skipping the first 16 bytes.
How do I do that..... More

Print this item

  Code test
Posted by: gearmex - Jan-14-2024, 03:47 PM - Forum: Homework - Replies (2)

I just started learning this, i noticed in Finnish language it had lot of things i could not make sense of it, Changed to English and it works better...... More


Attached Files

Thumbnail(s)
   
Print this item

  conversion of newlines in a string
Posted by: Skaperen - Jan-14-2024, 06:20 AM - Forum: News and Discussions - Replies (3)

what is the best function to convert newlines in a string to Unix style whether in Windows style or Mac style (or a mix of both), all in one function ..... More

Print this item

  Python code for alignment and font size
Posted by: 1418 - Jan-14-2024, 03:56 AM - Forum: General Coding Help - No Replies

Hi, I would like help with a code to align left and top and change font size to 10 similar to VBA code. The code I am creating is below, cheers.
[pyt..... More

Print this item

  Python date format changes to date & time
Posted by: 1418 - Jan-14-2024, 03:44 AM - Forum: General Coding Help - Replies (4)

Hi, my original data is short date (15/10/2023) but when I run the below code python changes it to 2023-10-15 00:00:00, how can I prevent this? Cheers..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  total Noob question: Why ... 2 hours ago MarkMan MarkMan General Codin...
  Noob programmer - game of... 3 hours ago Dazzalac russellbeckwith Homework
  problems with netcdf if I... 5 hours ago Blaubart Larz60+ General Codin...
  How to use isintance with... Yesterday, 13:22 Azdaghost buran General Codin...
  Gomoku game problem Yesterday, 00:10 snl_9527 snl_9527 General Codin...
  500 Internal Server error... 05-07, 17:04 ppowell777 Larz60+ Web Scraping ...
  How to put my game loop i... 05-07, 12:54 temlotresid6 ekaintan1590 Game Developm...
  Text frame 05-07, 05:47 dnabtuh Larz60+ Homework
  tkinter only storing last... 05-06, 23:54 bertschj1 deanhystad General Codin...
  Question regarding Python 05-06, 07:04 LPTtech Larz60+ General Codin...
  Brute Forcing Anagrams 05-05, 16:12 Anorak MeganWillia General Codin...
Most views
  The best Prog... 560616
  Tutorial Requ... 436918
  Web Scraping ... 425825
  Newbie with P... 357023
  Thread remain... 330248
Most reputation
buran 580
snippsat 506
Larz60+ 452
Gribouillis 362
deanhystad 325
Most replies
  New Users Int... 449
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12044
buran 8168
snippsat 7324
deanhystad 6818
metulburr 5151
Top referrers
Googlepro 22
python 6
metulburr 6
NonEntity 5
buran 3
Newest members
bonaven Today
MarkMan Today
dataanalytics007 Today
russellbeckwith Today
AcademicGlobalSchool Today

User Panel Messages

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