15,175 Topics
| |
For a given digitally signed file I need to extract the 1024 bit(RSA) public sign key that is shown in the attachment. Can someone tell me how to do that through python. Is there a specific python module that can extract the digital signature details? If that is not possible … | |
I would like to share some python tutorials I found and thought are quite useful for those who just started to learn python: python basic tutorial video: [url]http://developresource.weebly.com/5/post/2011/10/python-basic-tutorial-video.html[/url] python game tutorial video:: [url]http://developresource.weebly.com/5/post/2011/10/python-game-develop-tutorial-video.html[/url] wxpython develop tutorial video: [url]http://developresource.weebly.com/5/post/2011/10/wxpython-develop-tutorial-video.html[/url] | |
Im a beginner at Python and I have written a program consisting of three functions and now Im stuck when I need to 'call' on them at the bottom of the program. In the 1st and 2nd functions I get some information and saving it to a file, but the … | |
Your program should calculate and output (to the screen) the following information about the file of text: 1. The total number of lines in the file, including blank lines. 2. The number of blank lines in the file. 3. The number of periods in the file. 4. The number of … | |
[CODE]def windchill(V,T): wc = 35.74 + .6215*T-35.75*(V**.16)+.4275*(V**.16) we = round(wc,2) return we def main(): print(" Temperature \n") print("Speed \n") print("---- -20 70 10 0 10 20 30 40 50 60 ") for V in range(0,55,5): print(V) for T in range(-20,70,10): wc = windchill(V,T) print(V, "{0:1.1f}".format(wc), end="") main()[/CODE] Its python 3, … | |
i need some help with this code please :) when i run this code the output after each time the nested loop runs should look like this: {'gender': 'Female', 'age': 9, 'fur': 'Brown', 'name': 'Savannah'} {'gender': 'Male', 'age': 9, 'fur': 'White', 'name': 'Thumper'} {'gender': 'Male', 'age': 8, 'fur': 'Brown', 'name': … | |
Hi, I am using Python 2.4 on Windows. I'm trying to save the contents of the debug window. I managed to redirect all print statements so that it prints on the debug window as well as saves a copy into a text file. The code is shpwn below: [CODE] import … | |
Hi, I'm working on Python 2.4 and use tkinter to build my GUI. I want to display content(line) from the listbox only when it is selected. [CODE] def get_list(event): # get selected line index index = Listbox.curselection()[0] # get the line's text seltext = Listbox.get(index) print seltext Listbox.bind('<ButtonRelease-1>', get_list) [/CODE] … | |
i need a example or sample code about text.dump (???) input values -> automatic text ---> automatic tags --> save (.doc , .txt) but when i save the text, the file dont get the tags.... like this example: input in text widget: I [B]love[/B] you [U]girl[/U] the output in (.doc … | |
Hi..me again. I am trying to incorporate this function which counts the periods into the code..however, I can not get the code to output both the line count, blank line count, and period count at the same time. This is my 3rd or 4th try at adding this into the … | |
program that will read an unknown number of bowlers and their bowling scores (with possible values from 1 to 300) from an external file called "bowlingscores.txt". The file will look similar to the following: David 102 Hector 300 Mary 195 Jane 160 Sam 210 Output the bowlers’ names to an … | |
[CODE]#!/usr/bin/python import smtplib sender = 'from@fromdomain.com' receivers = ['to@todomain.com'] message = """From: From Person <from@fromdomain.com> To: To Person <to@todomain.com> Subject: SMTP e-mail test This is a test e-mail message. """ try: smtpObj = smtplib.SMTP('smtp.gmail.com') smtpObj.sendmail(sender, receivers, message) print "Successfully sent email" except smtplib.SMTPException: print "Error: unable to send email" [/CODE] … | |
Any sequence of python strings can be disguised to look like a file opened for reading, which can then be passed on the fly to functions expecting such an input file. This code snippet defines the necessary adapter class. The obtained file-like objects store only one string of the sequence … | |
i want the proper working code of python to parse the NMEA gps data of the android plz help me | |
I am trying to write my dictionary to a csv and i am getting errors, was wondering if someone could tell me what i am doing wrong this is my function [CODE] n = open(file.csv,"w") for item in my_dict.items(): f.write(item) f.close() [/CODE] my my_dict is for example {john ['25']} when … | |
I know how to write to an existing txt file via Py function, but can you create the file itself from the function, or MUST the txt file already exist? | |
Hi all, I'm not a Python expert (I've only dabbled a little). A user has asked me to help with a short webcrawling script they have written. They are making use of Dale Hunscher's UrlNet library in the script. They basically want to have the script ignore overly repetitive URLS … | |
Hi guys, trying to write a function that reads a text file and counts the periods in it and prints the answer. I keep getting an error saying that UnboundLocalError: local variable 'periods' referenced before assignment. I am not sure how to fix this. We must use a function to … | |
Hey guys. I'm having some trouble with this error. [CODE] class App(): i = 0 def updateCount(self): i = i +1 app = App() app.updateCount() input('Enter') [/CODE] I have tried global i but get an error 'global name i is not defined'. Can someone clue me in? Cheers :D | |
I'm new to python and I'm trying to count punctuation in a string input by user, and I"ve been able to do it w/ out a loop, but would like to emply a more efficiant method. I've been able to loop through and grabb the characters, but they are'nt being … | |
Hey guys, hope I'm in the right section here, I presume Pygame falls under python. I'm trying to make a circle move left,right,up or down depending on the users input (e.g if the user presses the "a" key then the circle will move left by itself, rebound off the edge … | |
Hey there, everyone. My friend and I are looking into writing a very simple game in Python. We're gonna use PyGame for it as well. It's a top-down view 2D game where you play as a guy with an ax who kills zombies. There are not different levels; it's all … | |
ok well this is my first thread that im asking 2 questions, im new here, these are from my high school college computer science class, one is newer and one is older, i went back to the older one because I still want to finish it and try and extend … | |
| So im making a anagram detector that reads all the words in a string. I already have the anagram funktion working (returning true if it is a anagram, and false otherwise) But i am having trouble making a loop that reads all the words in the string, and returning the … |
I am supposed to have a while loop that asks for a number until the number is a negative. Then I am supposed to get a total of all of the numbers EXCEPT the negative number. As of right now my program adds up the absolute value of all the … | |
Here is class that can be fed directly from split stream like one number per line file (or [URL="http://www.daniweb.com/software-development/python/code/321725"]generator producing 'words'[/URL] from multiple numbers per line). | |
Hello All, I'm working on my first Python plot in my programming class this week. My assignment is to write a program to plot data contained in a csv format. Here is the data: "Bowl number", "Date", "Bowl location", "Winner", "Number wings eaten" "I", "1/29/1993", "Wyndham Franklin Plaza Hotel", "Carmen … | |
Hi, I'm new here... Please help me fix it, if I posted at the wrong section, this is about Python but also game development... So I'm not sure? :) anyway: I need some guide lines to the way of coding? or the use of things within the code... Here I … | |
There isn't a whole lot here about security related stuff, so I figured I would post some work in progress. It is pretty well commented so following it should be pretty simple. The full story and reasons for doing what I did, and not another way can be found on … | |
I compiled with py2exe and added the setup.py script because a few people have been having trouble with email.MEME.Text working with py2exe. The .PNG's are attached below save them to your c:/python26/ there isn't much security (passwords are temp stored in a .dat file) ________________________________________________ to: [email]john@email.com[/email] sendcount = 100 … |
The End.