473,554 Members | 2,268 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.
2
6,022
thread by: jumperbl | last post Jan 7 '19 by: moshim
I want to look at two columns lets say B1 to B8 and C1 to C8. I want to compare those ranges and if the columns don't match i want to color the cell. Here is how much i have figured out. import win32com.client xlApp = win32com.client.Dispatch("Excel.Application") xlApp.Visible=1 xlWb = xlApp.Workbooks.Open(r"C:\Template_Rev_3.2.xls")...
0
1,259
thread by: Sheepy | last post Jan 5 '19 by: Sheepy
I'm closing this question because I just realized that I put VAR=1 in the loop and then I wanted it to go VAR = VAR + 1
1
1,301
thread by: bansalhimani | last post Jan 3 '19 by: dukool sharma
What does the following code give us? >>> b=(1)
14
68,825
thread by: AruzV | last post Dec 30 '18 by: megumi
Is there any data grid sample for tkinter?
1
1,388
thread by: samvb | last post Dec 27 '18 by: wangpanjun
Hi, I fire up celery in a separate terminal and it works great but it ain't reading my .env file which my django application currently uses. How do I tell celery where the env file is located and how to use it?
1
1,673
thread by: jvandal | last post Dec 25 '18 by: dwblas
...def edit_member(no): """ Edit a gang member """ print('edit member') if request.GET.get('save', '').strip(): edit = request.GET.task.strip() lastname = request.GET.get('lastname', '').strip() firstname = request.GET.get('firstname', '').strip() birthdate = request.GET.get('birthdate',...
2
1,359
thread by: jvandal | last post Dec 22 '18 by: jvandal
c.execute('''INSERT INTO gangmember ( lastname ('?' , firstname ('?'), birthdate ('?'), deathdate ('?'),\ address ('?') , state ('?'), zipcode ('?') , father ('?') , mother ('?') , status ('?') , gangname('?') )''')
2
1,371
thread by: bansalhimani | last post Dec 21 '18 by: OldStory
Problem with the following piece of code- >>> def func(n=): #playing around pass >>> func() >>> func() >>> n
1
1,610
thread by: tutu10 | last post Dec 21 '18 by: Rabbit
Hello all - I have files I'm trying to import. I do not name these files, they're created by another department. The files start with a number, usually the year. Each time I try to do so I get an error message: Error: FileNotFoundError: No such file or directory: 'N:\\Learing KPI Report\Background Files\X818 Online.xlsx' The file name...
0
1,260
thread by: mycj | last post Dec 18 '18 by: mycj
Hey guys, i need urgent help. I have a trace file for UDP that i want to plot the delay and jitter between the sender and receiver addresses. Any python code can be very useful. The trace file is found here: https://gist.github.com/mycj4u/4f7d3ab28c5097ce0f854b5a9ff310a7
0
1,315
thread by: emo81 | last post Dec 18 '18 by: emo81
This works, but I'd like to know peoples opinions. with open ("readme.txt","r") as file: fl=file.readlines() fl = with open("readme.txt","w") as file: file.write("".join(fl))
1
6,366
thread by: atlass218 | last post Dec 12 '18 by: dwblas
Hi; I created an application that is based on the introduction of data stored in txt files. the content of these files is displayed in text widget my problem is that I can not get the automatic refresh of the text widget display the code in python 3.6, and it cutted into several parts : from tkinter import * from tkinter.ttk import...
1
1,368
thread by: bansalhimani | last post Dec 7 '18 by: agrawalanjita
How would I randomize the contents of a list in-place?
1
1,085
thread by: ramesh pappu | last post Dec 4 '18 by: dwblas
list1 = list2 = str1 = "" for i in range(len(list1)): for j in range(len(list2)): if (i == j): str1 = str1+ str(list1 + ":" + list2 +", ") print str1
5
8,490
thread by: JurVogelzang | last post Dec 3 '18 by: BC79
The tkFileDialog module is a handy tool for opening and saving files in Python GUI's with TkInter. However, the pop-up window generated by, e.g., tkFileDialog.askopenfilename is rather small (though it can be resized manually). Is there a possibility to resize it automatically?
0
1,716
thread by: himani bansal | last post Dec 3 '18 by: himani bansal
What are the different ways to create an empty NumPy array in Python? Can you answer this?
0
5,434
thread by: kumar N S | last post Dec 3 '18 by: kumar N S
def __stringToByte(self, string): return struct.unpack('@B', string) def __readPacket(self): receivedPacketData = i = 0 while ( True ):
1
1,227
thread by: Davetherave | last post Dec 1 '18 by: Luuk
The two words should be present or none should be present in text file. User should input two words and that word should be check into the text file be it any type such as .html,.txt,.doc,.php using python.
0
1,047
thread by: c0d3rX | last post Nov 25 '18 by: c0d3rX
The following code is from turtle graphics demos, specifically the color mixer demo. The program allows you to adjust the background color of a window using three sliders corresponding to RGB values. In the following code there is a statement under the shift function "self.sety(max(0,min(y,1)))". The purpose of this statement is unclear. Any...
0
947
thread by: c0d3rX | last post Nov 25 '18 by: c0d3rX
The following code is from the turtle graphics demos. The program is a color mixer and allows the user to change the background color of the window using three turtle sliders. Under the function definition "main" there are three global variables defined ("screen", "red", and "blue"). I'm trying to understand the purpose of defining these...
0
992
thread by: c0d3rX | last post Nov 20 '18 by: c0d3rX
There is an example of code in Python documentation as follows: class Mapping: def __init__(self, iterable): self.items_list = self.__update(iterable) def update(self, iterable): for item in iterable: self.items_list.append(item)
2
1,127
thread by: c0d3rX | last post Nov 20 '18 by: c0d3rX
My questions is regarding subclasses in Python. For example, if I have the following code. class Myclass: def __init__(self, input) self.input = input
1
1,977
thread by: Akashk | last post Nov 17 '18 by: Luuk
Now, getting following error.how to fix it. Traceback (most recent call last): File "E:\APPS\stopwords1.py", line 1, in <module> import nltk File "E:\APPS\nltk.py", line 2, in <module> from nltk.tokenize import sent_tokenize ModuleNotFoundError: No module named 'nltk.tokenize'; 'nltk' is not a packa
0
945
thread by: agrawalanjita | last post Nov 15 '18 by: agrawalanjita
What command do we use to debug a Python program?
6
15,090
thread by: aruni | last post Nov 13 '18 by: rodnaz
Hi I am aruni.I have just started to use the python.I tried to import os in my program.but it is giving me an error as "no Module named OS".I thought it as similar to sys.Can anyone tell me an sugesstion.How to use the os in my python program.

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.