Python Forum
Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,310
» Latest member: QABOB
» Forum threads: 38,801
» Forum posts: 175,920

Full Statistics

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

Latest Threads
No new line from print in...
Forum: General Coding Help
Last Post: Pedroski55
3 hours ago
» Replies: 9
» Views: 255
Python compiler
Forum: General Coding Help
Last Post: NeoQuant
9 hours ago
» Replies: 0
» Views: 38
Trading Risk management s...
Forum: Code sharing
Last Post: NeoQuant
9 hours ago
» Replies: 5
» Views: 76
Standard template Data En...
Forum: Code Review
Last Post: Hosthubac
11 hours ago
» Replies: 0
» Views: 37
Python Online Compiler
Forum: News and Discussions
Last Post: ichsanputr
Yesterday, 07:39 AM
» Replies: 3
» Views: 11,113
Python is not working on ...
Forum: General Coding Help
Last Post: noisefloor
Nov-28-2025, 10:44 AM
» Replies: 4
» Views: 197
Help with Serial.write in...
Forum: General Coding Help
Last Post: Larz60+
Nov-28-2025, 04:44 AM
» Replies: 8
» Views: 720
Can I develop a live vide...
Forum: Web Scraping & Web Development
Last Post: mamta25
Nov-27-2025, 04:48 AM
» Replies: 6
» Views: 7,836
silent deployment Python ...
Forum: News and Discussions
Last Post: Larz60+
Nov-26-2025, 09:58 PM
» Replies: 3
» Views: 191
Proposal for PEP
Forum: News and Discussions
Last Post: Gribouillis
Nov-26-2025, 03:53 PM
» Replies: 1
» Views: 159

 
  Writing a function that accepts a path to an input file
Posted by: says - Aug-29-2018, 01:37 AM - Forum: General Coding Help - Replies (3)

[python]import os
path = 'c:\users\name\desktop\project\input_samples'

