15,406 Topics

Member Avatar for
Member Avatar for ah12345

I'm trying to write a client for this web service (see wsdl below), but anything I've tried so far doestn't work. With SOAPpy, I'm getting the following error: Traceback (most recent call last): File "<interactive input>", line 1, in ? File "C:\Python24\Lib\site-packages\SOAPpy\Client.py", line 470, in __call__ return self.__r_call(*args, **kw) File …

0
51
Member Avatar for strictlycustom

So below is my simple code for my simple program, now I have to "Use 2 functions for this program in addition to the main program. The first function should ask for the hours and returns them to the main program. The second function should receive the hours from the …

Member Avatar for vegaseat
0
95
Member Avatar for scru

Is there a way to find out the IP addresses of all the computers on the subnet my script is running on?

Member Avatar for BearofNH
0
61
Member Avatar for alivip

I integrat program to be GUI using Tkinter I try browser direction as you can see [CODE]# a look at the Tkinter Text widget # use ctrl+c to copy, ctrl+x to cut selected text, # ctrl+v to paste, and ctrl+/ to select all # count words in a text and …

Member Avatar for alivip
0
455
Member Avatar for alivip
Member Avatar for 1337455 10534
0
64
Member Avatar for nxavier

Hi guys, I've almost finished my assignment but the last question is kind of a curve ball (for me). She wants us to create function that accepts a list of words and then returns the longest word in the list. This is what I've come up with: [code] def longestWord(wordlist): …

Member Avatar for scru
0
97
Member Avatar for a1eio

Hi, I'm a bit stuck on getting 1 function that's not inside any class or function, accessible or callable to everyother part of the program, from within classes and the Main function.. i've tried to make it global but i'm not sure on how to make it work and it …

Member Avatar for BearofNH
0
124
Member Avatar for julichrist

hi, i'm using django framework. but now i'm facing some problem... i want to check if the system time is the same with the time that user input? i don't know how to do it in django framework... but i'm sure in VB, php or something just like this if …

0
52
Member Avatar for huglybits

I got a text file and saved it in python25 (a folder) as .txt. I need to import this file and I am getting syntax error that file is not defined. I am a complete biology novice to defining and importing files. Please help!

Member Avatar for 1337455 10534
0
112
Member Avatar for sigkill9

I've been working on this script all weekend and am almost done with it accept for one last detail; implementing a "process another number?" prompt after a user input is processed. The script works like this: First, the user enters a number to test (to find the two prime numbers …

Member Avatar for sigkill9
0
206
Member Avatar for nish88

hi.... i have an image Oscillator.gif and i want to implement the animation which is being shown by this image. can anyone tel me how to do this. or can you please give me some links or tutorials where such programs are being wrote. thanks you very much

Member Avatar for nish88
0
88
Member Avatar for nish88

hi everyone.....i'm designing a simulator and i need to study John Conway's Game of Life. i'm getting the source code in java or c++ everywhere i search. Have anyone ever implement it using python or can you please give me a link where i can find the source code in …

Member Avatar for nish88
0
139
Member Avatar for nish88

hi everyone. i'm try to load an image by clicking on a botton insert imag but the problem thata i having with this is that the image is not being insert it just appear and disappear immediately. can anyone tell me what is wrong with my codes and tel me …

Member Avatar for nish88
0
125
Member Avatar for alivip

how to ingrate my code to read text in in parent folder contain sub folders and files for example folder name is cars and sub file is Toyota,Honda and BMW and Toyota contain file name Camry and file name corolla, file name Honda contain folder accord and BMW contain file …

Member Avatar for jrcagle
0
104
Member Avatar for 1337455 10534

So I have a pyGTK app going on nicely, but it requires sudo permission (under Linux) to perform a BASH operation. If I prompt for a password using a GUI, is there any way I can do my BASH stuff without sudo asking the user for a password in the …

Member Avatar for 1337455 10534
0
208
Member Avatar for huglybits

I would like some advice as to how to write my wc program. Program should accept a file name as input and then print three numbers showing the count of lines, words and characters in the file. Chapter 4 question 15 of zelles introduction to python

Member Avatar for misty_mirage
0
518
Member Avatar for Zelores

Hey guys, I got another stupid question. For my last assignment, I have to take a .txt file that has contacts in it, import it into python (already did that) and use it to search with. the file goes last name first name number # repeats about 4 more times. …

Member Avatar for vegaseat
0
105
Member Avatar for shadwickman

Hi, I have a string that I want converted to an integer. I tried int() but it doesn't work because of what my string (as an example) is "2*2/4". I want it to make that into an integer and just put the answer (1). Is there a simple way to …

Member Avatar for shadwickman
0
116
Member Avatar for BluePaper

