15,175 Topics

Member Avatar for
Member Avatar for Behseini

Hi, Gribouillis, helped me to understand how to invoke a function by btn click event handler, at my last post.Now I am trying to understand how I can handle an selected item event from a list box? lets say I have a list box like below and I want to …

Member Avatar for Lardmeister
0
9K
Member Avatar for nethero

Hi there, I'm kind of new to python and I'm trying to extract a protein sequence from this webpage... [url]http://www.ncbi.nlm.nih.gov/protein/BAH23558.1[/url] When I use urllib.urlopen the html it gets does not contain the sequence data. When I open this page in firefox and use firebug to look at the page I …

Member Avatar for nethero
0
243
Member Avatar for weblover

Hello all, i was working on an R script that will read a huge text file and make some calculation inside it, but i figured out that it will need long time to do the job , so i'm trying to convert it into python. is there any way to …

Member Avatar for TrustyTony
0
178
Member Avatar for [V]

I have a string that looks like: IiiiiiiiiiiHHHHHHHHHHHHHHHHHHHHHHHHHooooooooooooooooHHHHHHHHHHHHHHHHHHHHiiiiiiiiiiiiiiiiiiHHHHHHHHHHHHHHHHHHHHHHHHHooooooooooooooooHHHHHHHHHHHHHHHHHHHHHHHHHiiiiiiiiiiiiHHHHHHHHHHHHHHHHHHHHoooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooHHHHHHHHHHHHHHHHHHHHHHHHHiiiiiiiiiiiiiiiiiiHHHHHHHHHHHHHHHHHHHHooooooooooooooooooooooHHHHHHHHHHHHHHHHHHHHHHHHHiiiiiiiiiiiiHHHHHHHHHHHHHHHHHHHHHHHHHooooooooooooooooooooooHHHHHHHHHHHHHHHHHHHHi I want to to capture all the segments that have H's in them and return their respective start & stop string positions. [CODE] tms = re.compile("H+") print tms.findall(string) [/CODE] This will find all the Hs but I cant get the string positions …

Member Avatar for Lardmeister
0
207
Member Avatar for Simplicity.

I've tried to make the code below to solve one of the Euler equation for the Gas Dynamics. I understand my code is not perfect, that is why I'm getting an error which I don't understand. The error message is: " File "eulersys.py", line 50, in <module> u_data = Evolve_in_One_Timestep(u_data) …

Member Avatar for Simplicity.
0
443
Member Avatar for gork000

So, I found a snipped of code that did what I was looking for but I tried adding upon it to fit my need a little more. What I am trying to do is input an integer and return an 8 bit binary string to a list. My first problem …

Member Avatar for gork000
0
206
Member Avatar for adam291086

I am trying to delete a cookie by reseting it but it wont delete. What am i doing wrong [CODE]#!/usr/bin/python import cgi import Cookie import os def cookie_expiry_date(numdays): from datetime import date, timedelta new = date.today() + timedelta(days = numdays) return new.strftime("%a, %d-%b-%Y 23:59:59 GMT") print 'Set-Cookie: UserID=0; expires= '+cookie_expiry_date(-100); …

Member Avatar for ret801
0
234
Member Avatar for vishal.patil

I am looking for step by step details of how to deploy django websites in apache2 server with one example. I am using ubuntu operating system Please give some link or give the details.

Member Avatar for Pupo
0
116
Member Avatar for Krstevski

Hello friends, I want to write simple script to download youtube videos, but I have problem... I use One-liner for this, the file is downloaded but it's empty (0 bytes). Can someone help me about my problem ? Here is my code: [CODE=python] # Author: Abhinay Omkar # Title: One-liner …

Member Avatar for Pupo
0
182
Member Avatar for R3ap3R

I believe the Python thread is the most appropriate place to post a Django question :P Hi there guys and girls! I am currently busy (and learning) Django. It really is a solid platform to work on compared to PHP. Ok let me get to the point :P I am …

Member Avatar for Pupo
0
132
Member Avatar for spixy

I don't know if you could fix this code.. but there is something wrong with it or with me.. i don't know which.. here is the code for the .py script [CODE]import string import sys # input if len(sys.argv) < 2: print "Not enough arguments, quitting." quit() if len(sys.argv) > …

Member Avatar for TrustyTony
0
127
Member Avatar for Celtrix

I literally hate to ask this question but I am having trouble with Qt 4 basically all I am trying to do is clear the textEdit area with clear() but I am not sure of what to do. In C++ I would just [CODE]textEdit->clear();[/CODE] and it would do so. I …

Member Avatar for vegaseat
0
150
Member Avatar for [V]

