15,190 Topics

Member Avatar for
Member Avatar for TechnoDarrel

Hi! i'm doing a final project for a university introduction course in web programmation. I'v Coded this: [CODE]class MainHandler(BaseHandler): def get(self): #product_comments = Comments().get_all() user = users.get_current_user() if user: member = Members().get_by_id(user.user_id()) baskets=Baskets().get_by_member(member) template_args = {'baskets': baskets} products = Products().get_all() product_comments = [] for product in products: comments = Comments().get_by_product(product) …

Member Avatar for woooee
0
225
Member Avatar for bertm81

Hey All, I have written a script that uses elementTree to work on python 2.4. Took quite a while and worked a threat but now I need to get it working on 2.3.4. I can't upgrade the version of python. Is there an equivelent version of the element tree for …

Member Avatar for bertm81
0
224
Member Avatar for e-papa

This is a simple word jumble game, I actually adapted it from one I used from practice. It's written in Python 3.1 using the pyscripter. NO modules needed.

Member Avatar for e-papa
0
666
Member Avatar for e-papa

I was just able to get PyQt4 to work on my system, and I'm now have that of python2.6, and that of python 3.2, but I have been trying to open Qt designer but all it does is just open a process in the background eating up my PCs memory, …

Member Avatar for e-papa
0
279
Member Avatar for rssk

hi all ..... [CODE]for(i=0, i<680,i++): i =m [/CODE] wen i run a program it is showing error in for loop like wen i run a program it is showing error in for loop .....

Member Avatar for griswolf
0
97
Member Avatar for shawntheking

Using both the 2011 and 2010 Fuel Efficiency .csv files, recreate the script from class allowing the user to specify the lowest gas mileage they are willing to get, list the cars available from 2011 meeting the mileage criteria, list the cars available from 2010 that meet the mileage criteria, …

Member Avatar for TrustyTony
-1
81
Member Avatar for TrustyTony

I found [URL="http://www.daniweb.com/software-development/cpp/threads/358674"]this assignment[/URL] on C++ forum as was browsing to see little where I am in my mostly C little C++ thrown in understanding of C++ and if I should try to increase my knowledge in that language. I could not believe my eyes! The OP is completely lost …

Member Avatar for TrustyTony
0
630
Member Avatar for TrustyTony

There is many more stupid things to do than to read words of one of the best if not the best: [URL="http://norvig.com/lispy2.html"](An ((Even Better) Lisp) Interpreter (in Python))[/URL]

Member Avatar for TrustyTony
1
1K
Member Avatar for e-papa

Hi guys, I tried to run the configure.py in the pyQt folder using command prompt, but it kept coming back with an error that's looks something like this trace back import sipconfigure no module named sipconfigure what do I do now guys, how do I tackle this.

Member Avatar for e-papa
0
127
Member Avatar for Deepak.G

Hi I'm having a test suite in python and i would like to email the result through my company server. I used a similar code but the code seems to be hung while waiting for a response from server during socket.connect() call. I traced the code and found that it …

Member Avatar for rogerkrush
0
1K
Member Avatar for diniboi

Whats up guys? This program has given me nightmares lol. When input is a positive integer, the program should reduce it to prime factors. The integer is less than 900. The program should Output the prime factors as a series that when multiplied together, will return the original integer. If …

Member Avatar for TrustyTony
0
223
Member Avatar for gsingh2011

Hi, how would I login to an HTTPS site? I used the following code to connect to the site, but how do I login? [CODE]import httplib HOSTNAME = 'login.yahoo.com' conn = httplib.HTTPSConnection(HOSTNAME) conn.putrequest('GET', '') conn.endheaders() response = conn.getresponse() print response.read() [/CODE]

Member Avatar for gsingh2011
0
121
Member Avatar for banannamoofin

One part of my program requires that the user enters a date and this date is then checked against each product in the dictionary to see if the date the product arrived plus its shelf life causes the product to expire before or after the date entered by the user. …

Member Avatar for woooee
0
2K
Member Avatar for parijat24

hi, The problem is that i have one list like [l1 l2 l3 l4 l5 l6 l7 l8 ] no i want to compare l1 with l2 and get some score then l1 with l3.... and then l1 with l3 , l4 , l5.......... so on when i am compareing …

Member Avatar for Gribouillis
0
322
Member Avatar for TrustyTony

Here is experiment of how VM and Swing UI manage the sort test posted previously, instead of CPython and Tkinter. The timing is not so sweet, but at least no Java required! [CODE]K:\jython2.5.2>java -jar jython.jar swing_test.py 256000 words generated in 10.93 s Sorted in 1.68 s List prepared in 22.71 …

Member Avatar for TrustyTony
0
503
Member Avatar for tony75

