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,954
» Latest member: Perry
» Forum threads: 38,727
» Forum posts: 175,526

Full Statistics

Online Users
There are currently 51 online users.
» 1 Member(s) | 45 Guest(s)
Bing, Google, AOL, AOL, Mojeek, buran

Latest Threads
extracting data from a us...
Forum: General Coding Help
Last Post: Pedroski55
3 hours ago
» Replies: 1
» Views: 83
how to export a dictionar...
Forum: GUI
Last Post: Pedroski55
9 hours ago
» Replies: 3
» Views: 157
Is the interpreter that c...
Forum: General Coding Help
Last Post: helendamdam
11 hours ago
» Replies: 0
» Views: 345
pip install requests does...
Forum: General Coding Help
Last Post: DeaD_EyE
Yesterday, 02:48 PM
» Replies: 10
» Views: 29,361
Creating a Mindmap progra...
Forum: General Coding Help
Last Post: Pedroski55
Sep-23-2025, 12:00 PM
» Replies: 4
» Views: 9,403
IBKR Purchasing code issu...
Forum: General Coding Help
Last Post: compuman145
Sep-23-2025, 09:08 AM
» Replies: 0
» Views: 281
A coding beginner needs h...
Forum: General Coding Help
Last Post: Littlefish
Sep-23-2025, 03:29 AM
» Replies: 2
» Views: 729
Using a For Loop to subtr...
Forum: General Coding Help
Last Post: deanhystad
Sep-22-2025, 08:56 PM
» Replies: 9
» Views: 926
403 error
Forum: Web Scraping & Web Development
Last Post: snippsat
Sep-20-2025, 04:28 PM
» Replies: 11
» Views: 5,193
what does % stand for in ...
Forum: General Coding Help
Last Post: arbiel
Sep-19-2025, 07:55 PM
» Replies: 2
» Views: 1,394

 
  Understanding Scoping in Python
Posted by: yksingh1097 - Aug-06-2018, 10:26 AM - Forum: General Coding Help - Replies (5)

I was reading Python docs and encountered this example under "Scope and Namespaces".
[python]
def scope_test():
def do_local():
spam = "lo..... More

Print this item

  for some reason this isnt working
Posted by: lokchi2017 - Aug-06-2018, 10:24 AM - Forum: General Coding Help - Replies (3)

[python]import datetime

def inputYear(msg, errmsg, l, h):
done = 0
while (not done):
try:
ans = input(msg)
..... More

Print this item

  Python Code for cross refrencing
Posted by: hamzar - Aug-06-2018, 09:53 AM - Forum: General Coding Help - Replies (1)

Hello everyone,
I am new to python and I am trying to learn it at University ... I have got a list of companies and there locations, I would like t..... More

Print this item

  Balance Data in Python
Posted by: navindran - Aug-06-2018, 09:35 AM - Forum: General Coding Help - Replies (1)

Hi All,

1)How to balance data which is in proportion of 96 is to 4.

2)How do you find out categorical columns from the below dataset
7 0 2 2 5 ..... More

Print this item

  install program silent
Posted by: shlomi27 - Aug-06-2018, 09:34 AM - Forum: General Coding Help - Replies (6)

How do I install program silent(quite mode) using python?
install without window popups
Thanks,

Print this item

  How do i scrape website whose page changes using javsacript _dopostback function and
Posted by: Prince_Bhatia - Aug-06-2018, 09:01 AM - Forum: Web Scraping & Web Development - Replies (1)

i am scraping a website who has multiple pages and using javascript like this one

[python]<td><a href="javascript:__doPostBack('gv_AgentList1','Pag..... More

Print this item

  What's the difference b/w assigning start=None and start=" "
Posted by: Madara - Aug-06-2018, 08:07 AM - Forum: General Coding Help - Replies (1)

If both empty strings and None are evaluated as FALSE,then:
[python]start = None
while start != "":
start = (input("\nStart: "))..... More

Print this item

  List of URLs. wx.richtext.RichTextCtrl
Posted by: ioprst - Aug-06-2018, 07:47 AM - Forum: GUI - No Replies

There is an object:

