15,175 Topics

Member Avatar for
Member Avatar for FreezeBlink

For instance, if you have the following (random example): [code=Python]w = input("Enter width") h = input("Enter height") for x in range(0,w): for y in range(0,h): print x,y if (raw_input("Stop? y/n") == "y"): break[/code] That would only break out of the y loop. You could introduce another variable, and change the …

Member Avatar for vegaseat
0
170
Member Avatar for sln

Hi Everyone, I am trying to install Tossim (simulator for Tiny OS ) on my Mac. I have a Macbook which runs 10.4.11 . I am stuck because I am unable to find the file libpython.2.4.so . Can someone please tell me the directory that this file gets stored in …

Member Avatar for Shadow14l
0
53
Member Avatar for Shadow14l

Nvm :/ Please excuse my blindness. Where's the delete topic button at? :( Please excuse it again. ~Shadow14l

0
54
Member Avatar for cwolfraven

Hi. I am totally new to python. I have a problem that I have been trying to solve without any form of solution. I have a group of files in Directory A that are named like: Text__###__TEXT___###.tif These are dummy files. The real files are in Directory B and are …

Member Avatar for Freaky_Chris
0
96
Member Avatar for Shadow14l

I just want a console to run. When I use this function, I don't ever want the automatic tk window to appear. How would I use this function without any gui? *Also on a side note, what is the python code tag? (python)is it this :P?(/python)

Member Avatar for Shadow14l
0
240
Member Avatar for tondeuse34

Hey guys, lately i've been having some trouble with file I/O but usually i don't heres an example of reading a file: [CODE]print "\nReading..." myfile = open('myfile.txt', 'r').read() print "\n",myfile[/CODE] but is there and easier way to do that because when i try to run the program just stops, it …

Member Avatar for tondeuse34
0
111
Member Avatar for hilarybrobbey

I'm trying to create an audio playing program for my final project in my computer graphics class. I'm using tkSnack but i keep on getting this difficult error and i seem not to find any solution. >>> from Tkinter import * >>> root = Tk() >>> import tkSnack >>> tkSnack.initializeSnack(root) …

Member Avatar for Ene Uran
0
81
Member Avatar for sam_only96

hi all! how can we list all directory as well as file(all hirerchical) in python script by giving the path as input

Member Avatar for sam_only96
0
225
Member Avatar for FreezeBlink

[quote] cell.health -= fighters[0].compDmg(fighters[0],cell) TypeError: compDmg() takes exactly 2 arguments (3 given)[/quote] Both fighters[0] and cell are object instances. How on earth does it see 3 arguments in this? I don't think wider context is needed, but just ask if it is.

Member Avatar for bvdet
0
190
Member Avatar for tondeuse34

Hey guys, I've came across problem and wondering say if you have a 2 lists called user_list and pass_list and you have a prompt for username and password. Instead of 1 user name and password how could it be for all can be used at the same prompt? heres an …

Member Avatar for tondeuse34
0
122
Member Avatar for alivip

I write code to get most frequent words in the file I won't to implement bigram probability by modifying the code to do the following: How can I get every Token (word) and PreviousToken(Previous word) and frequency and probability From text file and put each one in cell in table …

Member Avatar for alivip
0
120
Member Avatar for swaroopk85

HI All, I am connecting to a https site through proxy.But when I am trying to do it I am getting Unknown Protocol Error ..Is there any problem in ssl or proxy??? Can anyone help me in this regard???

Member Avatar for a1eio
0
43
Member Avatar for happimani

Dear all, Previously i used Python2.3 now i upgraded to python 2.4 but my problem iam getting error ImportError: No module named pywin.framework.startup what to do ?????? regards Narain

Member Avatar for BearofNH
0
68
Member Avatar for zls11610

i want to define a dictionary in python script i come from china . start to learn python only a week ago e-mail: [email]zls11610@onestx.com[/email]

Member Avatar for praveen_web
0
3K
Member Avatar for SUBHABRATAIISC

If I write a code like: def addstring(n): a1=raw_input("PRINT THE FIRST STRING:") a2=raw_input("PRINT THE SECOND STRING:") a3=" " a4=a1+a3+a2 print "THE TWO STRINGS YOU PRINTED ARE ADDED AS" print a4 Now, if I design one HTML form where strings can be submitted but if I put one ADD button how …

Member Avatar for SUBHABRATAIISC
0
86
Member Avatar for tondeuse34

Is there a function out their in python that you will declare a target i.e. a text box on another open window, and it would print text to that screen? Thanks

