15,175 Topics
| |
| i have python 2.5 and 3 and i want to use 2to3 to convert all of my programs to python3 but i dont know how to use it, if it helps in the Lib folder of python3 it is called lib2to3. any help or examples welcome. |
Hi, I'm a novice to apache server and its configuration for mod_python. As available on as availabe on [URL="http://www.thesitewizard.com/archive/addcgitoapache.shtml"]http://www.thesitewizard.com/archive/addcgitoapache.shtml[/URL]. (Please go through it. It is very simple but important to solve my query.) Platform: Windows XP Python 25 is installed as c:\python25\python.exe Apache server 2.2 is installed in program files. … | |
I have an assignment to: "Wrap this code in a function called compare(x, y). Call compare three times: one each where the first argument is less than, greater than, and equal to the second argument." So I came up with this: [code=syntax] def compare(x, y): if x < y: print … | |
I am trying to learn Python. I have browsed through a few tutorials and tried to follow them until they get too complex and I try to find another one to give a different perspective. I am currently trying (and very much enjoying) the very basic "How to Think Like … | |
hi every one i created a slidebar in tkinter. as i move it forward the value of a variable increases. but as i move it backwards, the value also increases. it should decrease. do u guys have a simple slidebar implemeted and which affect the value of an attribute? thanks | |
I am in an introductory cs course, and we have a project due in a couple of weeks. I have asked my instructor if I can ask for help here and he did allow me to post the code and ask. The project is to write a simple game where … | |
Hi, there Let me put my resource line and target lines here firstly resource line: 56 J=7224,164 SEC=CON450X450 ANG=45 target lines: *beam section,section=R, elset=CON450X45056,material=con2 0.45,0.45 0.707107,0.707107,0 I have a dictionary below (created using woooee's code) Frame_Section contains {'CON450X450': [['MAT', 'CONC2'], ['SH', 'R'], ['T', '.45,.45']], 'B400': [['MAT', 'CONC2'], ['SH', 'R'], ['T', … | |
Hi again, I'm trying to use a python wrapper for the last.fm api. It's pretty old but seems to be working ok (for now). See [url]http://code.google.com/p/pyscrobble/[/url] Anyway, I'm having trouble extracting some information from the output. [CODE] import scrobble user = scrobble.User('mattfeliks') # invoke user class recent = user.recent_tracks # … | |
Hi, I am looking for some good examples on calling c and C++ apis inside python code. Can anybody share good examples or links. Thanks, Anil kumar | |
i want to start programming a new program (electronic health care center) in python and before start learning python i wanna make sure that python does have all the features i need to accomblish this project so i wanna ask you does python able to support these features : 1- … | |
Hey there, I am going to start a larger project. For this I just set up my programming invironment as follows: python2.5 numpy scipy matlibplot PyOpenGL ctypes I then tried to test the installation with a simple example. First I found the warning: [COLOR="Red"]No handlers could be found for logger … | |
hi I want to write this code in do while or if else, or any other way except for loop. here is the code [CODE]for i in range(65,90): for j in range(65,90): for k in range(65,90): token=chr(i)+chr(j)+chr(k) block = ((i<<16)+(j<<8)+(k)) cblock = pow(block,e,n) table[token]=cblock[/CODE] can anyone please help me to … | |
alright i know you're tired of explaining simple things to me, but i've looked around and really can't figure how to do this... i'm trying to write a simple python script like when you type in a number for n, and press enter, it finds n+2? i thought it will … | |
I have been working on something, and i'm stuck again... I have to print out an infile list in columns, and then print it out again in alphabetical order(sort). I can't figure how to print in columns, nor can i soft it. Any help? | |
i am quite new to python ... currently i am a student learning for mu mcitp exams.. i made a small script ,, for active directory using python all the script does is basicly explor the AD for a number of tasks .. * 1 .Find a user (quick method) … | |
I have a project that I am working on that is basically a game where players travel down a hall and race to the end. Obviously there are more rules but they are irrelevant for my problem. The problem I am having is that I cant get my board to … | |
Hi Everyone, I have got a program which takes a html file as an argument, parses it, and outputs the data to a CSV file. It does this no problem. BUT, i need it to take more than one html file, parse them and put all the data collected into … | |
| i just thought i would ask as a reference for the future but if i was to have a loop like this: [code] import time mytime = time.asctime()[11:19] while mytime <= "13:14:15": mytime = time.asctime()[11:19] raw_input() [/code] how could i change it so that mytime would constantly update as at … |
Hi there, I'm quite new to python and have a question regarding list matching. What would be the most efficient method of searching for matching items in a list? Ideally, the code would look like: [CODE] list1 = ['spam', 'eggs', 'bacon'] list2 = ['spam', 'ham', 'king richard'] matchitems(list1, list2) ... … | |
Ok I have a while loop set but can you guys give me an example of a while loop that takes information, reads the more specific detail and then another specific detail? In my code I cant figure out how to make the loop search another line or sentence. All … | |
Is there a way to find something from html code like <img and then find the src and alt of an image in the <img line? I can get the <img line out but i dont understand how to use find to find the start index and end index. For … | |
Hi, Guys, I use RG to handle some txt files in Python to rearrange format of these text files. These text files look like below MATERIAL NAME=STEEL IDES=S W=76819.55 T=0 E=1.99948E+11 U=.3 A=.0000117 FY=3.447379E+08 NAME=CONC2 IDES=C W=23560 T=0 E=2.48211E+10 U=.2 A=.0000099 NAME=OTHER IDES=N W=76819.55 T=0 E=1.99948E+11 U=.3 A=.0000117 NAME=CON3 IDES=C … | |
| hi again i have this code: [code=python] #this program is a simple test OS for a till #it will loop constantly until a certain time (specified as CLOSING_TIME) COMPLETED!!! #it will check stock from a dictionary in a file (specified as STOCK) #i plan to add a profit calculator import … |
I've learned quite a bit since my last post, i.e. it kept disappearing on me just because of syntax, but now I'm interested in something: Is it possible to make it so that when you run the .py as is , that it opens another program or directory? I.e. when … | |
Hello there, I'm writing a simple code to make a n*4 matrix .. first i filled it with zeroes [ICODE]x0 = input("Please enter x0 = ") h = input("Please define step size h = ") s = input("Please specifiy the point at which you need the solution y(x) >> ") … | |
Hey guys! I have a serious problem. I missed class for computer science because I had two grandparents die in 2 weeks. My teacher has a no exception policy for turning in homework late. Tonight has been my only free night to do homework but I am stuck and not … | |
Hi I am using Option parser for creating a command line application . I am able to parse command line options. I have a command for listing the contents of a folder. which goes like this python main.py --listContents When I give this I get an error error: --listContents option … | |
Hey guys! I have a serious problem. I missed class for computer science because I had two grandparents die in 2 weeks. My teacher has a no exception policy for turning in homework late. Tonight has been my only free night to do homework but I am stuck and not … | |
Hey guys, i just re-installed python and began writing a script, when i go to run it a syntax error appears. The syntax error allways points to the quotes i use, meaning something like [CODE]print "Hello"[/CODE] a syntax error will appear and point at the end quote ' " ' … | |
'bitstream' is an array where each element contains 8 bits, i.e. ['01100000', '11110101' .... ] etc. etc. I want to print out this array to a file so it'll be recognised and can be opened as a jpeg. I have tried the following: [code]output = open('outputfile.jpg', 'wb') for i in … |
The End.