473,549 Members | 2,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
0
1,158
thread by: amyvaulhausen | last post Mar 24 '19 by: amyvaulhausen
Parsing Large Numbers Question Hi All, I am writing some simple code to raise a base value to a power then perform some operations on the output. I have included the code I am using now, below ( see end of this message ), also see immediately below what this looks like when I run my script from the console ;...
0
747
thread by: samvb | last post Apr 3 '19 by: samvb
I have this small console app to add two numbers by asking the user to enter 2 numbers: def add(): a = int(input('Enter first number ')) b= int(input('Enter second number ')) return a + b How do I unit test that? I tried the following but it returns false always even though it doesn't ask for user input...
0
1,991
thread by: quevon24 | last post Apr 12 '19 by: quevon24
I've been trying to implement with python 2.7 a function to pass a command to cli to convert videos with ffmpeg, until now works almost great, the problem is that sometimes throws IOError: Broken pipe and I'm not shure why it's happening. Can you help me with this? This is my function to pass a command to the cli: def _cli(cmd): ...
0
1,281
thread by: ann23 | last post Apr 16 '19 by: ann23
An image is divided into two using the visual cryptographic technique. And these two image shares are overlapped together to get the original image.
0
1,100
thread by: ProgrammerAJ | last post Apr 19 '19 by: ProgrammerAJ
I need to find out how to enter a name of a project and from that name count the number of occurences of a particular character entered by the user. Thank you so kindly for your assistance.
0
1,271
thread by: asile | last post Apr 26 '19 by: asile
Is there anyone who can help me with Python code for optimal control algorithms based on the maximum principle of Pontryagin? Thanks in advance
0
1,130
thread by: Prometheus1111 | last post Apr 26 '19 by: Prometheus1111
So I'm developing a GUI that consists of many widgets such as checkbox, buttons, radio-buttons, combo-box using Python Qt5. This GUI is to perform some calcualtion based on user choices. I'm trying to figure out how to go about saving all this data in a file and then repopulating those widgets when the user opens the same file. My research lead...
0
2,880
thread by: pintas | last post Apr 29 '19 by: pintas
Hello everyone, good to be here. First of all, let me start my apologising. This is my first post, and i'm already posting a big one. Sorry for that. In my Paramiko/Python script, i need to output the SSH command results to a webpage. When i do this, the result is displayed in one single line, even though there are several. If i just run the...
0
1,002
thread by: Suchguchu | last post May 3 '19 by: Suchguchu
I have data table with columns Sources(has multiple categoies), current_status, ....... and current_status has three categories(Hired, Active, Reject) I need a table Sources count(Hired) Count_of_Sources %age(Hired/Count_of_Sources)
0
1,218
thread by: rob200 | last post May 4 '19 by: rob200
Write a Python program which reads context-free grammars. The program must determine and print on the first and follow sets for all non-terminal symbols. Hence or otherwise determine if the grammar allows for LL(1). If the grammar does not allow for LL(1) parsing your program must print This grammar is not LL(1) parseable followed by one blank...
0
1,161
thread by: Python2019A | last post May 28 '19 by: Python2019A
Hi, please can you help! Thanks. I want to loop and call a function every 1000 milliseconds with wx.CallLater. I implemented this (see below), but it does not factor in the delay - it seems to execute automatically. How can I get this to wait 1000 milliseconds between function calls? This function is within a class. In my main module, I...
0
1,127
thread by: shernel07 | last post Jun 10 '19 by: shernel07
0 I have a list of data in .xlsx The data is in column W the data includes 1. ACCEPTABLE 2. UNACCEPTABLE I want to count the number of ACCEPTABLE and total of both ( ACC and UNACC ) and the formula would be ACCEPTABLE divide by number of ACCEPTABLE + UNACCEPTABLE * 100
0
1,219
thread by: omarasimd005 | last post Jun 11 '19 by: omarasimd005
Hello People, I have used xlwt and python to create a workbook and four sheets in it. I'm done with editing the first sheet, Now I would like to open the sheet 2 that I have created in beginning and would like to edit it. I'm taking an input from user in beginning to choose which sheet he wants to open if he enters 2, sheet 2 should open and...
0
1,330
thread by: centella | last post Jun 27 '19 by: centella
hi there,when learning flask,i have confronted a question,which is "BuildError: Could not build url for endpoint 'login'. Did you mean 'index' instead?",my code is below. __author__ = 'Administrator' from app import app,db,lm,oid from flask import render_template,flash,redirect,session,url_for,request,g from flask.ext.login import...
0
1,038
thread by: Hypermesher | last post Jul 5 '19 by: Hypermesher
Hello, I have a question about GUI libraries. I am working on an automation program. I use coordinate info of a command (for example, file -> open or about -> help) via pyautogui. However, according to screen resolution or program window location, this command’s coordinate can be changed. To fix this problem, I want to move without coordinate....
0
1,015
thread by: miniquinox | last post Jul 9 '19 by: miniquinox
Hello guys, i have a 6 bit word, in which the first and second byte are supposed to be 0, and the last 4 bytes contain information. How do you make these last four bytes in big endian? Here is my output at the moment, i just have to add another line with the endian done (total of 48 bits). This is not an int i have selected. It is the result of...
0
4,716
thread by: mak705 | last post Jul 29 '19 by: mak705
I wrote one program which help inrementing the digit in the file. Able to copy only first line if I am using writelines and for f.write I am getting f.write(new_line ) if lines.strip().endswith(':') else f.write() TypeError: write() argument must be str, not list file.txt Django 2.1:0 djangoAPI My Code import re
0
1,005
thread by: Aniket Mathare | last post Aug 5 '19 by: Aniket Mathare
I tried to scrap the data available in behind the graph on webpage. I don't found storage data in source code(html page). I tried to found data in html page but it not found. Then i tried to another way -goto inspect --> then Network --> click on XHR -->then reload page from bs4 import BeautifulSoup import urllib.request import _csv...
0
1,119
thread by: jcardozo | last post Aug 7 '19 by: jcardozo
I have the following code in a module that I want to call from any other application module. The code I have also displays the debug message on the console when I invoke it like this: def main(): logger = custom_logger('test1', 'log', 'test.log', False) logger.debug('log to file only') Not sure how to turn off the console. Any...
0
1,314
thread by: Sreevalli | last post Aug 16 '19 by: Sreevalli
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1547, in __call__ return self.func(*args) File "C:\Program Files (x86)\RT4Tracker\pkgs\tracker_args.py", line 215, in fileOpen self.d2 = pygsmedia.open(self.filename) File "C:\Program Files (x86)\RT4Tracker\pkgs\pygsmedia.py", line 423, in open return Decoder(fname) File...
0
1,211
thread by: Yudhi | last post Aug 20 '19 by: Yudhi
Write Regular Expression that can extract String 123.jpg and 432.png from String axhdsjk123.jpg.jpg and hjhsd432.png.png How to...?????????
0
1,410
thread by: Fatman003 | last post Aug 27 '19 by: Fatman003
I have to copy data from different workbooks and paste it into a master workbook. All the workbooks including the Master file are located in a folder: C:\Users\f65651\data So far I have been able to copy data from only one workbook using the code below import openpyxl as xl path1 ='C:\\Users\\f65651\data\\cq1.xlsx' #One of the doc...
0
1,444
thread by: EngCarvalho | last post Oct 2 '19 by: EngCarvalho
I have a working voip server and I want to make a voip client, I've tried with several python libraries and had no success with any because it was poorly explained and needed other libraries that I couldn't find I was wondering if there is a way to make a "hacked" (manipulate, bind with python, terminate with python) voip client via line of...
0
1,466
thread by: akshay7752 | last post Oct 16 '19 by: akshay7752
import pandas as pd import numpy as np #Dataset 1 path="D:\\Data Science\\Python-Piyush\\Interview practice\\age.csv" age=pd.read_csv(path) age.head() #1) To find mean age of dataset
0
1,725
thread by: makequickdraw | last post Oct 25 '19 by: makequickdraw
Hi! I'm in the middle of practice with google quickDraw Datasets. as it says on the site, I could get 'The Eiffel Tower.bin' image array like this. and so on The way I understand this array is that means one image, ((...)) means the brightness (I hope this is right.)

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.