Member Avatar for tondeuse34
0
89
Member Avatar for froboi

So i've been attempting to program a home bar tending program that takes materials that you have in your home and compiles a list of drinks that you can possibly make. The problem I'm having is that i have no clue how to make the search function and the compiling …

Member Avatar for jrcagle
0
177
Member Avatar for callie_360

Hi! :) I want to read each line in my file, and determine if each occuring page tag is included in the validPages array...I've gotten everything except when I retrieve a line with a page tag (readLines()), I can't use that line as a string to compare with my array...even …

Member Avatar for woooee
0
123
Member Avatar for Azurea

I've got an issue with lists right now. I've got 2 lists, Checker1 and Checker2, which check for the Ko rule in my game of Go. However, Checker2 should always be checking the board one turn behind Checker1, which checks the board every turn. That way, the Ko rule can …

Member Avatar for Azurea
0
92
Member Avatar for SUBHABRATAIISC

If we write a code like: a=['city','village','town','capital'] a1=len(a) a2=range(a1) for x in a2: a3=a[x] print a3 In this code if we want to store the value of a3 it would store last value always. But in any way can we store all the values?

Member Avatar for Ene Uran
0
84
Member Avatar for Tyrfing

Hello, I am trying to install scipy on Ubuntu 8.0.4LTS, and am having some serious issues. I have succesfully downloaded and installed scipy, but when I try and "import scipy" in a program I am returned: ImportError Traceback (most recent call last) /home/tim/Desktop/scipy-0.6.0/<ipython console> in <module>() /home/tim/Desktop/scipy-0.6.0/scipy/__init__.py in <module>() 52 …

Member Avatar for Tyrfing
0
2K
Member Avatar for happimani

Dear all, Iam installing Python 2.4 version in silent mode msiexec\i "python.msi' \qn but after finishing this i got one error in WIN32.exe installation i enclosed that screenshot in this post,am i correct in my process what are the Actuall steps to implement silent mode installation,,,any idea.............. regards Narain

Member Avatar for jrcagle
0
126
Member Avatar for gotm

i am completely stumped at how to create this program. can anyone help out? here are the guidelines. Introduction Perhaps in no other sport does statistics play as major a role as in the game of Baseball. In fact, certain numbers, such as 56 (length of Joe DiMaggio's hitting streak), …

Member Avatar for jrcagle
0
135
Member Avatar for urmybaby

As basis for the assignment, we use a CSV file named country.csv in which information about countries is recorded. This file is posted on the assignment Web page1. The first line in the file is the header line and describes the content of each column. The first value in a …

Member Avatar for kdoiron
0
82
Member Avatar for tondeuse34

Hey guys, I've started using Tkinter now and I've came across a problem...Here in the code below i just want a drop box style menu to appear and when i click that option, theres more options. When i click for example their would be a box called Addition, you would …

Member Avatar for Capt.Micro
0
119
Member Avatar for Mackjan

Hi How can I stop a loop, this function sort my list as I wish but I want to stop it when it done the task. I have a list x = [4,4,2] and during 15 attempt I want to sort it like that x = [1,2,3,4], if the function …

Member Avatar for Mackjan
0
108
Member Avatar for jmroach

I am trying to add entries to a dictionary with the following loop: [CODE=python] for p in pressures: q70in.resetKeyword( "expansionRatio", p ) q70in.writeInput( prefix + tempInput ) commands.getstatusoutput( runq70 ) q70out = q70.Q70Output( prefix + outputFile ) results[p] = {} #results[p]['Performance'] = q70out.performance results[p]['Conditions'] = q70out.conditions print q70out print results …

Member Avatar for jmroach
0
149
Member Avatar for wonkychair

Hi all, I'm pretty new here and I'm also pretty new to Python. I'm planning this application that would scan a plugins directory on startup and add one tab for each plugin to the main wx.Frame. Now, I got this simple plugin example working, that printed a line from the …

0
68
Member Avatar for sam_only96

Hi All ! Glad to become a part of DaniWab IT Discussion. This is Samar a beginner to Python programming . I am from Bangalore India. Having a lot of Questions and a huge ambition i am here with you.I am too friendly , too open minded and cool my …

Member Avatar for jbennet
0
109
Member Avatar for tondeuse34

Hey guys, is it possible to simulate a mouse click using x and y co-ordinates. And also could you have user input of a certain co-ordinate and it would click that specified co-ordinate? thanks.

Member Avatar for tondeuse34
0
2K

The End.