15,181 Topics
| |
I want to extract this data from a website `You need to add the numbers present in this string. Your string is: 3754537dd2f082ad578e0ff1806d86a6` This is what I was doing url = opener.open('http://www.website.com') data = url.read() extract = re.search('your string is: <strong>(.*)', data) ans = extract.group(1) ans = string.split(ans, '</strong>')[0] print … | |
I want a code in python, to convert binary to decimal however i want the user the choose which way to convert the number(i.e, binary to decimal or decimal to binary) thank you | |
lol don't take any offence to the title XD just being funny :P anyways... I'm having a problem with my function... it's supposed to allow you to read/write float values in any specified byte length. but there's a problem with the output value >_> first off though I must state … | |
Looking to test my library and implementing it so that insert function can assign the index of the rear in th e ring after the items are inserted in ring class CircularQueue: def __init__(self, size): """ ------------------------------------------------------- Initializes an empty queue. Data is stored in a list. ------------------------------------------------------- Postconditions: Initializes … | |
Hi i am new to python and i am trying to create a GUI application which will hold different games aimed for autistic children, from where these games can be played. I have imported the scripts to the Gui application area as follows from tkinter import * from tkinter.messagebox import … | |
Im new to programming python3 and i'm trying to write a password program. i want to compare a word from a .txt file with a input. no matter if i type the password in write or wrong it always comes up 'access denied!' inFile = open('passwordtest.txt', 'r') password = inFile.read() … | |
Hi am a newbie in Python. I have this code for a game where a client types in e.g. as illustrated several cities and the code works out a combination to open a vault. It works well without a while loop but i want a loop where: 1. The first … | |
What I am trying to do is create a form that is automatically generated and then the values from that form are then used to proceed in the program. Currently to generate my form I am using this function `real_names=["Jason","Casandra"]` this portion of the code is not static it is … | |
I am having difficulty with a program in my CS class right now and I am wondering if you guys could help. Basically, I need to find the length/width (should be equal) of the 4 corners(I'll call this variable 'x') of a piece of cardboard, to cut them out to … | |
import xlrd import re workbook=xlrd.open_workbook('planningSpreadSheet_20140120T124023_20140203-20140209.xls') sh=workbook.sheet_by_index(0) palabras=str(sh) for col in range(sh.ncols): for i in range(sh.nrows): caca=sh.row_values(i) print(caca) Hi , i try to do a seeker, read an xls file ,and find a word,(input()),and show all the content of the row | |
so here's what I want to do: import module mvar = module() I've seen it done with the PyQt modules, but I don't feel like researching a complex code just to figure out a simple usage. :P anyone know how this works?? | |
Hello, i want ask somthing about mysql in multi pages i hope someone help me and sorry about my English this code works good but there problem if i used it with this tybe sql = "SELECT * FROM emaillogs ORDER BY id DESC" cursor.execute(sql) results = cursor.fetchall() if page … | |
this is just as complicated as it sounds... but to try to simplify things, look at this image: http://lh4.ggpht.com/-_tyPL2KaJAQ/UIONlx4ZnBI/AAAAAAAAEJU/vU1429txSqk/s424/aglorithm.PNG I need the influence generation aglorithm's for both I1 and I2. here's what I currently have: http://lh5.ggpht.com/-_jX5pm2be18/UIMtH46GfoI/AAAAAAAAEIk/Btswj9Lw4iA/s640/DM%2520prg2.PNG please help I've been doing google searches for the bezier aglorithm, but havn't come … | |
so basically... what I want to do is identify the function calling the dynamically created/referenced class let's put this simple... I have 2 functions, both of which either create or reference the same class based on an input... this function then returns the class with specifically set parameters. (not an … | |
so basically... I have a dynamic memory sub-system that does this: d = bu32() # a value from dynamic memory (such as 2) print d print type(d) p = ref(d) # a pointer deref( p, bu16 ).set(10) # short *p = &d; *p = 10; //(not sure if correct) print … | |
first off, I hope it's not against the rules for me to request optimization... :x I've tried to write the code with my best understandings of python optimization (which isn't much). def ov( value, byte_size ): sign = False if value<0: value += 1; sign = True value = abs( … | |
Hey all, I'm so confused about how to write a function about sine and cosine without using import math, can anyone help me about that? | |
I tried out one of the "Projects for the Beginner" ideas: the [URL="http://www.daniweb.com/forums/post223885-54.html"]change calculator[/URL]. Basically, you tell it how much the purchased item was, and how much the customer paid. Then it tells you the change due, and the most efficient combination of bills and coins to pay it. However, … | |
I have a difficult problem. I know there are so many 're' masters in python out there. So please help me. I have a huge log file. The format is something like this: [text hello world yadda lines lines lines exceptions] [something i'm not interested in] [text hello world yadda … | |
Hello everyone, I have 1 raspberrypi and 1 windows server which already has mysql (phpmyadmin) inside it. I need to insert data by using a python script inside the raspberrypi (I work from the raspberrypi) but the data must go to the windows server (it doesn't work yet), the point … | |
Web.py outputs 0.0.0.0:8080. On windows, localhost and 0.0.0.0 work. But on mavericks, localhost doesn't work! 0.0.0.0 works, though. Can someone explain what 0.0.0.0 is? Why does web.py say you can enter a ip and port in command line and it will run there? (You can't run on someone else's ip,can … | |
What's a better way to do this? I need to sift through this file and store the following values Cpl File name Content kind Package type Encryption status Container File size Duration Timed text/png Number of audio channels 2d/3d Fps 1) I'm not sure if I should just store these … | |
I'm trying to modify this code to take advantage of classes and some other oop features. However, I'm struggling with getting beyond the basics. This is the code that I started with which I am trying to change and make more class absed. import glob import os import sys print(os.getcwd()) … | |
Most commonly a dictionary of key:value pairs is searched by the unique key. Sometimes it becomes necessary to search for the key, or keys given a value. Special consideration has to be given to this case, because the value does not have to be unique and may return several keys … | |
What must one do to increase the speed and efficiency at which one learns and develops prorams in python(or in any other language)? | |
i am trying to recieve input from external text editor using python's `subprocess` but I am not sure why i am getting the error diff = subprocess.Popen('open(os.path.join(os.getcwd(), "foo.txt") "w")', stdout=subprocess.PIPE) pr = subprocess.Popen(sublime, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, stdin=diff.stdout) pr.wait() if pr.returncode == 0: msg = pr.stdout.read() print msg er = pr.stderr.read() … | |
books = { 'Contact':['Carl Sagan', '2'], 'End of Faith':['Sam Harris', '7'], 'on Mars':['Patrick Moore', '1'], } based on dictionary above, how can i get Modales Qdialog box that should have 3 column containing like below DialogBox BookName_Label: BookAutor_Label : Quantity_QSpinBox BookName_Label: BookAutor_Label : Quantity_QSpinBox BookName_Label: BookAutor_Label : Quantity_QSpinBox Ok Cancel | |
Uhm, I'll tell it as clear as possible. So, if you have few files and you put it into for example `.zip` archive. Files are included into one file and can be double clicked to be executed. If you change this `.zip` into `.xyz` file and trying opening this in … | |
Hello gurus: I saw the discussion related on working with words with python which is: import win32com.client wordapp = win32com.client.Dispatch("Word.Application") # Create new Word Object wordapp.Visible = 0 # Word Application should`t be visible worddoc = wordapp.Documents.Add() # Create new Document Object worddoc.PageSetup.Orientation = 1 # Make some Setup to … | |
Hi, I have created a program that follows a line blitted on a surface called 'screen'. I have created a function in a different file to do so and have imported it into my main file like so: from Follow_Ground import Follow_Ground The code in the file 'Follow_Ground.py' looks like … |
The End.