15,181 Topics
| |
I am stuck on the parts of the first code that have <> in place of actual code and having trouble getting testing done at the end of the first code, the testing of the functions that I cannot get to work have being quoted out in Python. [CODE=python]from random … | |
I've recently downloaded the package that allows you to work an excel file using python at: [url]http://www.python-excel.org/[/url] I'm new at installing things from a programmer perspective... can anyone tell me how I'm able to determine if I have installed the programs correctly? | |
Hello, I'm having a little trouble learning some python and I'd appreciate a little direction. One of the exercises in my books says to create a string list [CODE]list = ["a","b","c","d"][/CODE] Convert each character in the list to it's ascii equivalent and then populate that information into a new list. … | |
Hello! I am very new with Python, so it may be a stupid question. How can I get the height and the width of an image in pixels? Cheers! Dani | |
Hi, I am trying to run an application that is developed in python and compiled in python 2.5 I have upgraded fedora 10 to fedora 13 now i am trying to install that application and run it fedora 13 it gives me an error File "kb.py", line 8, in <module> … | |
I just learned about dictionaries in Python and tried to implement them into a program I developed. The folders in the dictionary absolutely MUST be created in the listed order. But if for whatever reason they cannot be created, I want the name I specify to be printed instead of … | |
Hi all, the init.xml file has among its lines, one line as `<guid>5934</guid>` init.xml ------------------- ------------------- <guid>5934</guid> ------------------- ------------------ I need to increment the guid every time I modify the file. Could any one please tell me how to do that. Regards, Prashanth | |
I have a little project im working on, and the fundamentals are fine, i just have two specific queries. I have learned the code shown here from scratch the past week from samples and tutorials plus a little outside the box thinking. My only problem now is that my two … | |
Hello! I have just created a script (see it at the end of the message) to watermark images. If you want to, could you check it and suggest ways to improve it? Think of me as a very beginner ... Cheers! [CODE]#Import the required modules import os, shutil, fnmatch, Image, … | |
When I finally got the input to work in this code it stopped displaying the txt on the screen. Any suggestions on how to fix this. [code]import pygame, sys from pygame.locals import * import time mo = 0 # set up pygame pygame.init() # set up the window windowSurface = … | |
I know python and C++ and want tot start using the boost::python library. I want to use g++ for this not bjam but the tutorials online are really confusing. Can anybody give me a short tutorial on how to build projects using Boost::python ? | |
Hi all , How can I send Service command in pys60 , I read it's available in S60 3rd Ed FP2 not in FP1 ,... So what does this mean ???? Is there a difference when I'm writing a code using python targeting FP2 devices or FP1 devices ?? If … | |
Im sure ive parented everything up right buut when i run the code it doesnt show the panels right. As you can see from the code i want a 3 page notebook on the left half of the screen and a blank panel on the right side but i really … | |
A simple program to count the words, lines and sentences contained in a text file. The assumptions are made that words are separated by whitespaces, and sentences end with a period, question mark or exclamation mark. | |
Again, another hard question. So Ive got a function, and ive got a couple of try and exception in it, and basically what i need is, if those exception give me an error, i want that function to go to an end. So, how am i suppose to do this. … | |
hello all, i am interested in a small python application, which can be downloaded here : [url]https://launchpad.net/treemap[/url] if you run it, like this: python treemap-basic.py examle-world-population.txt it works just fine. the problem is that even if i type a print command in the "treemap-basic.py" file : print "Hello World !" … | |
Hi, I downloaded some code from a university website that calculates a metric evolutionary trees. I'm trying to run the program (called example.py) and the first line of the program is [CODE]from TreeGenerator import Tree_generator [/CODE] I did not think this would be a problem because TreeGenerator.py is another file … | |
Hey people, I've got a file, looks like this: [QUOTE]england america spain brazil germany australia[/QUOTE] now, I need to read it line by line: [CODE]country = open('languages/country.lang', 'r')[/CODE] and give a value to it, like: [QUOTE]A1 = country.readline()[/QUOTE] and then A2 for the next country and so on. So I … | |
hello , i created a thread to process some work, then a scrolledpanel to display some notifications, but only the main thread can create such windows, so i tried some stuff like this : #create thread thread.join() #wait until thread finishes to display the scrolledpanel display panel in main thread … | |
[I]<<mod edit: [URL="http://www.daniweb.com/forums/thread244248.html"]split from here[/URL]>>[/I] Probably a long shot, since this thread is long since dead, but was hoping I could get a hand. I'm trying to do pretty much the same thing here, but I'm getting an error at this line: [code]self.storeli[self.counter].append(a)[/code] Throwing a KeyError: 0 at me, referring … | |
As I was student, the bracketed plurals were absolute 'NO, NO'. With this simple function you can cleanly avoid putting bracket plural(s) after your numbers. If the number deciding singular/plural should not be automatically included, you can make version with [icode]str(n)+' '+[/icode] eliminated. If you want to put automatically space … | |
Is there a reliable way to 'pluralize' english words with Python? | |
i saw from this forum on how to make line number in python but where should i paste the code into???i pasted the code in my gui code and no numbers appear out??Can anyone help me???i am a beginner in this. Thanks. [CODE]import wx,os,re ID_OPEN=102 ID_SAVE=103 ID_SaveAS=104 class MainWindow(wx.Frame): def … | |
Is there a way to delete every n bytes from one point to the first byte? This s quite confusing. What I've done: [CODE]a = open("file.txt","r") b = a.read() a.close() findit = "WIN - PLACE" texto = b.find(findit)[/CODE] And now I need to delete everything before "WIN - PLACE", its … | |
how do i make a while loop start again after it reaches the else statement? | |
Hello all, Quick question-i am trying to write a programs whcih calculates the average of the numeric values of words that appear multiple times (if a word appears more than once then i want the average of its values). I do not get an error but instead only the sum … | |
I want to disable using 'import' with names of files from some folders. In my application I have folders named 'plugins' and 'drivers'. I want to user which will using my applicantion have no acces to files in folder 'drivers' from level of code (to no notify this fils after … | |
Why this Error may happend? I have to readjust huge application and I need the most supposed possibilities which make this kind of error. | |
Hello, pls can anybody help me to break following string? example: output is 000 (type str) an I need to get [0,0,0] here is a script: [CODE]def test(n_input): bin_n=2 r=bin_n**n_input ## print r for x in range(r): ## print bin(x) f=str(bin(x))[2:].zfill(n_input) # x is type int, f is type str … | |
Dear All, Hello, I am very new at python. I have an existing example project that have some scripts YYY,in path XXX/YYY and an script A.py that call these one by one. i.e, YYY is colection of py files { y1.py, y2.py,....}, that are imported to A.py. I mean that … |
The End.