15,185 Topics

Member Avatar for
Member Avatar for AMW

Hi there I have some problem in creating a code. I have two text files one of them is English to spanish.txt and the other is English to Italiani.txt. I have to create language translator to convert an English word to either an Italian word or a Spanish word. I've …

Member Avatar for woooee
0
105
Member Avatar for acrocephalus

Hello! I would like to embed a terminal into a wxpython application where to print the outputs of the app (like Synaptic when installing Linux apps). I've been googling for a while but I found nothing. How can I do this with wxpython? Cheers! Dani

0
47
Member Avatar for acrocephalus

Hello! I am creating my first GUI with wxpython. It works right now, but I would like to tune it a little bit. My first issue is: how can I show the selected path/file beside browse button? I have uploaded the code, so you can figure out what I mean. …

0
64
Member Avatar for parijat24

[QUOTE]The actual file is as follows [/QUOTE] [CODE]>sp|P81928|140U_DROME 67 198 Tim17 8.9e-19 No_clan >sp|P20905|5HT1R_DROME 179 507 7tm_1 1.1e-97 CL0192 >sp|P28285|5HT2A_DROME 243 805 7tm_1 3.2e-73 CL0192 >sp|P28286|5HT2B_DROME 107 588 7tm_1 7.2e-82 CL0192 >sp|P13368|7LESS_DROME 439 520 fn3 1.4e-10 CL0159 1313 1380 fn3 3.4e-05 CL0159 1800 1890 fn3 3.6e-12 CL0159 2209 2481 Pkinase_Tyr …

Member Avatar for TrustyTony
0
150
Member Avatar for parijat24

hi, I am again involve in solving one trivial problem , that is I have a text file in which large number of entry are there like proteinid[COLOR="red"][/COLOR] sp|P13368|7LESS_DROME fn3 fn3 fn3 Pkinase_Tyr sp|P14599|A4_DROME A4_EXTRA APP_amyloid sp|P09478|ACH1_DROME Neur_chan_LBD Neur_chan_memb sp|P17644|ACH2_DROME Neur_chan_LBD Neur_chan_memb sp|P04755|ACH3_DROME Neur_chan_LBD Neur_chan_memb sp|P25162|ACH4_DROME Neur_chan_LBD Neur_chan_memb sp|P16395|ACM1_DROME 7tm_1 …

Member Avatar for parijat24
0
128
Member Avatar for danholding