for xyz_file in os.listdir(path):
if xyz_file.endswith('xyz'):
(operat..... More

Print this item

  installation
Posted by: xbrucelee88x - Aug-29-2018, 12:20 AM - Forum: General Coding Help - Replies (1)

Hi I am new to python.

on Mac terminal I am trying to install a step.py program, but get the message
[output]
macbooks-MacBook:IBJts macbook$ in..... More

Print this item

  Compatibility Problem with Gmsh and SfePy
Posted by: thinkinghurts - Aug-28-2018, 11:00 PM - Forum: Bar - No Replies

I'm trying to create a finite element mesh in Gmsh by following this tutorial http://sfepy.org/doc-devel/primer.html. But when I try to run the examp..... More

Print this item

  How can I go back to a specific code line?
Posted by: caioneryfo - Aug-28-2018, 09:21 PM - Forum: General Coding Help - Replies (1)

Hi people,

I am new here and I have an issue with one of the exercises of a course I am taking.

Actually, it's not a problem with the exercise, ..... More

Print this item

  Nead help with my calculator program- getting syntax error
Posted by: FantasyCookie17 - Aug-28-2018, 08:01 PM - Forum: General Coding Help - Replies (2)

[python]
s=0
a=float(input("Enter number."))
b=input("Enter +, -, x, *, / or :.")
if b=="-":
s=a-c
c=float(input("Enter number")
if b=..... More

Print this item

  Importing all modules and using it
Posted by: rohitnirantar - Aug-28-2018, 07:24 PM - Forum: General Coding Help - Replies (2)

from os import path

path.exists("foo.txt")

Above code works fine. But lets say I want to import all modules in OS by
from os import *

how ca..... More

Print this item

  Need help for validation test with Python/ PyWinAuto
Posted by: FaisalHossain - Aug-28-2018, 05:38 PM - Forum: GUI - No Replies

Hi Folks!

I am new to Python and PyWinAuto. I am trying to automate my validation tests for a Win desktop App (like logic programming flows app). T..... More

Print this item

  Traceback error
Posted by: tjnichols - Aug-28-2018, 05:27 PM - Forum: Web Scraping & Web Development - Replies (3)

Good morning / afternoon. I am working on a activity where I am supposed to get siblings from a teaching website. I am getting a traceback error and I..... More

Print this item

  random matrix, with some special feature
Posted by: PhysChem - Aug-28-2018, 03:48 PM - Forum: Homework - Replies (6)

Hi!

I wish to create a random 1000*3 sized (1000 row & 3 column) matrix with the following conditions:

1) the matrix must be filled only with t..... More

Print this item

  Exporting Python Output to Notepad
Posted by: Nirmal - Aug-28-2018, 03:18 PM - Forum: General Coding Help - Replies (4)

Hi
i am trying create a file in Python 2.6.6. Its working in Python 2.7

[python]fp = open('command_file.txt', 'w')
fp.write(device1 + '#' + int..... More

Print this item

  Right way to write string into UTF-8 file?
Posted by: Winfried - Aug-28-2018, 02:05 PM - Forum: Web Scraping & Web Development - Replies (10)

Hello,

I need to append a string to a text file that's encoded in UTF-8.

It appears that, by default, Python 3 tries to write in ANSI (Latin-1, ISO8..... More

Print this item

  Python Issue
Posted by: radharani1306 - Aug-28-2018, 01:29 PM - Forum: Data Science - Replies (5)

I am new to python and Kali linux. I have installed Kali linux on virtual box to practice Python. But I am unable to execute python programs which imp..... More

Print this item

  API in Python and Postman
Posted by: melo - Aug-28-2018, 08:38 AM - Forum: General Coding Help - Replies (4)

hello! I'm a beginner in Python and i'm doing an internship in an energy company. So the company asked me to write a small python code so that i could..... More

Print this item

  Vars and getattr problem
Posted by: catosp - Aug-28-2018, 08:13 AM - Forum: General Coding Help - Replies (5)

Hello everybody,
I have the following problem:
This code works very well:


[python]
rm = visa.ResourceManager()
lakeshore = rm.open_resource('..... More

Print this item

  Logging fails intermittently
Posted by: Nachu - Aug-28-2018, 07:42 AM - Forum: General Coding Help - Replies (1)

Hi,

In my python script have redirected logs to a file by importing "logging" module.
And the script is running as a service in Linux environment by ..... More

Print this item

  Can't install MySQLdb/MySQL
Posted by: SirWeeble - Aug-28-2018, 01:07 AM - Forum: General Coding Help - No Replies

Vitals: MacOS, Python 2.7

I've found myself in a catch22. I need to connect to a MySQL database. In order to get MySQL too work with python, I need..... More

Print this item

  About .profile and ImportError: No module named
Posted by: RicardoAbdala - Aug-28-2018, 12:45 AM - Forum: Web Scraping & Web Development - Replies (1)

ImportError: No module named

This error has been a hindrance in the last 24 hours for this start of walk with Python.

Already tried:
from bs4 i..... More

Print this item

  Fuzzy match on text columns within dataframe
Posted by: Nsaibot - Aug-27-2018, 10:52 PM - Forum: General Coding Help - No Replies

I have two datasets df1 and df2, then I did a merge on StateC and CountyC (df1) to STATE_NUMERIC and COUNTY_NUMERIC (df2) for the end result of df3. T..... More

Print this item

  Using if statement without object
Posted by: vv0bbLeS - Aug-27-2018, 09:49 PM - Forum: General Coding Help - Replies (2)

Hello all,

I've been using PowerShell for years but am brand new to Python. I'm trying to figure out if I can use an If statement without a specifi..... More

Print this item

  finding own python source file to read it
Posted by: Skaperen - Aug-27-2018, 09:16 PM - Forum: General Coding Help - Replies (3)

i would like to have some code be able to read its own python source file, perhaps by finding it somehow, opening that for reading, then reading it li..... More

Print this item

  lots of ['s and ]'s in key value list append
Posted by: hokie1999 - Aug-27-2018, 07:38 PM - Forum: General Coding Help - Replies (6)

Hello,

Trying to append values to key value pair in dictionary, meaning the value becomes a list.

As context, script runs a system call, writes..... More

Print this item

  How to check for nested dataframe density?
Posted by: python_newbie09 - Aug-27-2018, 07:34 PM - Forum: Data Science - No Replies

I have attached a csv file where this data is being stored as a nested dataframe in a main dataframe which i cannot include in here. main_col is the c..... More


Attached Files

.csv   testdata.csv (Size: 310 bytes / Downloads: 32)
Print this item

  matrices math problem
Posted by: lokoprof - Aug-27-2018, 07:22 PM - Forum: General Coding Help - Replies (1)

I have this problem I want to solve in python but I am very new to the language. Pls help out.
I have a N x M dimensional data I want to convert to o..... More

Print this item

  Attibute Error: Two methods in a class, one I can reach, the other not (phantom file?
Posted by: GaryKuipers - Aug-27-2018, 07:21 PM - Forum: General Coding Help - Replies (4)

This is my first post so ... forgive any faux pas.
[error]
AttributeError: 'DatabaseProcess' object has no attribute 'update_card_in_information_fro..... More

Print this item

  Machine learning books on Humble Bundle
Posted by: j.crater - Aug-27-2018, 06:56 PM - Forum: Bar - No Replies

Machine learning books bundle available on Humble Bundle.
Many of them use Pytho..... More

Print this item

  Downloading txt files
Posted by: tjnichols - Aug-27-2018, 04:16 PM - Forum: Web Scraping & Web Development - Replies (6)

I am trying to learn how to download txt files from the web. I am familiar with downloading pdfs but when I've tried text files I haven't had that muc..... More

Print this item

  Pygame Groups
Posted by: microphone_head - Aug-27-2018, 03:28 PM - Forum: Game Development - Replies (4)

I'm working on a project that's nearing its completion. I'm in the process of addressing my problem with painting all the sprites in the correct orde..... More

Print this item

  name 'fullname' is not defined
Posted by: witch - Aug-27-2018, 02:29 PM - Forum: General Coding Help - Replies (2)

[python]class Person:

def __init__(self, first, last, fathers_name, age):
self.first = first
self.last = last
self.f..... More

Print this item

  Sanity Check about Python
Posted by: svetlanarosemond - Aug-27-2018, 02:18 PM - Forum: Bar - Replies (2)

I was reading this article about wha..... More

Print this item

  JSON file Loading issue
Posted by: punna111 - Aug-27-2018, 01:55 PM - Forum: Data Science - Replies (4)

Hi all,

I am getting below error, tried multiple ways, which are available online.
but still i am getting the error. could you please let me what..... More

Print this item

  how to avoid a lot of 'if' statments ?
Posted by: witch - Aug-27-2018, 11:36 AM - Forum: General Coding Help - Replies (12)

[python]politics_dict = {'Ляшко': '1', 'Порошенко': '2', 'Яценюк': '3', 'Тимошенко': '4'}


pol1 = (str(input('Хто буде бити ? (Виберіть цифру)\n')..... More

Print this item

  mini browser using Qt
Posted by: mr_byte31 - Aug-27-2018, 11:29 AM - Forum: GUI - Replies (4)

Hi All,

I try to make a mini web browser inside my python script
I got the below code from internet.
I modified it a little to add my proxy in it..... More

Print this item

  error on bat file
Posted by: Sanlus - Aug-27-2018, 11:09 AM - Forum: General Coding Help - Replies (9)

so today i tried to create a bat file, and the code is like this:
[python]#! python3
@py.exe C:\Users\MSI\AppData\Local\Programs\Python\Python37-32\..... More

Print this item

  Delete file with read-only permission, but write permission to parent folder
Posted by: cubei - Aug-27-2018, 08:41 AM - Forum: General Coding Help - Replies (6)

My understanding is that, in order to delete a file, I need write permission to the parent folder (for Windows). I don't need write permission to the ..... More

Print this item

  datetime with every screenshot name
Posted by: evilcode1 - Aug-27-2018, 08:38 AM - Forum: General Coding Help - Replies (7)

hello all ...
i write a code to take 10 screenshot from the desktop and save them to file but i need to save them in this format :

qan-2018-08-27..... More

Print this item

Forum stats
Latest posts
Topic Date, time  Author Last Sender Forum
  No new line from print in... 3 hours ago Lou Pedroski55 General Codin...
  Python compiler 9 hours ago NeoQuant NeoQuant General Codin...
  Trading Risk management s... 9 hours ago NeoQuant NeoQuant Code sharing
  Standard template Data En... 11 hours ago Hosthubac Hosthubac Code Review
  Python Online Compiler Yesterday, 07:39 alexmaxwell1 ichsanputr News and Disc...
  Python is not working on ... 11-28, 10:44 lary_p noisefloor General Codin...
  Help with Serial.write in... 11-28, 04:44 racingsubby Larz60+ General Codin...
  Can I develop a live vide... 11-27, 04:48 mtrkhan mamta25 Web Scraping ...
  silent deployment Python ... 11-26, 21:58 Bummibaer Larz60+ News and Disc...
  Proposal for PEP 11-26, 15:53 matt Gribouillis News and Disc...
  My regex function is not ... 11-26, 08:47 Moltar1997 perfringo General Codin...
Most views
  The best Prog... 579498
  Tutorial Requ... 512854
  Web Scraping ... 442366
  Newbie with P... 386397
  New Users Int... 381726
Most reputation
buran 581
snippsat 511
Larz60+ 452
Gribouillis 362
deanhystad 328
Most replies
  New Users Int... 452
  [book] Variou... 188
  CKEditor / Ri... 100
  moving from t... 95
  Free keys and... 91
Top posters
Larz60+ 12113
buran 8196
snippsat 7393
deanhystad 6916
metulburr 5151
Top referrers
Googlepro 23
python 6
metulburr 6
NonEntity 5
buran 3
Newest members
QABOB Today
adityaN Today
NeoQuant Yesterday
Hosthubac Yesterday
ifdainstitute7 Yesterday

User Panel Messages

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