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,488
» Latest member: Luis_Rivera
» Forum threads: 38,579
» Forum posts: 174,814

Full Statistics

Online Users
There are currently 712 online users.
» 0 Member(s) | 705 Guest(s)
Bing, Mojeek, Google, Apple, Yandex, Baidu

Latest Threads
How can I write formatted...
Forum: General Coding Help
Last Post: hanmen9527
Yesterday, 12:26 PM
» Replies: 13
» Views: 28,745
problems with netcdf if I...
Forum: General Coding Help
Last Post: vytlacfoto
Yesterday, 05:31 AM
» Replies: 17
» Views: 1,414
How to attach images to a...
Forum: Board
Last Post: sethmike9
May-19-2025, 04:08 AM
» Replies: 6
» Views: 8,896
How To Attach data Files
Forum: Board
Last Post: sethmike9
May-19-2025, 04:05 AM
» Replies: 3
» Views: 4,156
Text frame
Forum: Homework
Last Post: Pedroski55
May-18-2025, 07:39 PM
» Replies: 2
» Views: 401
Python automation: Sendin...
Forum: General Coding Help
Last Post: olips784
May-18-2025, 06:28 PM
» Replies: 0
» Views: 200
class Blockage not projec...
Forum: General Coding Help
Last Post: deanhystad
May-15-2025, 04:32 PM
» Replies: 1
» Views: 311
Import vs from x import
Forum: General Coding Help
Last Post: snippsat
May-15-2025, 04:09 PM
» Replies: 1
» Views: 250
Trouble with Average Calc...
Forum: General Coding Help
Last Post: Pate
May-15-2025, 07:38 AM
» Replies: 4
» Views: 1,423
tracking version during r...
Forum: News and Discussions
Last Post: Skaperen
May-15-2025, 12:25 AM
» Replies: 0
» Views: 185

 
  AssertionError when trying the sys module in python
Posted by: BliepMonster - Nov-20-2022, 12:50 PM - Forum: General Coding Help - Replies (10)

