473,554 Members | 3,119 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.
1
1,372
thread by: ashraf23 | last post Nov 13 '18 by: rodnaz
# Program to add two matrices using nested loop X = , , ] Y = , , ]
2
48,727
thread by: sirdeltalot | last post Nov 13 '18 by: rodnaz
Hi I keep on getting an errror saying 'EOF in multi-line statement' when i run my code. I'm just learning python and it keeps getting in the way. What could be the cause of the error? Thanks Iz
0
1,123
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...
7
164,329
thread by: DannyMc | last post Nov 4 '18 by: Mrityunj2018
Hi , i am in the middle of creating the script to match the string and replace it in mount.txt mickey:/work1 /work1 bla bla bla mickey:/work2 /work2 bla bla bla micket:/job /job bla bla bla
0
1,336
thread by: agrawalanjita | last post Oct 26 '18 by: agrawalanjita
Explain the ternary operator in Python?
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,133
thread by: topu | last post Oct 23 '18 by: topu
Write the number of days in months program so that the program prompts the user for the file name and reads the dates from the file. The dates in the file are written in the format dd.mm.yyyy. The program looks for the month in each line (hint: use split) and prints out the number of days in that month. Rewrite the function so that it does...
0
2,496
thread by: Mass17 | last post Oct 20 '18 by: Mass17
I have a python3 program that gives cycles for a given permutation. I want to know how to find a children out of it. This is what I have to create a cycles; def to_cycles(perm): pi = {i+1: perm for i in range(len(perm))} cycles = while pi: elem0 = next(iter(pi)) # arbitrary starting element this_elem = pi
0
1,167
thread by: pradeepkumarbe | last post Oct 18 '18 by: pradeepkumarbe
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.
1
7,156
thread by: madhuri124 | last post Oct 18 '18 by: dwblas
I am trying to write to a file inside folder.But it is failing with below error.Please help. Traceback (most recent call last): File "C:/Users/admin/Desktop/scripts/de.py", line 6, in <module> with open(mypath,"w+") as x: IOError: Permission denied: 'C:/Users/admin/Desktop/scripts25/hj214/f.txt' Here is my code: import os mypath...
0
1,098
thread by: ajmmartinez | last post Oct 16 '18 by: ajmmartinez
Hi, I'm using pyhook to get mouse events. Right now I can get the windows name when I click on some windows with the mouse, but anyone knows if I click on an object (a file) to get the name ? Thanks a lot
0
1,016
thread by: jackbuck12 | last post Oct 15 '18 by: jackbuck12
If the list were to be how would I make a code to add them together
0
1,138
thread by: jackbuck12 | last post Oct 15 '18 by: jackbuck12
Hi I am doing an assignment for m programming class but I can not figure out what to do after this... a = for i in range(len(a)) print (a)
0
1,443
thread by: Tyra | last post Oct 9 '18 by: Tyra
Hi all, Can you help me to solve this. Following the step: 1. Copy file at folder A into folder B 2. Rename file at folder B 3. Repeat the step 1 & 2 using Python os module
0
1,639
thread by: PySimpleGUI | last post Oct 6 '18 by: PySimpleGUI
Hi... I just joined so I'm still feeling my way around. Delete this post if it's not appropriate... want to play by the rules. Anyway, the PySimpleGUI framework has been gaining a good number of users. I'm trying to reach people that could benefit from being able to quickly and easily create a GUI... that can also be turned into an EXE file....
0
941
thread by: Pugdude | last post Oct 1 '18 by: Pugdude
I need to make a music bot that create a playlist and I need to be walked tho how it works. Sorry im new to coding and I just want to play around with this
0
943
thread by: darkapostle | last post Sep 28 '18 by: darkapostle
Hello, I am struggling with an assignment using python for data analysis. We are allowed to use pandas but I had a problem with showing the data using Pandas so i continued the code without Pandas. I am having problem with getting multiple things from the data( I have to get the year, northern latitude, and name of a hurricane) as well as...
0
956
thread by: gkiranseo | last post Sep 25 '18 by: gkiranseo
I'm learning Python programming from the Mindmajix training and I just completed classes about lists, tuples, functions and methods. One of the projects following this lecture is to create a program which takes in a list as an input and outputs a corresponding string, as the following example showcases: Input: Output: bikes, cars, buses,...
3
1,422
thread by: Xillez | last post Sep 20 '18 by: Xillez
I have a problem updating self.tiles.type in line 29. Once leaving the for loops in Map's __init__, the tiles list "forgets" the update somehow. - I've tried adding a setter function for "type" in Tile but that didn't work also tried making the "type" a class level variable but that didn't and wouldn't help anyway. - I don't suspect its...
1
67,388
kudos
thread by: kudos | last post Sep 19 '18 by: rakshabnayak
Some time ago we created an example of how you could use Python from C, both as a separate process and how you could embed it and run it as part of your C program. Then we realised; perhaps people don't write C programs anymore,so we made the same example in Java. After looking at the bytes.com forum, we started to suspect that perhaps people...
0
1,048
thread by: AdrianGr | last post Sep 7 '18 by: AdrianGr
Hi byte community I am working for a company and my task is to develop a web tool about energy storage technologies. The tool should: -allow the users to get information about a specific technology (parameters, applications, SWOT analysis,... so basically numbers and text, shown nicely (some of them in various plots) -allow the user to...
0
1,439
thread by: nishank05 | last post Sep 4 '18 by: nishank05
I want to integration CC Avenue payment gateway with Flask. Is there a ready made library for that or is there a way I can do it. Seems CC Avenue officially supports ASP, ASP.net JSP and PHP only. Any help will be highly appreciated. Best regards.
1
1,883
thread by: Sekouga | last post Aug 18 '18 by: zmbd
In below entry I missed the quotation mark after name.txt. How to go back and put it. >>> file = open('name.txt, mode='w') It should be like below >>> file = open('name.txt', mod='w') Thanks
0
1,783
thread by: ub0001 | last post Aug 17 '18 by: ub0001
Is there any library available in python so that i can add a digital signature in pdf document using certificate file in python (version 2.7) I will use this in a django project
2
1,366
thread by: jhon123 | last post Aug 17 '18 by: jhon123
I have nested list below as test_data which is my input also and expected_data is the formatted output my question now is how to get expected output from test_data. ###Input given test_data = , , ] ###Expected Output --

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.