Hi I have a folder and its contain 5 text files. My question is How can I navigate to folder and read two first line of the txt files in folder with python scripts? I will be very greatful for your help. Reagards Tony

Member Avatar for TrustyTony
0
268
Member Avatar for tcl76

hi, i'm using Element Tree API to generate XML. But I'm getting error when opening the xml output. I tried to generate to a file and it worked. No error when running the Python code. Pls advise me why is not workin when i generate to an xml. fyi i'm …

Member Avatar for tcl76
0
228
Member Avatar for dlazzeri

I am trying to make a script in Python to recursively list all the files in a folder recursively. This code only shows some of the files in the directory I run it in, and I can't figure out why. Any help you can give me is much appreciated. [CODE] …

Member Avatar for dlazzeri
0
161
Member Avatar for levic22

Hi im trying to write some GUI using wx.python and im nto sure how to do what i want. i have readibotton to choose an operation to execute. i want to have a list of machines which i will need to choose so the action will e done on them. …

Member Avatar for woooee
0
85
Member Avatar for TrustyTony

Here is code to execute these printing commands from file: [CODE]talk("How Are You") bark("I am fine") bark("...and how are you") snarl("...sorry I asked") [/CODE] from file INPUT, do printing of results to screen without tags and to file with tags, and open the html output with webbrowser.

0
309
Member Avatar for stan_l

I have a generic script in another language which I use to query an ASA5500 firewall. Because of thousands of possibilities in even the 'show' commands, I write small .cmd files which are macro-executed from the main script. A .cmd file looks something like outfile("config.dat") showline("terminal pager 50000",0) makebuff(2000000) showline("show …

Member Avatar for TrustyTony
0
298
Member Avatar for magnetpest2k5

Hello all, I use eclipse for python and c++. In c++ when the code gets auto completed by the brackets i can skip over them by pressing tab key. But in python it does not skip over the brackets instead gives a tab space. Every time I have to press …

0
72
Member Avatar for ThePythonNoob

I made myself a project which is to make a virtual inventory but I have been having difficulty with pickling the variable: inventory. Could someone please insert the strip of code in order to save the variable in a seperate file and make it able to import it. [CODE]import pickle …

Member Avatar for woooee
0
75
Member Avatar for TrustyTony

I got a look one huge Java code suggestion from one [URL="http://www.daniweb.com/software-development/python/threads/86608/1525822#post1525822"]newbie high jacker of old thread[/URL], so I had to write this code. [url]http://oeis.org/A001235[/url] (for values with [B]minimum [/B]2 ways, first difference is 87539319 with three ways. You can of course change the if part of the print to …

Member Avatar for TrustyTony
0
4K
Member Avatar for imperialguy

Before going into the problem, here is some hardware/software information: Device accessed: Ohaus Scout Pro Digital Weight Machine ([url="http://www.northshorecare.com/ohaus-scout-pro.html"]product link[/url]) Interface used: USB ([url="http://www.carolina.com/product/702448.do?s_cid=ppc_gl_products"]product link[/url]) Serial Port: COM3 OS: WinXP Python Version: Activestate Python 2.7 pyserial version: 2.5 Python recognized this serial port and had no problems opening it. I …

0
151
Member Avatar for TrustyTony

I did this code to compare to Delphi code in Delphi forum [URL="http://www.daniweb.com/software-development/pascal-and-delphi/threads/357771"]TListBox and sorting[/URL] which ran in my computer compiled in free Lazarus environment at time 7,235 s for generate and insert to listbox, 13,265 s sorting the listbox.

0
583
Member Avatar for diniboi

Whats up Guys? How do you make this program work for all string inputs? It reads only 5 and 6 letter words and outputs it in an X formation. 1) For example: Input Hello Output: H o e l l e l H o 2) For example: Input: Doctor Output: …

Member Avatar for diniboi
0
194
Member Avatar for diniboi

Whats up guys? I need help my code is not working too great could someone please help me? My Input should be : 03/12 hello there My Output should be : March the 12th: hello there It needs to work for January, February, March, April, May and June. And all …

Member Avatar for diniboi
0
195
Member Avatar for parijat24

[CODE]hi , once gain i need a suggestion from the expert, the prob is that i have 400 folder(folderxyz) in a given directory, and each folder contains some file . now i want to open directory , open each folder one by one and read the files present in it …

Member Avatar for TrustyTony
0
200
Member Avatar for magnetpest2k5

Hello, I have been using the python dictionary to create a multidimensional array. I recently stumbled upon the numpy module's array which creates a multidimensional list. Can we store string variables in this array module? or is there other ways in python to create a multidimensional list? Thanks

Member Avatar for vegaseat
0
2K

The End.