473,574 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
3
9,232
thread by: Barry1point4 | last post Jul 19 '12 by: Barry1point4
I've been learing python from http://www.learnpython.org/page/Functions and in the functions lesson I've got stuck on the exercise for 2 days now. As far as I can tell my code should work but when i run it, it returns TypeError: 'NoneType' object is not iterable. Can anyone explain why? My code is: def list_benefits(): print 'More...
0
1,365
yoohoow
thread by: yoohoow | last post Jul 22 '12 by: yoohoow
Is any body use dejavu object relational mapper? I follow the dejavu pdf tutorial and try to run the example code . it's bad. import dejavu class Zoo(dejavu.Unit): Name = dejavu.UnitProperty() Size = dejavu.UnitProperty(int) def total_legs(self): return sum()
1
2,155
thread by: EngHamoud | last post Jul 24 '12 by: EngHamoud
hello , guys i'm wondering how to run javascript code .. look into my code ieobj = a.getIE() aaa =ieobj.Document.Frames.document.Frames into the BuySellMainFrame Frame there is javaScript function i could not find anyway to solve that ... thanks
1
2,735
thread by: MariusMardar | last post Jul 27 '12 by: dwblas
How can I fix it ??? snmp_actions_table = 'snmp_actions' action='precondition' + oid_name additional_info = self.config.get_campaign() if self.val != expected: result='N' #print 'oid_name = ', oid_name if oid_name == "MT120_SW_mt120SwTableStatus" : ...
2
2,903
thread by: jorinos | last post Jul 31 '12 by: numberwhun
what does means in python?
15
2,858
thread by: pascor | last post Aug 1 '12 by: numberwhun
I'm coming from the MSW development world and a few things in linux/ubuntu for "getting things done" have got me stumped. If I have my python app in "/usr/local/pyscripts" named "myapp.py", how can I set up things so that I can run it from anywhere on the command line by simply giving the command "myapp arg1 arg2 arg3" ? (I can write bash...
0
1,494
thread by: wangolo | last post Aug 2 '12 by: wangolo
Hello there i am facing a very complicated problem. When many clients like five and above connected to my chat server and start Chatting the clients on the chat get there message mixed all together, like when one client is still typing and the other client sends the message the client who is writing get his message modified so every thing is...
1
2,008
thread by: Stephen Thoma | last post Aug 2 '12 by: Stephen Thoma
I'm working on fixing a formatting problem in a bunch of XML files. I've got the find/replace all done, but there are so many files that I want to do the substitutions in a few separate threads to speed up the whole process. I've tried implementing the methods used in a few different threading tutorials and I've run into a wall. No errors, but...
6
2,647
thread by: charley Situ | last post Aug 7 '12 by: numberwhun
I want to open a word file, check again my list of words or phases to extract (such as Monday_Tuesday, Happy_birthday and etc) write the word or phases to another file Also states which word or phases in my list were not found
1
1,723
thread by: kokoloko | last post Aug 7 '12 by: bvdet
hello everyone, So just a small introduction; i am desperate for some help, i have this software written in python that keeps giving me trouble even after i fix it bugs come out of nowhere and i really need to have it fixed fast because my work depends on it. I do have some background in programming but not in python ( in java ). The program...
0
1,312
thread by: Karthikyn | last post Aug 10 '12 by: Karthikyn
How to manage events in boa constructor. I, started with simlpe things like creating MENU bars and STATUS bar and it worked well. But i didn't get any material for event management such as when we click any button inside a frame, what event should take place and also struggling with merging two or three frames together. So, if you have an answer...
1
5,506
thread by: copo | last post Aug 13 '12 by: dwblas
Hi, I'm writing an interactive program to fit some data quickly. I would like to keep an eye on the actual value of the parameters of the fitting function which i plot on the same graph f the data while changing by <Key> binding the parameters value.. I was thinking about using multiple textbox but I'm not used yet to their syntax.. Is that an...
3
2,820
thread by: cswarwick | last post Aug 19 '12 by: bvdet
I am attempting to read a CSV file, edit a specific entry, then write back to disk. I am having trouble writing back to disk. I used split to separate fields and change. I can print the changes, but now I cannot write them back to the file. Can someone show me a quick simple example? (for simplicity I am using a small data file with 10...
0
1,731
thread by: pandacriss | last post Aug 26 '12 by: pandacriss
hi everyone im making a transparent window. look pretty cool (python gtk cairo) i added some buttons and they look very ugly so add just images instead buttons, look grate again,even the animated and transparent images look ok, but image don't have "clicked" events then put images into eventbox, work, but a rectangle surround the image,...
3
2,606
thread by: MattBrady | last post Aug 27 '12 by: zmbd
Ok, so I just started learning python and I've made a simple random number generator already but now I want the user to define the range in which the number can be generated. This is what I have so far but I cant seem to figure out what to do for line 7. I'm guessing there's some way to convert rand1 and rand2 into integers. #demonstrates...
0
1,013
thread by: JulianC14 | last post Aug 28 '12 by: JulianC14
Hi, just asking if anyone has a link to the following things: py2exe McMillan installer and any help on pythoncard standaloneBuilder Any help would be very much appreciated, thanks.
1
3,384
thread by: Urvashi Patel | last post Aug 31 '12 by: numberwhun
Hi, I want to compile a program written in python on remote server through Putty. Thanks! Urvashi
2
3,628
thread by: tolokoban | last post Sep 4 '12 by: tolokoban
I read in the following thread that the "cmp" method is not needed for sorting and that "key" is egnough : http://bytes.com/topic/python/answers/844614-python-3-sorting-comparison-function but if you need to compare program version, how do you do this with only "key" method ? versions = ordered = sorted(versions, key=???) Thanks.
1
1,648
thread by: ronparker1 | last post Sep 11 '12 by: anil6035
Hello all, I am trying to create a python api (i think thats what i need) and was just hoping for some pointers. I have an html website and a python script, and I want them to work together. the html site simply asks the user to input two numerical values. the python script takes two numerical values and adds them together. So I am looking...
1
1,671
thread by: Encchhh | last post Sep 12 '12 by: Rabbit
Hi, its a really simple script, but since I'm new to python I have no clue what I am doing wrong. Also if you could, I would appreciate tips on a good IDE for python. #!/usr/local/bin/python x1 = raw_input("What is x1 ") x2 = raw_input("What is x2 ") y1 = raw_input("What is y1 ") y2 = raw_input("What is y2 ")
9
24,603
thread by: Miguel Valenzue | last post Sep 12 '12 by: bvdet
I want to round a list of numbers to basically remove all the decimal places or even just convert them to integers. So this is what I've tried and I just can't get this to work. myList = #declare my list for i in range(len(myList)): myList == round(i,0) #tries to round all numbers. print myList
1
1,543
thread by: cbeeson | last post Sep 14 '12 by: bvdet
I have a list of values in an array named V that i need to plot against a list of "dates". At the moment the dates are in an array (spanning 6 months) in the format date= How do i convert these dates into dates that can be sensibly plotted?
3
1,541
thread by: leyla | last post Sep 18 '12 by: Rabbit
wanting to build a word index table ,for each word in a large data set of files , where it would have the word and document ID's where it was found ,, in order to use it in a search engine model.
1
3,174
thread by: newbieinpython | last post Sep 21 '12 by: Rabbit
Hi, please help to hence me how to break a pargraph to print line by line if it ends with coma, it is a phras, if it ends with period , it is a sentence. Thank you soo much in advance. Andrea For example: text = "It's probably a great morning for a doughnut run in New York City, since you won't have to fight off the NYPD. Officers are...
4
2,493
thread by: newbieinpython | last post Sep 23 '12 by: dwblas
Here are my code below, i have two issues: 1) user input was overwritten. 2)i don't see the line is printed. What did i miss? please help. ------------------------------------------------ #!usr/local/bin/python3 f = open('python1/inputter.txt', 'w') while True: i = input("Write a sentence:") f.write(i) if i == "": break

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.