15,181 Topics
| |
Am trying to write asimple python programm that harvest data from facebook . like if i type in akey word like "new york" it brings me all events posted on facebook with a connection to newyork. | |
I am quite new to python programming and having trouble with this program. This is what my GUI looks like [Click Here](https://gyazo.com/5e45577a99ae131dfa4a1a9a42cbfb0e) . What I am trying to acomplish is by have the two comboboxes select the units and then calculate them. Code: self.measurements = StringVar() self.Combobox_Length_Left = ttk.Combobox(self.length_frame, textvariable … | |
This is my 2nd question on python/tkinter... I'm experimenting on containers to maximise code reuse but I seem to be stuck at attempting to display the image for the ContainerImage section although at runtime it does set the background to black and displays the text just not the image. Would … | |
I am using Python/Pandas. I need to split personal names so that names that end in "Van Dyke", both words end up in the last name. So, if the name is Richard Wayne Van Dyke, Wayne is the middle name and Van Dyke is the last. Complicating matters are names … | |
import time def add(numbers): a = 0 for num in numbers: a += num return a add_numbers = [] def subtract(numbers): b = 0 for num in numbers: b -= num return b sub_numbers = [] def multiply(numbers): c = 0 for num in numbers: c *= num return c … | |
I am writing an **automation test** using **python**, where an **android app** records an audio and stores it in a specific directory within the internal storage (sdcard0) of the android device. I need to check whether the **recording** (recordingX.mp3) actually exists with the same name within the specific directory or … | |
Hello, I got this error: `IndentationError: expected an indented block` Im new to python and only used to php, i have no idea what to do. #!/usr/bin/python import numpy as np import argparse import cv2 cap = cv2.VideoCapture(0) while(True): # Capture frame-by-frame ret, frame = cap.read() # Operations orig = … | |
I got this code on using splash screens and liked it however, I'm unable to get the text to update based on the current event(in the example it's just a range of numbers). Would love to get some input on what I'm doing wrong here. Thank you from tkinter import … | |
So, I have to make a dice rolling sim. for my class project. I had it working until I had to make it loop. There is an invalid syntax with the closing quotation marks. ` roll_another ("Yes or no? If yes,4,6,or8?"):` Because I am fairly new, I don't know many … | |
I am a beginner in computer programming and need help with this problem: Create a script that prompts the user to provide the number of pennies, nickels, dimes, and quarters. Display back the value of the coins in dollars and cents. Here is my code so far, everything is good … | |
Dear Python coders, I am new to python programming and I am trying to solve an assignment. The question is stated below; Create a function that does the following 1. Accepts as the first parameter a string specifying the data structure to be used "list", "set" or "dictionary" 2. Accepts … | |
Hello all. I apologize in advanced if this has been asked before but I have not been able to find this information via google or searching here. Everything I found is related to how a for loop works. I know how to use a for loop in python and what … | |
I have to store the scores of people in a text file as an array, and I should be able to add each record on the array. This is the part of the code where the scores are being stored: if group == "a": with open("class scores A.csv", "a+") as … | |
I have a txt file within there are three articals recognizable by the html tags < doc > < / doc> As a result i need to count the words in each artical and get a result like this: [the] -> [1, 20] -> [2, 34] -> [3, 12] [author] … | |
I have been teaching myself Python and wanted to create something useful while learning. I am using wxPython to create the interface. The app works if I use the mouse to click the buttons. I've been trying to get it to recognize operation key-ins like addition using the num pad … | |
what is my best approach to deal with negative floating values in Python3? I know I can remove the negative all together with strip but I'd like to return the negative result if possible Example the following code returns a math domain error due to the negative number: eps = … | |
[CODE]# -*- coding: utf-8 -*- from PyQt4 import QtGui from PyQt4.QtCore import * import sys import os class VideosToMp3(QtGui.QWidget): def __init__(self, parent = None): super(VideosToMp3, self).__init__(parent) ''' Labels and GUI ''' extension = QtGui.QWidget() download_label = QtGui.QLabel("Enter YouTube video URL:") self.download_line_edit = QtGui.QLineEdit() file_label = QtGui.QLabel("Enter file name (optional):") self.file_line_edit … | |
Basically, I'm working with zipimport to load plugins. These plugins contain binary modules which can only be loaded via retrieving their data. Copying them to a temporary directory is stupid, so how can I get a handle to a dynamic process which I can inject the stream into before it's … | |
Hi, I have problem with very simple telnet connection script.: import sys import telnetlib from telnetlib import Telnet HOST = 'localhost' command="clear cable modem reset all" print "Start telnet connection" tn = telnetlib.Telnet(HOST) tn.set_debuglevel(9) print tn.read_until("CMTS>") print tn.read_all() tn.write("logout\n") print tn.read_all() In pycharm run log i see : Start telnet … | |
Hi. I have a python script that i run on my raspberry pi that would connect to a usb sensor and get a value each 0.5 seconds and output the results. I wanted to make a web app to view the data in realtime instead of using terminal so i … | |
I'm making a program that identifies the word position in a sentence. For example, in the sentence ASK NOT WHAT YOUR COUNTRY CAN DO FOR YOU ASK WHAT YOU CAN DO FOR YOUR COUNTRY The word 'COUNRTY' appears in the 5th and 17th positions. **This is what I have so … | |
How to make script like this? **$python script.py 1. Register 2. Login 3. View User Choose with number :** I can make a script for Register and Login, but i still confusing make a script for view user. Spoiler For View User: **Choose with number : 3** (If still not … | |
Hey, First: Hello, i'm new here :lol: And here my question: It's a very short question: Is it possible to get the screen size (resolution) with pygame and how do i get it? | |
Hi, I have a python script that I run everyday at 00:00 as a cronjob & its lasts for about 5-6 hours. I want supervisor to monitor the script & restart if it hangs/crashes in the middle. I have done something like this: [program:python_script] command=python run.py directory=/home/user stdout_logfile=/home/user/py_out.log redirect_stderr=true autorestart=true … | |
Hello Everybody, I searched the the internet and this forum, but cannot find the solution for my problem. Started with python and have this code (part of): import requests `def Send_invitation(): data = {"bsn": e3.get(), "initialen": e2.get(), "achternaam": e1.get(), "geslacht": e4.get(), "geboortedatum": e5.get(), "postcode": e6.get(), "emailadres": e7.get(), "screening_type": e8.get()} response … | |
Where do I begin? How would I go about forming a code of my own that is 'original'? I have seen everything that has already been done before. I will accept any kind of help with examples and how to go about doing this. I am new at this and … | |
Alright i am totaly new to python and could really use some help. I need a program that will run and starting at "2:00" count down all the way to "0:00". The left side being minutes and the right side being seconds. so 120 seconds total. I have no idea … | |
I am getting this problem . my python code is for i,j in nltk.pos_tag(words): print i,j if 'JJ' in j: pj=(list(swn.senti_synsets(i,'a'))[0]).pos_score() print "pj:" ,pj elif 'RB' in j: pr =(list(swn.senti_synsets(i,'r'))[0]).pos_score() print "pr:" ,pr elif 'NN' in j: pn =(list(swn.senti_synsets(i,'n'))[0]).pos_score() print "pn:" ,pn elif 'VB' in j: pv =(list(swn.senti_synsets(i,'v'))[0]).pos_score() print "pv:" … | |
Dear all, I need help with unicode. After reading a lot on several webpages I still cannot solve my problem. I have a wx window in python. In one field I set a filename, say "áio" (stupid name, but just to give you the idea). If I want to create … | |
Using the wx.lib.pdfwin.PDFWindow one can read Adobe PDF files (.pdf) with wxPython. The PDF file format is popular document file format allowing mixing of text and graphics. The GUI toolkit wxPython's newer wx.activex module allows one to use the ActiveX control, as if it would be one wx.Window. It actually … |
The End.