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,933
» Latest member: bennyanderson482
» Forum threads: 38,721
» Forum posts: 175,503

Full Statistics

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

Latest Threads
C++ program embedding Pyt...
Forum: General Coding Help
Last Post: Gribouillis
9 hours ago
» Replies: 2
» Views: 335
403 Error
Forum: Web Scraping & Web Development
Last Post: CaptainNewb
Sep-17-2025, 05:56 PM
» Replies: 9
» Views: 3,359
Too much space between gr...
Forum: GUI
Last Post: RonR
Sep-17-2025, 11:22 AM
» Replies: 4
» Views: 1,760
datetime in SQL query.
Forum: General Coding Help
Last Post: Dibbley
Sep-17-2025, 10:31 AM
» Replies: 3
» Views: 733
Another app idea - intera...
Forum: News and Discussions
Last Post: Lenowell
Sep-16-2025, 07:07 AM
» Replies: 1
» Views: 977
real community
Forum: News and Discussions
Last Post: decuser
Sep-15-2025, 08:16 PM
» Replies: 3
» Views: 2,041
variable changing types f...
Forum: General Coding Help
Last Post: Gribouillis
Sep-15-2025, 06:45 PM
» Replies: 1
» Views: 1,084
looking for help
Forum: Bar
Last Post: Azdaghost
Sep-15-2025, 05:03 PM
» Replies: 0
» Views: 654
Seeking feedback: dynamic...
Forum: General Coding Help
Last Post: Bona2000
Sep-15-2025, 03:28 PM
» Replies: 7
» Views: 3,634
Select Python comment (#)...
Forum: General Coding Help
Last Post: Pedroski55
Sep-14-2025, 11:27 PM
» Replies: 6
» Views: 1,857

 
  tk is not defined
Posted by: jip31 - Jan-08-2022, 07:55 AM - Forum: General Coding Help - Replies (8)

Hi

The code below works when I execute it with idle or in CLI but when I execute it with vscode, I have the message "NameError: name 'Tk' is not de..... More

Print this item

  Simple question (I guess)
Posted by: tchadrack - Jan-08-2022, 03:17 AM - Forum: Data Science - Replies (1)

I have a txt file with data, sctructured this way:

[output][
[
1,
"ABRAHAN LINFE",
"JUNIAN",
10,
2011,
"$ 6.277,35"..... More

Print this item

  Need to parse a list of boolean columns inside a list and return true values
Posted by: Python84 - Jan-08-2022, 12:14 AM - Forum: General Coding Help - Replies (4)

Hi All,

Need to do this only when whole expression is true

Example 1: List -> [[A] OR [B]]
True value: A
o/p expected : [A]

Example 2: List ->..... More

Print this item

  Search text in PDF and output its page number.
Posted by: atomxkai - Jan-07-2022, 06:56 PM - Forum: General Coding Help - Replies (21)

Hello,

I'm trying to use this script to search a word or text in a PDF and will output the text and its page number.

Please note: I'm using Wind..... More

Print this item

  POST `api` 415 (Unsupported Media Type)
Posted by: Dexty - Jan-07-2022, 03:22 PM - Forum: Web Scraping & Web Development - Replies (2)

A little off the scope of Python but I'm trying to get things done in the frontend before integrating the Django backend.
I have tried different hea..... More

Print this item

  Please Wait window
Posted by: kucingkembar - Jan-07-2022, 03:14 PM - Forum: GUI - Replies (4)

hi, sorry again for my bad English,
I like to create "loading, please wait... " window
but somehow the windows do not appear, this is the code

[p..... More

Print this item

  Split single column to multiple columns
Posted by: SriRajesh - Jan-07-2022, 02:17 PM - Forum: General Coding Help - Replies (1)

Hi,
I have pandas.core.Dataframe as below
When I write to csv using df.to_csv it placed in single columns and 8 rows with delimiter as comma(","). F..... More

Print this item

  set and sorted, not working how expected!
Posted by: wtr - Jan-07-2022, 01:31 PM - Forum: General Coding Help - Replies (2)

Hello all,

I implemented the following. I don't understand why the output is unsorted list. I'm using set and sort to filter my list.
freq_list = ..... More

Print this item

  Not able to get image as background in a Toplevel window
Posted by: finndude - Jan-07-2022, 11:53 AM - Forum: GUI - Replies (4)

Hi All,

I have the below code:

[python]
from tkinter import * # imports all from tkinter
from tkinter import messagebox # imports messagebox
..... More

Print this item

  General Programming Question with Dictionary
Posted by: giddyhead - Jan-07-2022, 05:59 AM - Forum: General Coding Help - Replies (12)

I have a dictionary that contains books names, numbers of pages, who wrote the book, etc. What I attempting to do is search the whole dictionary for..... More

Print this item

  My program won't recognize the filename.
Posted by: braingoblins - Jan-07-2022, 03:16 AM - Forum: General Coding Help - Replies (1)

I'm working on a Markov bot for Twitter that reads off of a static directory and I know barely anything about coding. The program I got from a library..... More

Print this item

  SQL wild card use
Posted by: hammer - Jan-07-2022, 02:25 AM - Forum: General Coding Help - Replies (3)

I am trying to use a " * " in a a SQL WHERE clause passed in as an argument. The reason is to return the last entered tagNo if they do not know the ot..... More

Print this item

Big Grin General programming question (input string)[
Posted by: jamie_01 - Jan-07-2022, 01:37 AM - Forum: General Coding Help - Replies (2)

[code]
#!/usr/bin/python3

list_item_two = ['apples', 'oranges', 'pears', 'apricots']

list_item_two.append("celery")

print("ADD (1) or REMOVE..... More

Print this item

  WinError 2, since fresh new Windows 10 install
Posted by: alok - Jan-06-2022, 10:50 PM - Forum: General Coding Help - Replies (1)

I recently installed a fresh new version of Windows 10. Because of this I lost Python 3.9.7 and Sublime Text, which both had worked great.
I had to r..... More

Print this item

  Reiszing figure to occupy entire frame
Posted by: fishbackp - Jan-06-2022, 10:33 PM - Forum: General Coding Help - No Replies

I have a frame within my root window and wish to place a plot inside the frame. What I have so far is the following:

[python]from tkinter import Tk..... More

Print this item

  django - add l<a> tag - render_to_string
Posted by: rwahdan - Jan-06-2022, 05:48 PM - Forum: Web Scraping & Web Development - Replies (1)

Hi,

i have the follwoing code in view.py:
[python]
subject = "Thank you for your payment!"
template = render_to_string('cart/emai..... More

Print this item

  Functions to consider for file renaming and moving around directories
Posted by: cubangt - Jan-06-2022, 05:23 PM - Forum: General Coding Help - Replies (2)

ok, so im starting to work on a script to do some file moving and renaming and want to see what functions to consider and what would be best practice ..... More

Print this item

  Code to check folder and sub folders for new file and alert
Posted by: fioranosnake - Jan-06-2022, 09:24 AM - Forum: General Coding Help - Replies (2)

Hi Experts!

Can anyone advise if there is any way to scan a folder and sub folders for example, every hour, and send an email via SMTP with the fil..... More

Print this item

  Not able to read the text using pexpect/expect
Posted by: Bipinjohnson - Jan-06-2022, 04:42 AM - Forum: General Coding Help - Replies (7)

Hi,
I am new to python i am trying some automation where in i want to call a terminal application from python and control the same.
I have tried [i]..... More

Print this item

  Dynamic File Name to a shared folder with open command in python
Posted by: sjcsvatt - Jan-06-2022, 03:24 AM - Forum: General Coding Help - Replies (9)

Need help for a file path to write to a file in a remote shared folder using with open command.
Below is my sample code:
[python]
import os
import..... More

Print this item

  FTP File Download question / concern
Posted by: cubangt - Jan-05-2022, 09:22 PM - Forum: General Coding Help - Replies (3)

Im working on a small python file/script that will connect to our FTP server and look for 3 specific files and then download them to our network for p..... More

Print this item

  Try to solve GTG multiplication table problem.
Posted by: Frankduc - Jan-05-2022, 07:12 PM - Forum: General Coding Help - Replies (6)

Hello,
I try to solve a problem from GTG.

Multiplication Table Print the multiplication table of a given number N.
Input:
N = 9

Output:
9..... More

Print this item

  Help with a bug
Posted by: mjwaterskis - Jan-05-2022, 05:03 PM - Forum: Game Development - Replies (3)

Hello! This is my first post, so please excuse any issues with the formatting.

I am very new to coding and am trying to teach myself python. I've ..... More

Print this item

  Setup of VSCode to run with Python: some things are messed up
Posted by: apollo - Jan-05-2022, 12:22 PM - Forum: Bar - No Replies

hello dear community,


first of all: a happy new year to all of you. I wish you all a great and sucessful new year! Smile Wink
..... More


Attached Files

Thumbnail(s)
   
Print this item

  free pyFltk gui course
Posted by: robark - Jan-05-2022, 06:32 AM - Forum: GUI - No Replies

I am one of the maintainers of the open source pyFltk gui toolkit. I have published a free online course at http://arkiletian.com/cs2 (No ads on webs..... More

Print this item

  Mac os choose file name
Posted by: howard687 - Jan-05-2022, 01:46 AM - Forum: General Coding Help - Replies (1)

I would like, on Mac Os, to invoke code that presents the user with a dialog (panel) to navigate directories/folders and choose a file. I believe the..... More

Print this item

  return vs. print in nested function example
Posted by: Mark17 - Jan-04-2022, 04:21 PM - Forum: General Coding Help - Replies (4)

Here's a nested function:

[Python]
def outer():
n = 1

def inner():
n = 2
print(n)
#return n

..... More

Print this item

  Why does absence of print command outputs quotes in function?
Posted by: Mark17 - Jan-04-2022, 02:47 PM - Forum: General Coding Help - Replies (2)

Hi all,

For this function:

def two_word_shout(word1,word2):
    return word1+'!'*3+' '+word2+'!'*3
two_word_shout('cong..... More

Print this item

  dynamic expression
Posted by: arkiboys - Jan-04-2022, 01:55 PM - Forum: General Coding Help - Replies (1)

Hello,
The dataframe below (Works fine) uses the read col_Expr to apply expression to the columns where required.
[python]
from pyspark.sql.functions ..... More

Print this item

  Data pulled from SQL comes in brackets
Posted by: nickzsche - Jan-04-2022, 01:42 PM - Forum: General Coding Help - Replies (3)

Hello, my data from sql comes in brackets. How can I solve this? I just need the string states inside.


[python] veritabani = sqlite3.connect("Ver..... More

Print this item

  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip.
Posted by: Anldra12 - Jan-04-2022, 11:47 AM - Forum: General Coding Help - Replies (2)

Installing any library using pip install gmpy2 return me an error
[error]Traceback (most recent call last):
File "d:\python3.8.0\python\li..... More

Print this item

  Create RTSP stream from camera?
Posted by: korenron - Jan-04-2022, 08:56 AM - Forum: General Coding Help - Replies (1)

Hello ,
I want to build a project taht will stream video from my PI camera
so I will be able to connect and see it using RTSP
how can I do this ?..... More

Print this item

  Setting permanent user variables in Windows
Posted by: coder420 - Jan-04-2022, 08:13 AM - Forum: General Coding Help - Replies (2)

Greetings!

I've read through a lot of posts and didn't manage to make it work.
My problem is that I'm unable to insert my variable in this statement:..... More

Print this item

  Calling this script
Posted by: Extra - Jan-03-2022, 08:18 PM - Forum: General Coding Help - Replies (4)

Hello,

I'm trying to figure out how to call the

#print data part
of my Weather.py script into another script I have.
I tried mak..... More

Print this item

  Help needed with Jupyter Notebook
Posted by: eyadfr - Jan-03-2022, 07:53 PM - Forum: Data Science - Replies (4)

Hello

I'm working on Jupyter Notebook with a dataframe. When manipulating the dataframe using functions some rows are missed!

The dataset has m..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  C++ program embedding Pyt... 9 hours ago Alexandros Gribouillis General Codin...
  403 Error 09-17, 17:56 CaptainNewb CaptainNewb Web Scraping ...
  [Tkinter] Too much space ... 09-17, 11:22 RonR RonR GUI
  datetime in SQL query. 09-17, 10:31 Dibbley Dibbley General Codin...
  Another app idea - intera... 09-16, 07:07 decuser Lenowell News and Disc...
  real community 09-15, 20:16 decuser decuser News and Disc...
  variable changing types f... 09-15, 18:45 Azdaghost Gribouillis General Codin...
  looking for help 09-15, 17:03 Azdaghost Azdaghost Bar
  Seeking feedback: dynamic... 09-15, 15:28 Bona2000 Bona2000 General Codin...
  Select Python comment (#)... 09-14, 23:27 SpongeB0B Pedroski55 General Codin...
  data input while debuggin... 09-14, 15:32 fred1232 deanhystad General Codin...
Most views
  The best Prog... 576133
  Tutorial Requ... 497674
  Web Scraping ... 440081
  Newbie with P... 383876
  New Users Int... 366423
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+ 12089
buran 8174
snippsat 7367
deanhystad 6891
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
NonEntity 6
python 6
buran 3
Newest members
bennyanderson482 Yesterday
AstoundzSEO Yesterday
tobey12 Yesterday
alexguemez 09-17
Shadab 09-17

User Panel Messages

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