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,523

Full Statistics

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

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

 
  Search & Replace - Newlines Added After Replace
Posted by: dj99 - Jul-22-2018, 10:54 AM - Forum: General Coding Help - Replies (3)

Hi,

the below script works, but it adds a new line after it replaces

I cant understand why
it should just do a straight replace


[python]
..... More

Print this item

  Foundations of Data Science Data 8.2x
Posted by: tryingtolearnpython - Jul-22-2018, 10:45 AM - Forum: Homework - Replies (2)

State Year Population Murder Rate
Alaska 1960 226,167 10.2
Alaska 1961 234,000 11.5
Alaska 1962 246,000 4.5
Alaska 1963 248,000 6.5
A..... More

Print this item

  get specific items from result return info
Posted by: mamoman - Jul-22-2018, 10:26 AM - Forum: General Coding Help - Replies (3)

[python]
def get_all_aps(self):

result = self.session.get(self.api_get_ap_list)
print result
#print result

Print this item

  [Help]xpath is not working with lxml
Posted by: mr_byte31 - Jul-22-2018, 10:14 AM - Forum: Web Scraping & Web Development - Replies (3)

Hi All,

I am trying to collect some info from a website
I use xpath for a specific entry but it doesn't seem to work.
[python]from lxml import ht..... More

Print this item

  Beginner help: loops, if, else
Posted by: Banyanss - Jul-22-2018, 08:06 AM - Forum: General Coding Help - Replies (4)

Hello everyone,

Now I am nearly done with this mini 'project' but being so inexperienced with python I am trying make the code run until the user t..... More

Print this item

  a solo \ at end of comment
Posted by: Skaperen - Jul-22-2018, 07:30 AM - Forum: General Coding Help - Replies (2)

what happens if there is a solo backslash at the end of a line in a comment?

   x = 92 # the power char is a \

Print this item

  my cloud backup
Posted by: Skaperen - Jul-22-2018, 12:13 AM - Forum: Bar - Replies (1)

my cloud backup has 29.625625088 GB in 816887 files.

Print this item

  shortening an elif construct
Posted by: Skaperen - Jul-21-2018, 10:27 PM - Forum: General Coding Help - Replies (10)

i have a big long elif construct like[python] if condition-0:
...
elif condition-1:
...
elif condition-2:
..... More

Print this item

  Python 3.6.5 - Saving files
Posted by: Mradr - Jul-21-2018, 08:49 PM - Forum: General Coding Help - Replies (1)

Hello, today I upgrade to 3.6.5 and notice something very different right off the bat. I been using 2.7, 3.5 and never had this issue before - but whe..... More

Print this item

  my junk folder
Posted by: Skaperen - Jul-21-2018, 08:30 PM - Forum: Bar - Replies (3)

my junk folder currently has over 7 GB. sorry, no pics.

Print this item

  Rock, Paper, Scissors Advanced that saves, loads, and keeps statistics
Posted by: EvanCahill - Jul-21-2018, 07:32 PM - Forum: Homework - No Replies

My assignment is to create a menu-driven rock, paper, scissors game that a user plays against the computer with the ability to save and load a game an..... More

Print this item

  [Hlep]Scrap webiste
Posted by: mr_byte31 - Jul-21-2018, 06:35 PM - Forum: Web Scraping & Web Development - Replies (2)

Hi All,

I have a website that I need to collect some info from it.
I tried to use simple code like this :
[python]
import urllib.request
header..... More

Print this item

  tkiner spacing on a canvas help
Posted by: Chuy - Jul-21-2018, 04:20 PM - Forum: GUI - Replies (1)

Hello,

Trying to learn tkinter, by "doing." I could just write a script, or use many or endless backup applications, so ignore that =) Focus on the..... More

Print this item

  Help Understanding Some Code
Posted by: malonn - Jul-21-2018, 03:06 PM - Forum: General Coding Help - Replies (2)

I'm trying to understand this code:
[python]def readSize(self):
b1 = ord(self.read(1))
if b1 & 0b10000000: # 1 byte
retur..... More

Print this item

  Python Qt Asking for a table event
Posted by: Faisal - Jul-21-2018, 02:20 PM - Forum: GUI - Replies (4)

Hello Everybody,

sorry, I've a simple English language.

My issue is QtableWidget , how can I put information inside a table by using QLineEdit ,..... More

Print this item

  Digi Kit
Posted by: Martin91 - Jul-21-2018, 01:58 PM - Forum: News and Discussions - Replies (5)

Hi can someone show me some examples how to work with Digi ESP for python ?

Print this item

  How to Rewrite MATLAB code to Python code
Posted by: Roc_Wizard - Jul-21-2018, 01:50 PM - Forum: News and Discussions - Replies (1)

I met a problem.

a MATLAB/Octave code

t=[0,0.01,0.98]

How to write it to Python code?

Print this item

  Python - Limit Sentence Length to 10 Words - Text file
Posted by: dj99 - Jul-21-2018, 01:08 PM - Forum: General Coding Help - Replies (2)

I am trying to limit each sentence to 10 words


[python]

file = open("a.txt","r")
content = file.read()
file.close()

