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,982
» Latest member: kyleconor797
» Forum threads: 38,733
» Forum posts: 175,570

Full Statistics

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

Latest Threads
Parse Markdown / get the ...
Forum: General Coding Help
Last Post: Pedroski55
5 minutes ago
» Replies: 5
» Views: 127
Error: cannot mix str wit...
Forum: General Coding Help
Last Post: Joliekeva
Today, 03:05 AM
» Replies: 4
» Views: 2,025
Integer Factorization Too...
Forum: Code sharing
Last Post: buran
Yesterday, 07:43 AM
» Replies: 2
» Views: 433
My goal to be hired worki...
Forum: News and Discussions
Last Post: GnomeSweetGnome
Yesterday, 12:21 AM
» Replies: 2
» Views: 1,076
Unable to resolve FileNot...
Forum: General Coding Help
Last Post: noisefloor
Sep-29-2025, 05:45 PM
» Replies: 6
» Views: 1,140
Comparing 2 100GB Drives/...
Forum: General Coding Help
Last Post: snippsat
Sep-29-2025, 12:59 PM
» Replies: 8
» Views: 806
Select Python comment (#)...
Forum: General Coding Help
Last Post: tester_V
Sep-28-2025, 06:39 PM
» Replies: 7
» Views: 3,093
what does % stand for in ...
Forum: General Coding Help
Last Post: Gribouillis
Sep-27-2025, 06:49 PM
» Replies: 4
» Views: 2,540
My First App
Forum: Code Review
Last Post: carlbidwell
Sep-27-2025, 10:53 AM
» Replies: 8
» Views: 9,130
how to export a dictionar...
Forum: GUI
Last Post: noisefloor
Sep-26-2025, 05:13 PM
» Replies: 4
» Views: 1,586

 
  Making Player Sprite Ricochet of walls
Posted by: michael1789 - Jun-03-2019, 07:58 AM - Forum: Game Development - Replies (4)

I have vector ("Asteroids") type movement and I want my player sprite to bounce of things they bump into.

It is best to use 2 .spritecollide chec..... More

Print this item

  Improving code for automated piano tiles
Posted by: SheeppOSU - Jun-03-2019, 06:58 AM - Forum: Code sharing - No Replies

I just spent 2.5 hours straight on this and it works very well. I got the inspiration from a youtuber names Code Bullet. Anyways it could use a few im..... More

Print this item

  number plus suffix
Posted by: Skaperen - Jun-03-2019, 04:32 AM - Forum: General Coding Help - Replies (5)

i want to convert a number that has a suffix following the digits. i think i will need to split it at the point where the digits end and the suffix b..... More

Print this item

  lambda or operator?
Posted by: ichabod801 - Jun-03-2019, 01:13 AM - Forum: News and Discussions - Replies (1)

So, say you are passing around callables to functions. Say also that you could do this with something from the operator package. Would you create a la..... More

Print this item

  Formatting Help
Posted by: Expel - Jun-02-2019, 09:06 PM - Forum: General Coding Help - Replies (2)

code

sales_tax = food_charge*.08
print('The sales tax is: $', sales_tax)
Output:
The sales tax is: $ 0.8
..... More

Print this item

  List of dictionaries: use key-value instead of index?
Posted by: dn237 - Jun-02-2019, 06:08 PM - Forum: General Coding Help - Replies (6)

If you have a list of dictionaries, and need any dictionary but do not know what index that dictionary is located at, then how can you instead use the..... More

Print this item

  Help with recursive functions
Posted by: Joseph - Jun-02-2019, 05:33 PM - Forum: General Coding Help - Replies (2)

Hi Friends,

I'm relatively new to Python recursive functions.
(Sorry my english.)

If expanding the Python list, I think they are the same:

l..... More

Print this item

  How to get visible text of Select Drop down
Posted by: ankitjindalbti - Jun-02-2019, 05:03 PM - Forum: Web Scraping & Web Development - Replies (2)

There is a function named select_by_visible_text() to select an option in <select> drop down. Is there a similar function something like get_visible_t..... More

Print this item

  Save console output to text file (like a log)
Posted by: koticphreak - Jun-02-2019, 04:32 PM - Forum: General Coding Help - Replies (9)

I have a python script that runs and it outputs things along the way. It's important that it outputs them in the command line, but at the end, I want ..... More

Print this item

  Question on Join() function
Posted by: sduvvuri - Jun-02-2019, 02:16 PM - Forum: General Coding Help - Replies (2)

Hi Friends,

I am completely new to coding & learning python from a book at home. So I have started from ABSOLUTE ZERO. Never done coding before in..... More

Print this item

  Iteration
Posted by: ibzi - Jun-02-2019, 11:05 AM - Forum: General Coding Help - Replies (2)

What is iteration in python. Huh

i was learning new functions in python and crossed across these definitions

zip() Returns an [b]iterator[..... More

Print this item

  How does 'any' and 'all' work?
Posted by: ibzi - Jun-02-2019, 10:50 AM - Forum: General Coding Help - Replies (3)

So i searched the internet for how these two functions work. This is what i gathered. they work like all works if all are true and any works if any ar..... More

Print this item

  Apply function on different columns as defined
Posted by: DavidGG - Jun-02-2019, 07:59 AM - Forum: Data Science - Replies (6)

I have a function that returns the BMI from a given dataframe with columns 'Weight' and 'Height'
Here is the function:
[python]def BMI(data):
r..... More

Print this item

  Select Drop down is not working properly
Posted by: ankitjindalbti - Jun-02-2019, 07:37 AM - Forum: Web Scraping & Web Development - Replies (3)

On a certain web page, I am trying to select the various options in <Select> drop down using select_by_index() function. But the surprising thing is t..... More

Print this item

  huge list of whole numbers
Posted by: Skaperen - Jun-02-2019, 06:56 AM - Forum: General Coding Help - Replies (3)

i have a massively huge list of numbers and i am trying to think of efficient ways to process these with Python. there are about 360 billion numbers ..... More

Print this item

  finally clause
Posted by: Skaperen - Jun-02-2019, 04:36 AM - Forum: General Coding Help - Replies (6)

documentation says that the code in a finally: clause gets run whether the exception happens, or not. what is the difference between using [i]..... More

Print this item

  How to filter_by with a list
Posted by: SheeppOSU - Jun-02-2019, 02:04 AM - Forum: Web Scraping & Web Development - No Replies

I am filtering through posts and I want for the filter to be a list of users. How would I go about doing that
[python]posts = Post.query.filter_by(au..... More

Print this item

  Rewriting an applications in Python
Posted by: falsedmitri - Jun-01-2019, 10:47 PM - Forum: News and Discussions - Replies (4)

We have a C#/.net application. It is becoming obsolete. I am thinking we could rewrite it in Python.
The application has an extensive GUI (too much f..... More

Print this item

  improving bot with pandas
Posted by: maman420 - Jun-01-2019, 08:34 PM - Forum: Data Science - No Replies

hey everyone, i'm trying to improve my instagram selenium bot with pandas.
i want him to add every url that he is visiting to a file and work only if..... More

Print this item

  Creating a bot for online website game or computer games
Posted by: SheeppOSU - Jun-01-2019, 07:28 PM - Forum: Tutorial Requests and Submissions - Replies (1)

I recently learned how I could automate some games. For this example i am automating "powerline.io". This can be applied with many games and looks rea..... More

Print this item

  Improving bot
Posted by: SheeppOSU - Jun-01-2019, 05:10 PM - Forum: General Coding Help - No Replies

I made a bot to play powerline.io for me... it kinda works. I was wondering if anyone had any suggestions on how I could improve it. I have two versio..... More

Print this item

  Calculus with Python
Posted by: jfkoehler - Jun-01-2019, 04:58 PM - Forum: News and Discussions - Replies (3)

Hi there. I've been using Python in my calculus class for a few semesters now and have a decent draft collection of notebooks that I'm considering mo..... More

Print this item

  looking for sample py to read from txt file into XML using lxml import etree
Posted by: venkat18 - Jun-01-2019, 04:37 PM - Forum: General Coding Help - Replies (3)

sample py to read from txt file into XML using lxml import etree
code is below
[python]

from lxml import etree
import csv

root = etree.Elemen..... More

Print this item

  html error 404
Posted by: SheeppOSU - Jun-01-2019, 04:20 PM - Forum: Web Scraping & Web Development - Replies (1)

I am getting the html error 404 and I don'y know why. I set it up as follows -
[python]FlaskBlog
|
|--main
| |--__init__.py
| ..... More

Print this item

  How to handle tables splitted across multiple web pages
Posted by: ankitjindalbti - Jun-01-2019, 03:59 PM - Forum: Web Scraping & Web Development - Replies (2)

Hi
I am trying to print value from a table using the following code

row = browser.find_element_by_xpath("//table[@cols='8']/tbody/tr[last()]/td[2]..... More

Print this item

  Redefine __add__ for ints
Posted by: ihf - Jun-01-2019, 02:15 PM - Forum: General Coding Help - Replies (4)

Is it possible (for educational purposes), to redefine the behavior of a method such as __add__ for the int class? I know that one can modify _add__ f..... More

Print this item

  [split] Manual Sort without Sort function
Posted by: fulir16 - Jun-01-2019, 01:54 PM - Forum: Homework - Replies (2)

[python]#Get user input
a = int(input("Enter the first number: "))
b = int(input("Enter the second number: "))
c = int(input("Enter the third numbe..... More

Print this item

  pypy and wing personal7
Posted by: pfaber11 - Jun-01-2019, 12:08 PM - Forum: News and Discussions - Replies (2)

   
Could somebody please tell me where I'm going wrong I'm using pypy or trying to has anybody got any experience of this. If you click ..... More

Print this item

  RuntimeError: dictionary changed size during iteration
Posted by: Shreeniket987 - Jun-01-2019, 10:40 AM - Forum: General Coding Help - Replies (3)

So basically what I want is python code that counts how many times a word occurs in a paragraph for text auto summarization. I have managed to spit up..... More

Print this item

  write image into string format into text file
Posted by: venkat18 - Jun-01-2019, 06:18 AM - Forum: General Coding Help - Replies (2)

To write image file into text format using pytesseract.image_to_string, I am using below code. It is only writing last lne of the image into out file,..... More

Print this item

  an easy way to disable exception handling
Posted by: Skaperen - Jun-01-2019, 04:10 AM - Forum: General Coding Help - Replies (6)

while debugging code, often my exception handling obscures what is really going on. i usually have to take the exception handling out. and that is t..... More

Print this item

  dumping an object
Posted by: Skaperen - Jun-01-2019, 03:00 AM - Forum: General Coding Help - Replies (3)

i'm often dealing with an object that apparently is in a different state than expected. i run into this a few times and have to add and change a lot ..... More

Print this item

  How to modify and get the same picture
Posted by: vokoyo - Jun-01-2019, 01:17 AM - Forum: Homework - Replies (1)




May I know how to modify my Python programming thus I can get the same picture as refer to the attached file




[python]

from sc..... More

Print this item

  How define iteration interval increment
Posted by: SriMekala - Jun-01-2019, 12:39 AM - Forum: General Coding Help - Replies (5)

Hi,

I want to iterate through df rows and increase the iteration step increment by 3 (increment i=i+3 on each iteration). I use the below code, but i..... More

Print this item

  Installation
Posted by: Marsu_06 - Jun-01-2019, 12:02 AM - Forum: General Coding Help - Replies (4)

Hi,

First excuse my bad english, as it's not my mother tongue.

I work with Windows Xp SP3 32 bit, and installed python 3.4.0.
Can you say to me..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Parse Markdown / get the ... 5 minutes ago SpongeB0B Pedroski55 General Codin...
  Error: cannot mix str wit... Today, 03:05 ngregistrations Joliekeva General Codin...
  Integer Factorization Too... Yesterday, 07:43 fosuwxb buran Code sharing
  My goal to be hired worki... Yesterday, 00:21 GnomeSweetGnome GnomeSweetGnome News and Disc...
  Unable to resolve FileNot... 09-29, 17:45 llarkin6 noisefloor General Codin...
  Comparing 2 100GB Drives/... 09-29, 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...
Most views
  The best Prog... 577450
  Tutorial Requ... 501043
  Web Scraping ... 441079
  Newbie with P... 385147
  New Users Int... 369748
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+ 12092
buran 8178
snippsat 7371
deanhystad 6897
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
python 6
NonEntity 5
buran 3
Newest members
kyleconor797 Today
miriamwilliam Today
Davidkiplimo Today
Joliekeva Today
silversimon2 Yesterday

User Panel Messages

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