Can someone please show me the best way to achieve this with the least amount of lines? Im a recovering PHP coder, I have one solution. I was wondering if there was a quicker more pythony way to do this: I have in "results" [ICODE][('Basp1', 'Aen2'), ('Basp1', 'Ahy18'), ('Basp1', 'Ahy26'), …

Member Avatar for vegaseat
0
152
Member Avatar for rssk

hi all i hav a list like list = ['0', '344', '1', '345', '2', '346', '3', '347', '4', '348', '5', '349', '6', '350', '7', '351', '8', '352', '9', '353', '10', '354', '11', '355', '12', '356', '13', '357', '14', '358', '15', '359', '16', '360', '17', '361', '18', '512', '19', '513', '20', …

Member Avatar for woooee
0
99
Member Avatar for radical43144

This is my class project to be made in pythonCard : A local community centre desires to have a user friendly application to keep track of their community members. The application must allow a user to display information about community members, including the list of activities that individual members are …

Member Avatar for woooee
0
150
Member Avatar for Drau

hello, small question if i may :-) [CODE] try: x=int(input()) except ValueError as var: print(str(var.args[0])) [/CODE] if i input a string like - abcd this code prints me the full error message invalid literal for int() with base 10: 'abcd' while i need only the input - abcd to be …

Member Avatar for Drau
0
166
Member Avatar for potchi
Member Avatar for TJones

Hey everybody. All my Google searches for help led me here so I thought I'd post my actual problem directly. I'm in a 101 programming course and this is only our second Python assignment. What I need to do is use one-dimensional parallel arrays to allow input of four different …

Member Avatar for TJones
0
484
Member Avatar for pareshverma91

The problem is that I want login to a remote pc using ssh through a python script. I don't want to use any ssh-keys (rsa keys,dsa keys etc.) nor do I want to use some extra module not incorporated in python standard libraries (telnet etc I guessed it is used …

Member Avatar for itergosum
0
15K
Member Avatar for jkrueger

Hi, I got the cxfreeze working on the Mac OS X 10.6.7 and the distilled Python script runs fine on that Mac Book. Now I'm getting reports from Mac user clients that it doesn't work for them. It is a simple script that only calls from the Mac it's terminal. …

Member Avatar for jkrueger
0
377
Member Avatar for potchi

Hi, Is there a way to get the full path of my war file in jython?? I have war file (myApp.war) that is stored in D:\myConstantDirectory\myApp.war I want to create a jython script that can retrieve the full path of my war file by just specifying search myApp.war and it …

Member Avatar for woooee
0
109
Member Avatar for brynFlew

I have made a very simple dice game, How can i output the results of the dice using this format. Thanks for your time. [CODE] ========== | 0 | | | | 0 | ========== ========== | 0 0 | | 0 0 | | 0 0 | ========== [/CODE] …

Member Avatar for Schol-R-LEA
0
319
Member Avatar for BLUEC0RE

Hey guys, I hate asking this but unfortunetly, Google does not know how to interpret "|" and probably assumes its an OR command or something :P . The line goes as follows (source found [URL="http://pysnippet.blogspot.com/2009/11/fuse-filesystem-in-userspace-part-1.html"]http://pysnippet.blogspot.com/2009/11/fuse-filesystem-in-userspace-part-1.html[/URL] here): [CODE]st.st_mode = stat.S_IFDIR | 0755[/CODE] I know it's doing something about the mode being …

Member Avatar for BLUEC0RE
0
151
Member Avatar for rayden150

I get this python error: unindent does not match any outer indentation level, and a red bar appears where "RIGHT HERE RED" is.., keep in mind that this is just a fraction of the entire program but i dont know where the spacing error occurs... pleeeaaase i beg you and …

Member Avatar for vegaseat
0
163
Member Avatar for novice20

Hi all, Here is a part of my code: [CODE]#-- if the ports are mapped properly if(map_dict1[int(MIO_outports1[i])] == int(Exp_map_inport[i]) ): flag = 1 elif(map_dict2[int(MIO_outports1[i])] == int(Exp_map_inport[i])): flag = 1 else: flag = 0 [/CODE] But I am not able to navigate to the 'elif' part. I am getting : [CODE] …

Member Avatar for TrustyTony
0
275
Member Avatar for potchi

Hi! I have a batch file (potchi.bat) that contains the lines ... set maxHeap = 2048 set initialHeap = 512 set mydir=%cd% ... and I want to pass these values to a jython script (myScript.py) such that fullpath = '%cd%/myApp.war' AdminApp.installInteractive(fullpath, -contextroot myApp) AdminTask.setJVMMaxHeapSize('[-serverName myServer -nodeName myNode -maximumHeapSize %maxHeap%]') AdminTask.setJVMInitialHeapSize('[-serverName …

Member Avatar for potchi
0
1K
Member Avatar for cool0329

hi guy just started python, i have a text here and want wo find the number of each letters, and sort the number from the most frequent to the least frequent. hope you guys can hepe me here is the text, just some random letters, acbbmnhctrgnmmxfnfbmqrhnchfwcqwtacvtfhmecttvfcnvphchmpgdmebjdcqwhdfnfrcawhdfrkanahtcjaqxahpkmqdardfcnhcqwjmprdcttvfpkdftwaqbmnfhdcqhdarcrhdfzmnwrzfnfrkmsfqhdfjkcrrfwhdnmpxdhdfzcttcqwrhmmwpkmqcqmkfqgmpqhnjnmcwzahdeaftwrmqfahdfndcqwhdfgahjdcwfqhanftjlcqardfwqmhclfrhaxfmeahzcrhmvfrffqhdfwcnsqfrrcqwhdfbarhdcwlcqardfwzahdahemnahzcrcgtfcngmtwzaqhfnwcjzahdrqmzpkmqhdfxnmpqwxmmwdfclfqrcawrgnmmxfgtcrkaqxdar

Member Avatar for raptr_dflo
0
428
Member Avatar for TrustyTony
Member Avatar for raptr_dflo
0
1K
Member Avatar for kiracho

write a python program , which takes one argument ,which is a word( as a string), and returns "true" if the word contains alternating vowels and consonants(i.e a consonant , followed by a vowel , followed by a consonant ....). Then write a short piece of code to read the …

Member Avatar for vegaseat
0
312
Member Avatar for WolfShield

I have a lot more code than I'm going to post here, but I am posting the relevant parts. What I have is a Calculator program. Here's the code: [CODE=Python] num1 = None num2 = None oper = None def calculate(num1, num2, oper): print("calculate() called") if(oper=="+"): answ = Decimal(num1) + …

Member Avatar for woooee
0
256

The End.