473,554 Members | 2,318 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,972
thread by: helenmai | last post Oct 25 '18 by: helenmai
My Csv File looks like below Territory NoOfCustomer D00060 10 D00061 20 D00065 70 D00067 90 I have to create a Unique Id based on Number of NoOfCustomer like If NoOfCustomer <=50 then I have to create 10 different Unique ID for Territory D00060 and 10 different Unique ID for Territory D00061.
0
1,336
thread by: agrawalanjita | last post Oct 26 '18 by: agrawalanjita
Explain the ternary operator in Python?
0
1,124
thread by: sunwukong | last post Nov 6 '18 by: sunwukong
These time I am reading a wondeful book,it's name is "GRAY HAT PYTHON".And in the 4 chapter,it make a mail sniffer,but in my computer,it can not sniffer the mail login data packets. it's code: #coding=utf-8 from scapy.all import * def packet_callback(packet): if packet.payload: mail_packet = str(packet.payload) if...
0
945
thread by: agrawalanjita | last post Nov 15 '18 by: agrawalanjita
What command do we use to debug a Python program?
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)
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
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
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 ):
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
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))
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,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
0
1,525
thread by: dukool sharma | last post Jan 9 '19 by: dukool sharma
How can I print the contents of a file?
0
2,215
thread by: samvb | last post Jan 9 '19 by: samvb
Hi, We have a DRF backend API and two front-end applications: a CRUD and a report server. Currently, we have issue with CORS: These are the domains: sever.com:8098 == >backend and front ends:
0
1,100
thread by: bansalhimani | last post Jan 17 '19 by: bansalhimani
Does Python support interfaces like Java does?
0
1,091
thread by: kalyan kp | last post Jan 22 '19 by: kalyan kp
o=int(input()) p=input().split() q=input().split() r= f= r.sort() f.sort() i=0 for j in range(o): i=i+abs(r-f)
0
1,416
thread by: fiorasyndra1 | last post Feb 20 '19 by: fiorasyndra1
Hi everybody , has anyone ever worked with the AF_AX25 address family as a socket? is there any examples anywhere on the internet? I have not found any yet. The goal should be to use an AX25 device (defined in axports, with KISSPARMS or similar) with Python.
0
1,320
thread by: Ashish26197 | last post Feb 20 '19 by: Ashish26197
ploting (X,Y,Z, time dependent scalar) in python all variable contain data as array and 4th component should be able to varied with time in visualisation. seen such visualisation in matlab thought slice
0
1,062
thread by: Joellucas031017 | last post Feb 24 '19 by: Joellucas031017
So I'm like 2 days in to learning python and I just programmed a simple calculator, is there any way for the answer it displays to be in boldface type or underlined? Thanks
0
1,420
thread by: Ahmed Hussein | last post Feb 28 '19 by: Ahmed Hussein
Is there an efficient way to get the offset of some field in a packet captured with pyshark? For example, I need to get the offset of the source IP within the whole packet or within some layer header in the packet. Is it possible?
0
1,180
thread by: Kiemanisi | last post Mar 5 '19 by: Kiemanisi
Well, I know there are many querries on this topic and I tried the suggestions posted but still it does not works for me so I am starting a thread here. I also tried on the Python forums but some of them suggest asking Ubuntu community and vise-a-versa ! I am learning Python programming and make some simple games but I wish if I can run those...
0
1,084
thread by: Binsha | last post Mar 10 '19 by: Binsha
I am trying to build a software for graph plotting where graph can be shown as a slideshow so that the data can be clearly visualised. First I wish to plot a set of data then after a specific time interval next set of data and so on. I have a text file contains data as: 0.00 -10.742 10.7888 6.33455 1.00 -17.75391 10.0000 ...
0
1,658
thread by: vinodkasipuri | last post Mar 12 '19 by: vinodkasipuri
In this Tutorial, we will be discussing the difference between Python 2 and Python 3, so here we have some differences between Python 2.0 and 3.0. In this Tutorial, I would be covering the following topics: Expression Print option Not equal operator. Range. Automated Python 2to3py.
0
1,255
thread by: vokoyo | last post Mar 15 '19 by: vokoyo
Dear May I know how to modify my own Python programming so that I will get the same picture as refer to the attached file - Adaline Stochastic gradient descent (I am using the Anaconda Python 3.7) Prayerfully Tron Orino Yeong tcynotebook@yahoo.com
0
1,124
thread by: ArakelTheDragon | last post Mar 17 '19 by: ArakelTheDragon
Hi guys! I have the following code, everything is working, except that I can't get the function for hiding the tool bar to work. Originally I was using a different approach from a tutorial, it was working, but now that I added new things and changed some old, I get a problem. error: AttributeError: 'Example' object has no attribute 'toolbar'...

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.