15,175 Topics
| |
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 … | |
Hii, Can anyone provide me the python code for finding a number that is stored in a file . The file contains 1 lakh numbers!! And i want a python code that searches the file and find the desired element!!!! Both linear search and binary search!! i'm a python beginner!!!! … | |
I wish to use parameters in a class to change what the class displays how would this be done? | |
I have these few lines in a class in my program but it doesnt appear. No errors are shown and when i "print(menubar)" and address "0.4.." or "4..." appears menubar = Menu(master = self.mainGUI) fileMenu = Menu(menubar) fileMenu.add_command(label="Exit", command= destroyMethod) menubar.add_cascade(label="File", menu=fileMenu) destroy method does work and is existing. | |
Here's a small piece of code in python that may be helpful to those who like to play with substitution ciphers..... Say we have a text that is ciphered with simple [substitution cipher](http://en.wikipedia.org/wiki/Substitution_cipher), and say we know that the original text contained a certain phrase...but all we have now is … | |
| The listing below draws a dot wherever the mouse is clicked on the panel, but it seems to work only if *both* lines self.panel.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) wx.EVT_LEFT_DOWN(self.panel, self.OnLeftDown) are included. If one or the other is omitted the dot doesn't appear until the next mouse click (so the locations of the … |
Hi, i'm a beginner to computer programming and I feel like I didn't learn anything in college. I got my associates in science and I don't know from where to start orwhat language to choose. Does everybody go through this stage before they become good programmers? |
The End.