15,190 Topics
![]() | |
Hello! I have written a piece of code that creates 3 folders in the working directory, asking the user to proceed even if it may overwrite existing folders. The problem is that the more pictures there are the more time it needs to create the folders. Is there any way … | |
I have written some code in Python for a tanks game and I need to write pseudocode for the Tank's move method and main game functions (battle and bonuses). What is bold and underline are what I need to do pseudocode for in the quoted text. I know what pseudocode … | |
:SHave they made a py2exe 3.0 yet and if so where in the internet can you find or have they just not made one yet?:confused: If not how else can I turn my programs into executables?:-/ | |
Here is my try of changing integers to English written numbers. Here corrected version 3 check: [CODE]from __future__ import print_function import random,sys if sys.version_info[0]==3: raw_input=input to_19 = ["zero", "one","two","three","four","five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen" ] tens = ["","","twenty", "thirty", "forty", "fifty", … | |
Hi again This time I have one kind of bigger problem. I have to bind single click and double click with Tkinter. So, I tried this: [code=python] root.bind("<Button-1>", single_click) root.bind("<Double-Button-1>", double_click)[/code] That doesn't work. What I can try next? How to execute function X on double click and function Y … | |
Hello! I am trying to write a piece of code to open a file using a 'while' loop. It should ask for the file name and, if it does not exist, ask for it again. This is the code: [CODE]while True: try: fhand = open(markFile) except: print 'File', markFile, 'cannot … | |
Hi all, the following is the result of executing a command on cli of a machine 192.148.2.10: [code] PGK:1200>> show employee record show employee record EmIL Desig Street Street2 Occupation Avialability ------ ----- ------------- ------------- ---------- ------------- ----------- 3222 HOD MorganLayout HB colony Engineer Yes 3321 Read Banker's colony James … | |
Hello! I have this piece of code, which asks the user to continue with the program even if it may overwrite some folders. [CODE]print w.fill('WIP will create Backup, Resized and Watermarked folders to store the original, resized and watermarked pictures. It will overwrite them if they already exists. Are you … | |
So basically what i want wanting to do is import a csv file and then have the user specify what year they want to add up all the total revenue. here is what is in my csv file [quote] 2009|1|22|56.23 2009|4|12|86.24 2009|5|20|34.67 2009|6|22|12.67 2009|3|21|795.12 2008|7|4|753.43 2008|8|9|2345.45 2008|9|1|2357.23 2010|5|2|7552.21 2010|3|15|666 2010|4|17|2323.75 … | |
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 … |
The End.