No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
9 Posted Topics
Hi, The code below will check if a particular exe is running in windows, return the Process ID and force kill the process. If anybody has an easier way to do it please feel free to comment :)
Hi, I need to login to a site, make some changes and then there is an apply button which i need to click to save the changes. The HTML code is as below for the buttons [ICODE]<input type="button" onclick="clickApply()" alt="Apply" value="Apply " class="button" name="applybutton" id="postApply"/>[/ICODE] I am able to login …
[QUOTE=jmark13;1007612] I'd also like to be able to assign a series of numbers to the x coordinates, like a Fibonacci sequence... i.e. when x is 0=1, x' is 1=1, x'' is 2=2 x''' is 3=3, x'''' is 4=5, x''''' is 5=8, x'''''' is 6=13, etc. or prime number sequence x=2, …
[QUOTE=pelupelu;1008663]I am having a hard time identifying numbers in a text. Is there a way to recognize numbers?[/QUOTE] you can use isdigit [CODE] st = "abcd123" for i in st : if st.isdigit() == True : print i [/CODE] use dir(st) to find out all functions associated with a string
Try this [CODE] st='abcde' count = 0 for i in st : i = i.capitalize() count = count + ord(i) - 64 print count [/CODE]
I think 2 more lines need to be added for isPrime function [CODE] def isPrime(n): if n == 2: return True if n%2 == 0 : return False for divisor in range(3, int(math.sqrt(n)), 2): if n % divisor == 0: return False ## did not return 'False' during the for() …
Try this : (modified vegaseat's code) It wil print the 1000th prime number [CODE] prime_no_cnt = 2 # store first 3 prime numbers and start with 5 (because of n/2) plist = [2,3] n = 5 while 1 : flag = 1 for x in range(2, n/2): if n % …
Hi All, I need to open a exe from python. For ex i used [CODE]import os os.system("C:\Winamp\Winamp.exe") [/CODE] but I need to open an exe from the "Program Files" directory. I get an error because of the space between "Program" and "Files". [CODE]import os os.system("C:\Program Files\Winamp\Winamp.exe") >>'C:\Program' is not recognized …
Can you please elaborate on how you used mechanize. I have been stuck with this problem from last 3 days :sad: Thanks
The End.
pysup