I was trying to make it so that it wrote the variable 'hp' in red.
[python]
import sys
color = sys.stdout.shell
hp = 100
color.write(hp, 'COMMENT')
[..... More

Print this item

Star Let me know what do you think about my app.
Posted by: wrcbit - Nov-20-2022, 11:56 AM - Forum: Code Review - No Replies

Hi guys,
Im new here and this is my first post, but it doesn't matter. Be as critic as possible. I code in python for a while and today I created too..... More

Print this item

  pygame double jump problem
Posted by: Yegor123 - Nov-20-2022, 05:04 AM - Forum: Game Development - Replies (2)

Im making a platformer game and I added the jump function but for some reason my player can do double jumps triple jumps and so on how do I fix this
..... More

Print this item

  better way to return a selected value
Posted by: Skaperen - Nov-20-2022, 04:23 AM - Forum: News and Discussions - Replies (2)

which is better or more Pythonic?

A:

...
if s1 < s2:
    return -1
if s1 > s2:
    return 1
return 0
B:
[python]
........ More

Print this item

  2 if statements happening at the same time
Posted by: M0TH - Nov-19-2022, 10:14 PM - Forum: General Coding Help - Replies (3)

hi I'm looking at all these other forum posts and they seem a lot more complex so sorry if this is a waste of time

im really new to python but i ca..... More

Print this item

  python code tp determin a userName and print message
Posted by: jackAmin - Nov-19-2022, 07:58 PM - Forum: Homework - Replies (4)

am new to programming bearly two weeks and have this question below to answer: i need assistance

5-8. Hello Admin: Make a list of five or more userna..... More

Print this item

  How do I emulate a Forza telemetry server and a Bluetooth OBD device?
Posted by: eswsdeth - Nov-19-2022, 07:38 PM - Forum: Game Development - Replies (3)

I'm making a driving game in Pygame, and want to give a player the option to send game data to a Forza compatible dashboard app or to an OBD app like ..... More

Print this item

  BCP Export sql data to csv
Posted by: mg24 - Nov-19-2022, 05:16 PM - Forum: General Coding Help - Replies (2)

Hi Team,

I found below code on google, while searching for BCP Export with header.

-h-1 ------ this removes header as per their explanation, Bu..... More

Print this item

  Python Scripting Environment
Posted by: jpotter0 - Nov-19-2022, 12:09 PM - Forum: General Coding Help - Replies (1)

Two or so years ago I wrote a Python Program for ANSYS scripting that had the following code snippet in it:
[python]
import ScriptEnv
ScriptEnv.Ini..... More

Print this item

  Old style TIF compression
Posted by: DPaul - Nov-19-2022, 11:01 AM - Forum: Bar - Replies (2)

Hi,
I have come across a huge batch of tifs, scanned a long time ago.
When opened in the normal fashion with PIL:
[python]img = Image.open(scanPath)[/..... More

Print this item

  Check DataFrames with different sorting in columns and rows
Posted by: Foxyskippy - Nov-19-2022, 07:49 AM - Forum: General Coding Help - No Replies

Hi,

I got multiple excel file which needs to be need if OLD data is matching NEW data. Normally I use dataframe.equals but since the NEW data is co..... More


Attached Files

.xlsx   AA_Table002.xlsx (Size: 15.61 KB / Downloads: 218)
.xlsx   AA_Table001.xlsx (Size: 14.71 KB / Downloads: 266)
Print this item

  Python with C
Posted by: Skaperen - Nov-19-2022, 03:25 AM - Forum: News and Discussions - Replies (3)

i want to get started writing some code that involves C. one aspect i want to ask those here that mix Python and C. is it preferred to have C coded ..... More

Print this item

  How to remove patterns of characters from text
Posted by: aaander - Nov-19-2022, 02:16 AM - Forum: General Coding Help - Replies (4)

I'm still in the learning process with Python, I need to delete each iteration of "%", and the two characters that follow it, which should be alphanum..... More

Print this item

Question log.exception() without arguments in old Python versions?
Posted by: cthart - Nov-18-2022, 09:16 PM - Forum: General Coding Help - Replies (5)

I have inherited some very old Python code:

import logging
_log = logging.getLogger('blah')
and later:

[python]
try:
..... More

Print this item

  which design / pattern when building classes and subclasses
Posted by: Phaze90 - Nov-18-2022, 08:53 PM - Forum: General Coding Help - Replies (2)

I need to build a mother-child-like class tree.

Dont know which is the best practice how to structure it.

I could define a top-level class A whi..... More

Print this item

Photo String comparison in a csv file in Python Pandas
Posted by: fleafy - Nov-18-2022, 08:05 PM - Forum: General Coding Help - Replies (2)

I am currently working on a huge csv file which I need to select a row and compare it with every other row. Which then should return me how much of th..... More

Print this item

  QGridLayout, QProgressBar bar fills widgets shrink
Posted by: malonn - Nov-18-2022, 07:54 PM - Forum: GUI - Replies (5)

I have a QGridLayout with some QLabels and QLineEdits and a QProgressBar. As the progress bar fills, the QLineEdits shrink. What's up with that. Co..... More

Print this item

  python sql query single quote in a string
Posted by: mg24 - Nov-18-2022, 07:40 PM - Forum: General Coding Help - Replies (1)

Hi Team,

I am extracting sql table data via python , while extracting data , portfolio contains single quote in its records.


hence my second ..... More

Print this item

  command require close window
Posted by: Krissstian - Nov-18-2022, 06:49 PM - Forum: GUI - Replies (14)

Hi,
I have defined a command for a button wich terminates like this:

[python] # save map data to data object
data = io.BytesI..... More

Print this item

  Reading large crapy text file in anaconda to profile data
Posted by: syamatunuguntla - Nov-18-2022, 06:15 PM - Forum: Data Science - No Replies

Hello,

I am new to python and learning on my own pace. i have a large text file with over 200 columns and few million rows. i am trying to profile ..... More

Print this item

  Command error - cursor.executemany(comandoSQL,valoresInserir)
Posted by: TecInfo - Nov-18-2022, 01:05 PM - Forum: General Coding Help - Replies (2)

Good morning,
I'm developing a program that records data coming from JSON in the MySQL database, but it's generating the following error.
[error]
T..... More

Print this item

  Attempting to read keyboard outside of console
Posted by: Jimmy998 - Nov-18-2022, 12:16 PM - Forum: General Coding Help - Replies (5)

You know the input function? where you store a string into a variable? Yeah, I don't need that, for at least that does not benefit me.

My attempt ..... More

Print this item

  pycharm debug help
Posted by: mg24 - Nov-18-2022, 03:15 AM - Forum: General Coding Help - Replies (1)

Hi Team,

how to debug in pycharm ?
in a situation where I am accepting input value via command line argument.

But when I run python script via comma..... More

Print this item

  Need to match two words in a line
Posted by: tester_V - Nov-18-2022, 12:28 AM - Forum: General Coding Help - Replies (2)

Good evening!
I'm trying to match two words and the "(" in a line.
these are" FAILED (Exit ", there is a space before the FAILED and after the Exit..... More

Print this item

  Python code a Max7219/7221 7 segment driver
Posted by: Aggie64 - Nov-17-2022, 10:31 PM - Forum: General Coding Help - Replies (11)

I am trying to use Pythons 3 SPI code to write directly to a MAX7219/7221 seven segment driver. I have written the code and connected a MAX7219 to my..... More

Print this item

  Help with list homework
Posted by: eyal123 - Nov-17-2022, 08:40 PM - Forum: Homework - Replies (5)

I have a list that compared from 3 lists that compered from 0,1,2
like that:
[python][
[0, 0, 2, 2, 0, 1, 1],
[1, 0, 0, 0, 1, 0, 0],
..... More

Print this item

  Replace columns indexes reading a XSLX file
Posted by: Larry1888 - Nov-17-2022, 04:53 PM - Forum: General Coding Help - Replies (2)

Hi all!

I am trying to make my code read certain indexes of an excel file depending on the type of configuration it has in the database, for exampl..... More

Print this item

  New2Python: Help with Importing/Mapping Image Src to Image Code in File
Posted by: CluelessITguy - Nov-17-2022, 04:46 PM - Forum: General Coding Help - No Replies

I am creating an item catalogue of our products and need to import the item images besides their product codes'. The Image Code in the file is the sam..... More


Attached Files

Thumbnail(s)
   
Print this item

  PDF file split and copy
Posted by: rob101 - Nov-17-2022, 02:20 PM - Forum: Code sharing - No Replies

Mostly in the interests of learning, but also for a practical application, I've been looking for a way to copy pages from a PDF file and write said pa..... More

Print this item

  python multiprocessing help -- to extract 10 sql table into csv
Posted by: mg24 - Nov-17-2022, 08:23 AM - Forum: General Coding Help - Replies (3)

Hi Team,

Need your help in improving my existing code using multithreading or multiprocessing as per below situation.

I have 10 sql tables in a ..... More

Print this item

  Print the line before the corrent line
Posted by: tester_V - Nov-16-2022, 08:30 PM - Forum: General Coding Help - Replies (9)

Greetings!
I'm searching lines for two words "PASSED" and "FAILED"
I need to get the line before "PASSED" and the "FAILED" line.
I'm definitely doi..... More

Print this item

  String to Number in Python
Posted by: Godjuned - Nov-16-2022, 06:36 PM - Forum: Homework - Replies (3)

Number: positive, up to billion (10 digits)

Example 1:
Input : I bought twenty three packs of bread
Output : I bought 23 packs of bread

Exampl..... More

Print this item

  [SOLVED] [Linux] Script in cron stops after first run in loop
Posted by: Winfried - Nov-16-2022, 05:35 PM - Forum: General Coding Help - Replies (2)

Hello,

For some reason, the following Python script that runs every hour through cron stops after the first run in the loop after downloading the R..... More

Print this item

  Problem : IndexError...
Posted by: JohnnyCoffee - Nov-16-2022, 03:52 PM - Forum: General Coding Help - Replies (5)

I'm capturing a string (url) where the array will be assembled at runtime, but I'm facing the following error ( IndexError: list index out of range ),..... More

Print this item

  [SOLVED] [Debian] UnicodeEncodeError: 'ascii' codec
Posted by: Winfried - Nov-16-2022, 10:21 AM - Forum: General Coding Help - Replies (1)

Helllo,

I get this error when running a script on a Debian 11 host (Python 3.5.3), apparently because the web site I call through requests() return..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  How can I write formatted... Yesterday, 12:26 JohnJSal hanmen9527 General Codin...
  problems with netcdf if I... Yesterday, 05:31 Blaubart vytlacfoto General Codin...
  How to attach images to a... 05-19, 04:08 CynthiaMoore sethmike9 Board
  How To Attach data Files 05-19, 04:05 Talch sethmike9 Board
  Text frame 05-18, 19:39 dnabtuh Pedroski55 Homework
  Python automation: Sendin... 05-18, 18:28 olips784 olips784 General Codin...
  class Blockage not projec... 05-15, 16:32 Azdaghost deanhystad General Codin...
  Import vs from x import 05-15, 16:09 Calab snippsat General Codin...
  Trouble with Average Calc... 05-15, 07:38 autodecay Pate General Codin...
  tracking version during r... 05-15, 00:25 Skaperen Skaperen News and Disc...
  Return a string or byte o... 05-14, 17:21 Calab snippsat General Codin...
Most views
  The best Prog... 566220
  Tutorial Requ... 460063
  Web Scraping ... 431140
  Newbie with P... 368108
  Thread remain... 340286
Most reputation
buran 580
snippsat 506
Larz60+ 452
Gribouillis 362
deanhystad 327
Most replies
  New Users Int... 449
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12050
buran 8169
snippsat 7326
deanhystad 6827
metulburr 5151
Top referrers
Googlepro 22
metulburr 6
python 6
NonEntity 5
buran 3
Newest members
Luis_Rivera Yesterday
hanmen9527 Yesterday
zacharystone Yesterday
DaddyMAN Yesterday
rouzbehrasai1984 Yesterday

User Panel Messages

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