Hey there, I'm BluePaper or Aled. I'm currently a student studying A-levels (first year 6th form, and don't ask me to explain infact: [url]http://en.wikipedia.org/wiki/A-levels[/url]) of which I am studying Maths, Physics, Chemistry and Computing. My interests lie in a variety of computer based things and I've dabbled a bit in …

Member Avatar for BluePaper
0
121
Member Avatar for a1eio

Hi, I'm trying to create 6 buttons in a for loop using tkinter, each button's command points at the same function, but passes a variable (the loop counter.. in this case i) now for some reason.. when i run it, and click on each button, the function is supposed to …

Member Avatar for a1eio
0
143
Member Avatar for alivip

Is python provide search in parent folder contain subfolders and files for example folder name is cars and subfile is Toyota,Honda and BMW and Toyota contain file name camry and file name corola, file name honda contain folder accord and BMW contain file name X5 Is there way to enter …

Member Avatar for woooee
0
153
Member Avatar for okcomputer24

I am wanting to produce a number matrix which will result in displaying the numbers in chronological order. For example, if a 3 x 3 matrix is desired, the output would result as such: [[1,2,3],[4,5,6],[7,8,9]] The first part of my code can produce the initial list. However I am unsure …

Member Avatar for woooee
0
76
Member Avatar for piasek

[TEX] Hello I would like get this effect using PIL: [url]http://www.echostar.pl/~piasekps/10.png[/url] i have this code but it is not what i want, can you help me somehow? i will be greatfull for any help best regards p.s. i have also problem with ImageFont.truetype(font_ttf, size) it does not work on linux, …

0
64
Member Avatar for Achayan

import os import maya.cmds as cmds class mypars_ts: def __init__(self): print "Hello\n" def testing(*args): print "Call Came\n" def window_lod (self): if cmds.window('ExampleWindow', exists=True): cmds.deleteUI('ExampleWindow', window=True) cmds.window( 'ExampleWindow' ) cmds.columnLayout() cmds.text( label='Size and position the window before closing it.' ) cmds.button( label='Close', command='testing' ) cmds.showWindow( 'ExampleWindow' ) my_calls=mypars_ts() my_calls.window_lod() when ever …

Member Avatar for Achayan
0
129
Member Avatar for xRuP7uR3x

Greetings everyone. This is my first post on this board, and I would like to offer thanks for any and all help, guidance, advice, and/or bonks on the head in advance. I am an aspiring programmer currently learning Python as a way to introduce myself to the world of software …

Member Avatar for jrcagle
0
544
Member Avatar for biggz

ive ben asked to make a program where the user inputs a floating number eg.(2.5) and the program displays the 2 alone and the .5 alone ive ben trying for a while but gone nowhere

Member Avatar for vegaseat
0
87
Member Avatar for sigkill9

Could someone help me streamline this? Like eliminate unnecessary coding and etc? I got the script to work, although I couldn't figure out how to handle small prime numbers such as 2 and 3. It wouldn't output "this number is prime" (see script below) so I had to force prime …

Member Avatar for 1337455 10534
0
123
Member Avatar for alivip

I wont to find most 10 frequency word of specific file for that I have written this code [CODE] import sys import string import re file = open ( "corpora.txt", "r" ) text = file.read ( ) file.close ( ) word_freq ={ } word_list = string.split ( text ) for …

Member Avatar for alivip
0
131
Member Avatar for linux

Alright, I'm trying to make a small GUI application that'll allow me to run a .ck file (with ChucK) from a GUI, from a preset directory. Okay, so I have: [code=python]from Tkinter import * class chuckrun: def __init__(self, master): ui = Frame(master) ui.pack() self.file = Entry(ui, text="Filename") self.file.pack(side=LEFT) self.play = …

Member Avatar for linux
0
528
Member Avatar for vagab0nd

i have had a busy day and its late in the uk? I have with a little help earlier on here combined lots of snippets orf old code and tutorials into a app that works and is all new code. problem I have run into is that I want to …

Member Avatar for vagab0nd
0
120
Member Avatar for raswin

Can someone help me with this? My problem is like this... There is a string "India is" ... Then there is a unicode string Now if I try unicode("India is") I get an error like [B]"'ascii' codec can't decode byte 0xa0 in position 8: ordinal not in range(128)"[/B]. So what …

Member Avatar for jrcagle
0
29
Member Avatar for sigkill9

I have a question about a script i'm making. It asks the user to input an integer, then finds two prime numbers that sum up to the number, and displays what those two prime numbers are ( something like "54 = 5 + 49" ). I have most of the …

Member Avatar for sigkill9
0
104
Member Avatar for Thradok

I'm just starting out with Python, and for some reason I am getting a syntax error. This only happens when I run the whole program at once, but if I run only this little bit, it works fine. while choice != "q": choice = raw_input("What would you like to find …

Member Avatar for Thradok
0
108
Member Avatar for vagab0nd

ok below code is v rough but first implementation in python. i get the error name error name self is not defined in relation to teh first use of self.panelL in the layout function? it was working then i tried adding a button and it stopped I removed the button …

Member Avatar for vagab0nd
0
388
Member Avatar for amddma

ok this is my last one and i am still a total n00b to this. this is my assigment: [QUOTE]Lab: Finding the largest number In this lab, you will write a program that finds the largest number of a sequence. First, your program asks the user to enter an integer …

Member Avatar for amddma
0
110
Member Avatar for Azurea

Hi there. I'm pretty beginner at functions, and I would like to know if it's possible to have a parameter of a function that takes multiple arguments. Like in Python, you could have [CODE=python] >>> def a(*args): print args >>> a(1, 2, 3, 4, 5, 6) (1, 2, 3, 4, …

Member Avatar for Ancient Dragon
0
103
Member Avatar for sigkill9

I'm doing some reading in a python book and am doing one of the chapter exercises but I cant figure out how to get it to work and was hoping some of you python guru's could help out? Heres description of the problem to be solved: "A positive whole number …

Member Avatar for woooee
0
2K
Member Avatar for gianniszaf

Hi there, I am totally new in Python. What I am trying to do is the following: I have in a file various email addresses. The file look like [email]manolis@gmail.com[/email] [email]giannis@gmail.com[/email] [email]kostas@yahoo.com[/email] [email]eirini@yahoo.com[/email] [email]ssss@aol.com[/email] [email]wertza@yahoo.gr[/email] [email]xristhanthi@gmail.com[/email] and I want to count how many addresses belong to each provider. Eg. aol.com: …

Member Avatar for ZZucker
0
131
Member Avatar for volcs

I have been scripting with Python for a few years but I just recently decided to start using some OOP to make my life a bit easier. Although I've read many examples and some chapters and websites, some of the most rudimentary basics still elude me. Here is an example …

Member Avatar for katharnakh
0
105
Member Avatar for nish88

hi am writing a program and there a oval moving towards a big blue oval. i want when the red oval arrive at the blue oval is stop.can anyone tell me hoe to do this???? [code=python] from Tkinter import * import Tkinter import time frame=Tkinter.Frame() frame.pack() canvas =Tkinter.Canvas(frame,bg = 'white',width=500, …

Member Avatar for katharnakh
0
128
Member Avatar for pythoxine

I don't know what to do with this xlib error I get from the code below (please paste it into the python console and see it for yourself). I got some advice from some guy, but I am a newbie to wxpython so I don't know how to follow it …

Member Avatar for pythoxine
0
154
Member Avatar for isinc

I have an assignment that I'm working on and am having trouble. Not too familiar with graphics. Any help/guidance would be much appreciated to see if what I have so far is okay and what I should do for the loop part. I will post assignment details and what i …

Member Avatar for isinc
0
415
Member Avatar for sarabhjeet

I have created one application as well as i have created help or documentation file in a .chm format for my application.Whenever i click on help menu this documentation file should open but at a time only one instance of help file should open,how to do this...I think it will …

0
72
Member Avatar for mcenley

Hi friends, I have written the following program to display a specific o/p: [code=Python] def square_root(a): if a>1.0: x=a-1.0 elif a==1.0: return 1.0 else: pass while True: y=(x+a/x)/2 if math.fabs(y-x)<0.0000001: break x=y return x import math i=1.0 while i<=9.0: print i, sqrt=square_root(i) print sqrt, math_sqrt=math.sqrt(i) print math_sqrt, print ''*4, difference=math_sqrt-sqrt …

Member Avatar for mcenley
0
121
Member Avatar for LanierWexford

The function below will take a string(s) and rotate it a given amount(num). i.e cheer rotated by 7(cheer,7) will return jolly, and (melon, -10) will return cubed. This is an attempt at exercise 8.10 from "How to think like a (Python) programmer, and it works just fine. The issue is …

Member Avatar for jrcagle
0
199
Member Avatar for sarabhjeet

Hello all, Actually i need to close a dialog automatically after 5-6 seconds. For it what should i do,please help me.I am using wxTimer self.MB = wx.Dialog(self,-1,"hello",pos=(-1,-1),size=(200,100),style=wx.NO_3D) self.SB = wx.StaticBox(self.MB,"Here description of atelier will come") self.MB.Show(True) self.timer = wx.Timer(5,self.Step(self)) self.timer.Start() def Step: if self.timer.IsRunning(): print "" else: self.MB.Close(True) Is this …

Member Avatar for jrcagle
0
158
Member Avatar for enigmaenigma

I have txt files in russian which i need to read and trim out all the special characters like !,digits, blankspaces and write it into another file in the encoded form. Below is the code i am using for for fname in filelist: if fname.endswith('.txt'): count = 0 path = …

Member Avatar for enigmaenigma
0
100
Member Avatar for a1eio

Hi all, Just wondering if there is a way to see if a window has been destroyed or not. eg: [code] root = Tk() bla ... bla ... if root has been destroyed: do something... [/code] thanks in advance a1eio

Member Avatar for a1eio
0
304
Member Avatar for Zelores

Hi, I just joined today and i need some help with python. I just started using python not to long ago in my intro programming class. We have an assignment coming up and i need some help. How do you get the sum of an integer. ie: you put in …

Member Avatar for Zelores
0
197
Member Avatar for devarajm

Hi this is Devaraj i am user of Sun Solaris OS & very much interested in exploring the depth of coding language. Presently i am using Python & Shell mainly please make me fell comfortable in the forum. I want all you guys out there to help me & exchange …

Member Avatar for zandiago
0
56

The End.