file_out = open("out..... More

Print this item

  Compare element of list with line of file : if match, delete line
Posted by: silfer - Jul-21-2018, 11:56 AM - Forum: General Coding Help - Replies (4)

Hi Smile

I have a list:
[python]['123;G-12;http//www.g.ch/bidule_12', '456;G-422;http//www.g.ch/bidule_422', '789;G-562;http//www.g.ch/bidul..... More

Print this item

  String extraction
Posted by: Scott - Jul-21-2018, 07:30 AM - Forum: General Coding Help - Replies (3)

Hi everyone,

I am looking at extracting name titles and putting them into their own column in a dataset.

The names are in this format: grant-per..... More

Print this item

  Extract Anchor Text (Scrapy)
Posted by: soothsayerpg - Jul-21-2018, 06:15 AM - Forum: Web Scraping & Web Development - Replies (2)

Tried using the search box but didn't find any post that relates. Also tried Googling it but didn't find any answer.

How can I extract only the anc..... More

Print this item

  unicode to utf-8
Posted by: Skaperen - Jul-21-2018, 04:24 AM - Forum: General Coding Help - Replies (2)

if i have a list with a series of Unicode code point values as ints and want to convert to a list of utf-8 code values as ints, how could i achieve th..... More

Print this item

  Naming convention advice
Posted by: Alfalfa - Jul-20-2018, 11:52 PM - Forum: General Coding Help - Replies (5)

I recently went over all methods of a project to regroups them by reverse naming, alphabetical order, and type (third party, private, public). Finally..... More

Print this item

  Project: “I’m Feeling Lucky” Google Search
Posted by: Truman - Jul-20-2018, 10:40 PM - Forum: Web Scraping & Web Development - Replies (31)

This is web scraping project from Automate the Boring Stuff with Python. From some reason solution doesn't work and I have some doubts myself. The goa..... More

Print this item

  python learning
Posted by: vahid - Jul-20-2018, 09:12 PM - Forum: General Coding Help - Replies (4)

Hello
I am a 32-year-old man who has just been bankrupt.
I want to learn Python language to start again.
Can you guide me where to start?
I do not..... More

Print this item

  Newb Question - Threading in Crons
Posted by: vvarrior - Jul-20-2018, 06:43 PM - Forum: General Coding Help - Replies (2)

I have been attempting to implement threading in an application I'm working on and I'm starting to wonder if I even need it.

I run python 2.7 on ra..... More

Print this item

  Video Metadata Question
Posted by: malonn - Jul-20-2018, 03:53 PM - Forum: General Coding Help - Replies (10)

I am wondering if there is a way to get certain metadata out of a video file (MKV specifically) without the use of third-party modules? If not, what ..... More

Print this item

  get all .exe files from folder and subfolder and then copy them to another location
Posted by: evilcode1 - Jul-20-2018, 01:56 PM - Forum: General Coding Help - Replies (1)

hello folk ...
i am trying to write a code to get all .exe files from a dir by using os.walk .. then i need it to move this files to another location..... More

Print this item

  Plot
Posted by: larri - Jul-20-2018, 01:27 PM - Forum: Data Science - Replies (2)

I am working to understand python 3 and so far i've made serious improvements.
Try and bare with me because i feel like i am gonna be very annoying f..... More

Print this item

  make a simple list
Posted by: larri - Jul-20-2018, 12:18 PM - Forum: General Coding Help - Replies (3)

i try to make a simple list f.e. x=n**2+1
code is

x=[]
for n in range (4):
    y=n**2+1
    x.append(y)
    print (x)
th..... More

Print this item

  Unhasshable type 'list'
Posted by: Piqurs - Jul-20-2018, 11:59 AM - Forum: General Coding Help - Replies (2)

Hi, so I'm getting this error
[error]if kata in set(KATA_GANTI_1) | set(KATA_GANTI_2) | set(KATA_GANTI_3) | set(SUBJEK):
TypeError: unhashable type..... More

Print this item

  Tkinter newly created button does not execute command
Posted by: ChipsSlave - Jul-20-2018, 08:34 AM - Forum: GUI - Replies (7)

Hello all,

I have got this code which should open a GUI with two buttons, one saying Hello, the other one QUIT which it does. When QUIT button is p..... More

Print this item

  TypeError: unhashable type : list
Posted by: yankeephan87 - Jul-20-2018, 07:41 AM - Forum: General Coding Help - Replies (3)

I am getting the following

Error:
TypeError: unhashable type: 'list'
for this line

df_pre = df_pre.rename(columns={error_cols: 'p..... More

Print this item

  Hard time trying to have clean MySQL to CSV program
Posted by: PierreSoulier - Jul-20-2018, 07:22 AM - Forum: General Coding Help - Replies (2)

Hello,

I want to know how to get 'clean' results on the MySQL querry using python.

Here is the program:

[python]
cur.execute('select nom_re..... More

Print this item

  Need help to correct my multiprocessing code
Posted by: PrateekG - Jul-20-2018, 06:26 AM - Forum: Networking - Replies (1)

Hi Experts,

I have a csv file containing more than 60,000 records in a ftp location.

I have written a Python script which searches the product f..... More


Attached Files

.csv   sample.csv (Size: 208.18 KB / Downloads: 615)
Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  Is the interpreter that c... 1 hour ago helendamdam helendamdam General Codin...
  extracting data from a us... 1 hour ago Perry Perry General Codin...
  [Tkinter] how to export a... 3 hours ago RonR Pedroski55 GUI
  pip install requests does... 11 hours ago 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... 576840
  Tutorial Requ... 499280
  Web Scraping ... 440624
  Newbie with P... 384598
  New Users Int... 368509
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 6894
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