[python]
import wx.richtext as rt
...
self.m_textCtrl_text = rt.RichTextCtrl(self.panel, -1, self.text, wx.DefaultPosition, (500,..... More

Print this item

  Local Issuer Certificate
Posted by: aslihanyilmaz - Aug-06-2018, 07:09 AM - Forum: General Coding Help - No Replies

Hi there,
I am trying to access a webpage using Python.

[python]import urllib.request
page = urllib.request.urlopen("https://www.sikayetvar.com/a..... More

Print this item

  Need of return in function if statement inside the function already returns
Posted by: Athul - Aug-06-2018, 07:05 AM - Forum: Homework - Replies (5)

Hello,

I'm learning python from some online tutorials. When learning about function, there was an exercise to check [b]"Given two integers, return ..... More

Print this item

  program wanted in python
Posted by: Skaperen - Aug-06-2018, 06:32 AM - Forum: Bar - Replies (2)

what i would like to have in Python (i already have it in C) is a program that starts as a command that take a port number, a remote host name or remo..... More

Print this item

  Identifying only specific words in a string
Posted by: GilbyScarChest - Aug-06-2018, 05:15 AM - Forum: General Coding Help - Replies (2)

I'm new to coding and I'm trying to create a text-based adventure game as a project to help me learn. What I want is for the player to input a phrase ..... More

Print this item

  flattening a list with some elements being lists
Posted by: Skaperen - Aug-06-2018, 01:14 AM - Forum: General Coding Help - Replies (17)

a list might be like [[1,2,3],4,[5,6,7,8],[9]] and i want to flatten it to [1,2,3,4,5,6,7,8,9]. how easy is this to do ..... More

Print this item

  iterate N elements at a time
Posted by: Skaperen - Aug-06-2018, 12:51 AM - Forum: General Coding Help - Replies (3)

i have a long iterator. i would like to iterate N elements at a time instead of 1 at a time. this is not an iterator of iterators; it is flat such a..... More

Print this item

  error with survace.blit
Posted by: joemcsk1 - Aug-06-2018, 12:17 AM - Forum: Game Development - Replies (3)

So Ive been playing with pygame recently and ive came across this error, any help?

Traceback (most recent call last):
File "C:\Use..... More

Print this item

  is it float or is it int?
Posted by: Skaperen - Aug-06-2018, 12:07 AM - Forum: General Coding Help - Replies (2)

i have a big number in a string (maybe type unicode in Python2) to convert to either float or int. i want it to be float if float can represent it an..... More

Print this item

  Opening txt file created in python in excel
Posted by: fabipc - Aug-05-2018, 11:33 PM - Forum: General Coding Help - Replies (1)

Hello,

I wanted to see if someone can help me address my problem. I created a txt file in python by running the following code____python Guilds_v1..... More

Print this item

  suggested change for all() and any()
Posted by: Skaperen - Aug-05-2018, 11:33 PM - Forum: News and Discussions - Replies (2)

the all() and any() functions test all the elements of the given iterator (list, etc) to see if all/any of those elements are [u]..... More

Print this item

  python crontab remove_all(comment="Minute*")
Posted by: vvarrior - Aug-05-2018, 08:59 PM - Forum: General Coding Help - Replies (1)

Does anyone know if there's a way to remove a cronjob based on a comment with a wildcard in it?
I'm using python-crontab

Print this item

  The derivate class dosn't behave like the base when i pass parameter to them
Posted by: drudox - Aug-05-2018, 06:03 PM - Forum: General Coding Help - Replies (4)

I have done a class hierarchy for product several plot stile , in which change almost any parameter, just inherit and define a set of parameter for ch..... More

Print this item

  Trouble with "Weather Program" Assignment
Posted by: sarah_mb_sues - Aug-05-2018, 04:29 PM - Forum: Homework - Replies (5)

Hello,

My Module 4 Midterm for Python Fundamentals on edX involves the following instructions:

************************************************..... More

Print this item

  Why I get RecursionError on very small amount of data?
Posted by: wavic - Aug-05-2018, 04:24 PM - Forum: General Coding Help - Replies (3)

I can't imagine how is possible to get this error when I use the function on such a small data Huh
How is that even possible?
[python]In [1]: l ..... More

Print this item

  Mix-in class tree file not running the self test code.
Posted by: arjunsingh2908 - Aug-05-2018, 03:23 PM - Forum: General Coding Help - Replies (3)

Hi,
I am learning Python classes and I have hit a roadblock in one particular file. So, I coded a file(listtree.py) which has a self-test code with a..... More

Print this item

  can import msvcrt and click on windows but not on Linux
Posted by: sylas - Aug-05-2018, 01:26 PM - Forum: General Coding Help - Replies (4)

Hi all! I have a double boot 64 bits computer. With Linux I cannot import msvcrt or click. What to do on Linux ? I tried "sudo apt-get install msvcrt"..... More

Print this item

  Sending DNS responses with python - research
Posted by: dnsman2018 - Aug-05-2018, 12:01 PM - Forum: Networking - No Replies

Hi,
I am researching DNS and i am attempting to write/modify a small DNS server application written in python to see if it is possible to send specia..... More

Print this item

  Element Tree Xpath
Posted by: hey_arnold - Aug-05-2018, 09:40 AM - Forum: Homework - Replies (9)

I am trying to extract certain data from the XML using Element tree, but I am unsure why my code doesn't work, any guidance would be helpful.

It appe..... More

Print this item

  How to copy an object
Posted by: microphone_head - Aug-05-2018, 09:18 AM - Forum: Game Development - Replies (8)

Hi members,

Does anyone know how to do a deep copy (copy.deepcopy) with pygame?

I'm having trouble performing a deep copy of an object (a class ..... More

Print this item

  Unable to return value from callback function of a button in Python Tkinter
Posted by: nilaybnrj - Aug-05-2018, 06:16 AM - Forum: GUI - Replies (4)

Hi Team

I am trying to get the input written in an Entry box using Tkinter, But whenever I am trying to do so I am not getting the desired result....... More

Print this item

  float to int conversion
Posted by: Skaperen - Aug-05-2018, 01:37 AM - Forum: General Coding Help - Replies (5)

i have a floating point number that is a power (whole, perhaps negative, but not too extreme) of 2 and therefore can be represented in floating point ..... More

Print this item

  Questions about the GET and POST submission form Functions in Python for a Trivia Gam
Posted by: martin28 - Aug-04-2018, 07:37 PM - Forum: Homework - Replies (8)

Hey guys! I'm Martin and I'm new to the forum. I was wondering if you could answer my question and possibly solve it for me because I'm really getting..... More

Print this item

  Parsing Text file having repeated value key pair using python
Posted by: manussnair - Aug-04-2018, 07:30 PM - Forum: General Coding Help - Replies (3)

I have a text file that has the pattern as below..I would like to parse the values for each " An instance of Alert" and assign the values to the varia..... More

Print this item

  insert
Posted by: mj125 - Aug-04-2018, 06:32 PM - Forum: Homework - Replies (2)

hello, I'm a beginner at python and I run this code:

x = [1,2,3,4]
print("x= ",x)
y = x.insert(1,6)
print("y= ", y)
and the answer ..... More

Print this item

  Client Server Game Pygame not responding
Posted by: Damien - Aug-04-2018, 05:41 PM - Forum: General Coding Help - Replies (2)

Hi everyone, I'm brand new to the community and looking for some help. I've been working on a poker game for a while now. I know my coding is pretty..... More

Print this item

  regular expression question
Posted by: Sanlus - Aug-04-2018, 04:43 PM - Forum: General Coding Help - Replies (6)

hey there, im a newbie who just started learning python, and i had a problem here:

[python]
import re
a = re.compile(r'(\d\d\d-){1,2}?\d\d\d\d')..... More

Print this item

  What's wrong
Posted by: kinngu - Aug-04-2018, 03:15 PM - Forum: General Coding Help - Replies (1)

What's wrong with this code?
[python]n = int(input())
m = [int(i) for i in input().split()]
l = []
for i in range(n):
if m[i] != -1:
..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  extracting data from a us... 3 hours ago Perry Pedroski55 General Codin...
  [Tkinter] how to export a... 9 hours ago RonR Pedroski55 GUI
  Is the interpreter that c... 11 hours ago helendamdam helendamdam General Codin...
  pip install requests does... Yesterday, 14:48 misodca DeaD_EyE General Codin...
  Creating a Mindmap progra... 09-23, 12:00 J_Miller Pedroski55 General Codin...
  IBKR Purchasing code issu... 09-23, 09:08 compuman145 compuman145 General Codin...
  A coding beginner needs h... 09-23, 03:29 Littlefish Littlefish General Codin...
  Using a For Loop to subtr... 09-22, 20:56 Anunderling deanhystad General Codin...
  403 error 09-20, 16:28 CaptainNewb snippsat Web Scraping ...
  what does % stand for in ... 09-19, 19:55 arbiel arbiel General Codin...
  C++ program embedding Pyt... 09-19, 11:11 Alexandros Alexandros General Codin...
Most views
  The best Prog... 576848
  Tutorial Requ... 499359
  Web Scraping ... 440628
  Newbie with P... 384602
  New Users Int... 368548
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+ 12088
buran 8176
snippsat 7367
deanhystad 6895
metulburr 5151
Top referrers
Googlepro 23
metulburr 6
NonEntity 6
python 6
buran 3
Newest members
Perry Today
bianchiluca116 Yesterday
Jorgecog Yesterday
adamsmith12 Yesterday
Ronny Yesterday

User Panel Messages

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