hiya guys n girls, i am making a prgram where it sorts a list of files and pulls the 6 most recent files.. that is fine but i need it to pull 6 different dates ie... (this is what it does now test1 - 24/06/10 test2 - 24/06/10 test3 - …

Member Avatar for danholding
0
145
Member Avatar for pythonbegin

Dear all I have two text files. file1 with 42000 rows and 6 columns and file2 with 18 rows and 1 column. I want to match the entries in file2 with file1 either in column0 or in column 3. if the entry exist in any column. Write that line to …

Member Avatar for griswolf
0
135
Member Avatar for vegaseat

This code sample shows how to represent employee data as a list of dictionaries. This list can be sorted and grouped by dictionary keys. In this particular example, I demonstrate how to calculate each department's average age from the data after sorting and grouping. The code is heavily commented to …

Member Avatar for shahjapan
1
6K
Member Avatar for emchom

I have a question that i have to solve and that is to create a program that will calculate the surface are of somebodies body, then to calculate how much sunscreen they will need to cover their entire body using functions. This is what i have so far but i …

Member Avatar for Beat_Slayer
0
203
Member Avatar for emchom

I am needed to create a program that could be used by judges judging a diving competition, where there is 7 judges and the lowest and highest scores are removed and the average is then calculated. this is what i have so far however it does not work. Can anyone …

Member Avatar for Beat_Slayer
0
1K
Member Avatar for Joeflims

Hello. I am a n00b learning to code in Python. Right now, I am working on functions and parameters. To practice, I am making a simple Celsius-to-Farenheit converter. However,whenever I run the program it returns a NameError. I am confused in my n00bishness. Please reply. Here is my code: [CODE]>>> …

Member Avatar for Joeflims
0
128
Member Avatar for student_

here is the code: [code=python] def main(): totalBudget = 4000 printOptions() option = input("What would you like to do? ") while option != 5: if option == 1: newExpence = addExpence(totalBudget) totalBudget = totalBudget - newExpence printOptions() option = input("What would you like to do? ") elif option == 2: …

Member Avatar for student_
0
146
Member Avatar for ultimatebuster

I currently have the budget to buy an intermediate to advanced python. The books price has to be below $50 (Canada), if possible, unless it's a really good book. Preferably there should be GUI programming in the book (not TK or QT, GTK or other toolsets preferred). Network programming (Socket) …

Member Avatar for Beat_Slayer
0
163
Member Avatar for PythonNewbie2

I've been googling for almost two hours now trying to find a solution, but I haven't come across anything that works yet. I followed this guide EXACTLY: [code]http://bytes.com/topic/python/insights/580045-simple-guide-using-py2exe[/code] but no results. When I run my setup.bat, a window comes up and disappears quickly. No new directories are created but I …

Member Avatar for Beat_Slayer
0
139
Member Avatar for trakyng

Hello i want to know how to edit the console font, width and height. If there is any script, could you post it?. And thanks.

Member Avatar for trakyng
0
83
Member Avatar for cleve23

Hi all, I currently working on a python program with the use of wxpython to make out a gui application. However, i wish to compile my application to be like a standalone application where people can just get the .exe file and run it without installing python and wxpython. I …

Member Avatar for snippsat
0
112
Member Avatar for techie1991

I want to sort a list of dictionaries using the inbuilt sort() function for lists. The problem is I am not able to understand, how to give the function a key.. Example: [CODE] a={'name':1,'data':200} b={'name':2,'data':400} c=[a,b] [/CODE] Now, I want to sort the list c with the key being a['name']. …

Member Avatar for TrustyTony
0
227
Member Avatar for rehber344

hello every one for example ıf we say a=None if is it same thıng ? ===> if a orrrr if a is None and the reaction of the code is it same thansk ın advance

Member Avatar for redyugi
0
68
Member Avatar for danholding

hey guy n girls i hope one of you can help me with this. plan of action is to : create a python script to... sort a list of files from a directory into sorted list with most recent modified date at the top. then I want to get rid …

Member Avatar for danholding
0
202
Member Avatar for ak_barik

When runnning scapy from command prompr (windows XP), the output cannot be stored. When the following command is executed in command prompt: scapy >C:\dir.txt The following error shows up: C:\automation\atg\GeneralFiles?_AC\ScapyExe?>scapy >C:\dir.txt INFO: Can't import python gnuplot wrapper . Won't be able to plot. INFO: Can't import PyX. Won't be able …

Member Avatar for Beat_Slayer
0
446
Member Avatar for ak_barik

I am trying to convert a testtoexe.py (which imports scapy and paramiko) file to exe. I am running Python2.6 (in PythonWin?) on Windows XP. I am using pyinstaller1.4 I am able to convert the .py to .exe, but..... I get the following error when I run the exe: C:\automation\createexe\dist>testtoexe.exe ['C:/DOCUME~1/arinc/LOCALS~1/Temp/_MEI4842', …

0
75
Member Avatar for patkeraudren

In my projet, I can't find how to determine which image and pixel coordonate when I clicking image in 2 different ScrollArea. The result was showing in statusBar() area. (See screenshot) I put a code in txt file with 2 jpg use with it. Thanks in advance. [CODE] from PyQt4.QtCore …

0
95
Member Avatar for -ordi-

[CODE]print divmod(1024, 26) # 39[/CODE] [CODE]print chr(39 + ord('A') - 1) # g[/CODE] but: AA, AB etc, how to convert this to number?

Member Avatar for TrustyTony
0
125
Member Avatar for monstercameron

i had an idea to make my own file formats but... have nearly zero coding experience. the image is just text which a program would parse and receive relevant pixel data from it(like xml based stuff). i wrote up some plan for the file: [CODE] `meta data [(title)test image] [(date)1,1,2010] …

0
318
Member Avatar for acrocephalus

Hello! I have created a dialog to select a file with wxpython and FileBrowseButton with this code. [CODE]fbb = wxfbb.FileBrowseButton(panel,labelText="Select an image file:", fileMask=mask, fileMode=wx.OPEN, size=(800,30)) markFile = fbb.GetValue()[/CODE] I need to use the selected file for further actions. How can I do it? I have tried [CODE]return markFile[/CODE] but …

Member Avatar for acrocephalus
0
590
Member Avatar for flebber

I am looking at a project that will import and modify an XML file and then export it to a table. Currently a flat file table system should be fine. I want to export the modified data to the table and then perform a handful of maths(largely simple statistical functions) …

Member Avatar for Beat_Slayer
0
92
Member Avatar for Krstevski

Hello friends, I have a small problem, I don't know how to configure the server to run python scripts automatically every 1 hour. I use Ubuntu LTS OS, Apache2 server and now I want every 1 hour to run read_rss.py Python script automatically. Do it possible with apache (and if …

Member Avatar for ryan461
0
106
Member Avatar for Tommymac501

Pyscripter seems to be hard coded to use versions 2.3 to 2.6, and skips over 2.7, moving on to 3.0 and 3.1 - niether which seem to play nice with Unix data. Considering 2.7 is Python.org's current stable release, does anyone know how to get Pyscripter to use it? I've …

Member Avatar for pyscripter
0
415
Member Avatar for KirkK

In this scenario, I have two issues; 1) Why is selection 4 not taking me to exit the program variable? 2) Why is selection 2 telling me I went backward? Thank you in advance! #start and display menu def main(): #fuel fuelUsed = 0 fuel = int(200) feet = int(0) …

Member Avatar for TrustyTony
0
89
Member Avatar for JDuch

I would like to save the output of the python help() function to a file eg the output of >>> help("modules") [CODE] amongst others i used modfile = open("env:.P_ModList","w") mods = help("modules") print >>modfile , mods modfile.close() [/CODE] to no avail. Is there a solution?

Member Avatar for vegaseat
0
1K

The End.