15,175 Topics
| |
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 … | |
just an idea ...im not a programmer yet starting college aug. c++ and java both have complex syntax and i cant learn on my own, python is good but not supported aswell and basic is really basic any more thanks to object oriented stuff English the programming and scripting language … | |
I need a function which can take in a variety of time formats like "05/26/1999" and "02/14/2010 12:44" and convert them into this format: May-26 or Feb-14. I've tried to do this, but without success. Here's the code I tried (with some prints included for debugging purposes): [CODE] #Function for … | |
I need to do CSV parsing and I was wondering if this is possible with python and where I should go to learn how to code this script or get help. Let's say I have a CSV file with 20 rows and 4 columns. I need to: -Strip out the … | |
i want this loop to keep on checking the number of files that are in the current working directory and every time one is added... print it out with cat. it stops running after a few seconds. right now it works for a bit but when i try to add … | |
I new to python . I created the one console application in python for that i used two data bases IBM_DBI and POSTGRESQL8.4. I converted the console application into windows exe for that i used py2exe. It is created, while running the exe it coudn't connect with DB2 data base … | |
I have the following class. I have tried many basic examples but I always get the same error. [CODE]class Factorial(object): def calculate(self, n): if n == 0: return 0 elif n == 1: return 1 else: return n * calculate(self, n - 1) if __name__ == "__main__": fact = Factorial() … |
The End.