162 Posted Topics

Member Avatar for JordanWalcaraz
Member Avatar for hondros
0
142
Member Avatar for Noliving

[B]P[/B]lease [B]E[/B]xcuse [B]M[/B]y [B]D[/B]runk [B]A[/B]unt [B]S[/B]ally As a side not, ask someone what 2+2*2 equals. Most people will say 8 instead of 6 lol. I've even got my teachers with it lol.

Member Avatar for Tech B
1
211
Member Avatar for kjock002

[code] >>data = "4 stringfour" >>data = data.split() >>print data ["4","stringfour"] >> >>int(data[0]) + 10 #use float() for decimals. 14 [/code]

Member Avatar for TrustyTony
-3
232
Member Avatar for rudasi

Bluetooth or Wifi? And did you solve it? I'm having trouble with a BT shield.

Member Avatar for Tech B
0
44
Member Avatar for goodwin912

You could also do it with just the os module. I use a variation of the fallowing code to loop through a folder of pictures. But I set them as my background instead of formatting them. Play around with it, but it should work. [code] import ctypes, time, os p …

Member Avatar for Tech B
0
233
Member Avatar for PDB1982

I wrote a python script that captures the screen. It saves as .jpg, .bmp, .png, and .gif. I could add image resizing if needed. Let me know if you want a copy.

Member Avatar for Biker920
0
215
Member Avatar for Tech B

When I watch full length movies online, sometimes my mouse is hidden on the browser. Just inside the browser though. I have to repeatedly hit the ctrl button to see where its at. This only happens when I watch divx streamed video for long periods of time. After the mouse …

0
161
Member Avatar for kishoreinme

You should really use code tags. It waits forever because it does not get a reply. [code] import serial print 'hi' ser = serial.Serial('COM2', baudrate=9600, timeout=5)#timeout in case no reply #you don't need to open the port either ser.write('1\r') #sometimes \r is needed to indicate data is done transferring ser.readline() …

Member Avatar for Tech B
0
119
Member Avatar for aot

[code] from ctypes import * user = windll.user32 x = 640 y= 480 user.SetCursorPos(x,y) [/code]

Member Avatar for Gribouillis
0
4K
Member Avatar for «¤¦PR☼GRAM¦¤»

If its windows, try [URL="http://www.rutherfurd.net/python/sendkeys/"]SendKeys[/URL] module.

Member Avatar for Tech B
0
300
Member Avatar for o0b3600

Take a look at the os module. Something like: [code] import os os.system("NameOfExe.exe") [/code] This will start the .exe

Member Avatar for Gribouillis
0
275
Member Avatar for Tech B

My friend gave me 10,000+ ROM's for Sega, SNES, NES, and GBA. They where all individually zipped. I go fed up trying to unzip them one by one, and decided to write a script to do it for me. It unzipped about 5,000 in under a minute. Python's zipfile module …

Member Avatar for Tech B
0
623
Member Avatar for Mensa180
Member Avatar for Mensa180
0
169
Member Avatar for Oron123

you can also use ctypes. [code] from ctypes import * myDLL = cdll.LoadLibrary('nameOfDll.dll') [/code]

Member Avatar for jcao219
0
140
Member Avatar for archb

you could also use something like exec() it would be very inpractical though. os.sys() or os.popen() would be your best option. to use exec() though could look something like: [code] f = open('name.py','r') fr = f.readlines() for i in fr: exec(i) [/code] but that would be too much and too …

Member Avatar for Tech B
0
207
Member Avatar for revellution

It looks good. Like SoulMazer said, you don't need the "\n". And I don't use 3.0, I use 2.6 and in your addNames() function I noticed you using input(). In 2.6 input() is for numbers and raw_input() is for strings, I don't know about 3.0 but that would have given …

Member Avatar for revellution
0
125
Member Avatar for Tech B

I posted a snippet about using a microcontroller as a mouse, and it works great, but it moves the mouse as a stepper motion. How would I go about making it velocity driven? Like when I tilt the accelerometer further, the faster the mouse moves. I've seen it on youtube, …

Member Avatar for Tech B
0
126
Member Avatar for bumsfeld

I'm on a Windows 7/64bit Not much of anything is available on 64 bit systems lol.

Member Avatar for Alq Veers
1
487
Member Avatar for jgehlot09

[URL="http://www.jroller.com/RickHigh/entry/notes_on_creating_a_socket"]This[/URL] might help. You might also put a try statement where the problem happens, and when it hits the except, make it send the data again until it gets through? And maybe post the code that gives the error.

Member Avatar for Tech B
0
109
Member Avatar for Clueless86

[QUOTE=Clueless86;939226]Well I chose VIDLE...And it still does not work right, or maybe I am just stupid and not looking at things properly..I am just trying some pygame simple things, like making a window that will just close, instead its always busy and i have to use [ctrl+alt+del] to close it.. …

Member Avatar for Stefano Mtangoo
0
323
Member Avatar for Tech B

I used [URL="http://www.parallax.com/Store/Education/KitsandBoards/tabid/182/CategoryID/67/List/0/SortField/0/Level/a/ProductID/313/Default.aspx"]Parallax's Basic Stamp Homework Board[/URL] and an [URL="http://www.radioshack.com/product/index.jsp?productId=2909788"]accelerometer[/URL] to use as a mouse. It works better than I thought it would. [URL="http://sourceforge.net/projects/pyserial/"]PySerial[/URL] is used to grab the debugged values from the stamp. The circuit is compiled of two push buttons, 2 LEDs to tell when a button is …

0
275
Member Avatar for Tech B

Is there a way to grab values from a basic stamp with python? I just bought a Accelerometer and want to read the values with python.

Member Avatar for Tech B
0
329
Member Avatar for tom23

I'm not a C++ coder, but i did something similar in python using WMI. Or if you can call the command line from C++ you could use "tasklist", and check if its running. This is windows only though.

Member Avatar for tom23
0
116
Member Avatar for Whoever90

With the encoded text, I would go with dictionary rather than tuples. As for the prefix stuff, try split.('sting') for the unique prefixes take a look at itertools More spacificaly [inlinecode]itertools.permutation(string)[/inlinecode]

Member Avatar for Whoever90
0
188
Member Avatar for Tech B

I downloaded a dll for head tracking, and have been trying to use it for some time now. I am trying to make a python script that uses it and am getting errors. [URL="http://www.daniweb.com/forums/thread265466.html"]This is the post.[/URL] I posted it in the python forums, and no replies yet, since this …

Member Avatar for Tech B
0
110
Member Avatar for Tech B

I've been working on facial recognition and have obtained a dll that can recognize faces in an image, and gives cordinates aswell. It came with an example program written in C++ and I'm trying to port it to python. Here is the C++ code [CODE] #include "windows.h" #include "loadbmp.h" // …

Member Avatar for Tech B
0
457
Member Avatar for slmsatish

a menu could look something like this: [CODE] import sys while 1: print """ 1)Take Test 2)Test History 3)Exit""" choice = raw_input("Option: ") if choice == "1" or choice == "Take Test": print "choice 1 was made..." #Call the take test function #here..... elif choice == "2" or choice == …

Member Avatar for snippsat
0
198
Member Avatar for mahela007
Member Avatar for Tech B
0
1K
Member Avatar for Tech B

I have had python2.6 for a while and have un0installed and re-installed it several times. Now when I right click on some source code the option to open with the IDLE is gone. I have tried "open with" but that doesn't work either. I'm on Windows 7 Home.

Member Avatar for Tech B
0
190
Member Avatar for happygeek

[QUOTE]Director in Munich, said: "Browsers are perhaps the most important piece of software for computer users today. We're innovating quickly with Chrome, and continue to work towards our three central principles: speed, security and simplicity. With the new release, we also give users even more choice and control over their …

Member Avatar for Tech B
0
1K
Member Avatar for needpythonhelp

redyugi: your code gives x as 4 not 2. try this: [CODE] wordlist = ["bread", "cookies", "cake", "chocolate", "bread"] d = {} for word in wordlist: d[word] = d.get[word,0) + 1 [/CODE] And to see what the outcome is: [CODE] for i in d.keys(): print i,d[i] [/CODE] My results: [CODE] …

Member Avatar for snippsat
0
167
Member Avatar for denero1
Member Avatar for camigirl4k3
Member Avatar for spesseh

If you need it to be an integer you could use atoi() from the locale to pull it from the string. Use atof() for float points. [CODE] import locale nmbr = raw_input("enter a number") firstNum = nmbr[0] realNumber = locale.atoi(firstNum) [/CODE]

Member Avatar for spesseh
0
9K
Member Avatar for Begjinner

I don't really understand either. If you could post an example of your code, and where it goes wrong I could help. And maybe try index() instead of find? for example: [CODE] l = range(1,51) try: print l[l.index(18)] except: print '18 not found' [/CODE] You will need the try, except …

Member Avatar for Tech B
0
121
Member Avatar for Tech B

If you don't know what a quine is, it is a program or script that's only purpose or function is to print out its own source code. I was wondering would this be considered a quine? [CODE] f = open("quine.py","r"); print f.read() [/CODE] quine.py is the script that this code …

Member Avatar for Tech B
0
175
Member Avatar for persianprez
Member Avatar for sugath137

I don't understand what your asking. And no offense, but you really need to work on your spelling and grammar.

Member Avatar for Tech B
0
31
Member Avatar for newharvar

I know this is a three year old post, but I was browsing around and found it. I made a desktop picture changer in python also. It doesn't take up any memory. [CODE] import ctypes, time, os p = "Path\to\picture\folder" SPI_SETDESKWALLPAPER = 20 #this and.. os.chdir(p) while 1: for i …

Member Avatar for Tech B
0
192
Member Avatar for polopaul

I haven't worked with fasta files nor do I know what they are. But have you tried putting it in a try, except statement? [CODE] try: for seq_record in SeqIO.parse(open("mm.fa"), "fasta") : do something except IndexError: pass #or break [/CODE] Or maybe append the values you get from the file …

Member Avatar for woooee
0
98
Member Avatar for ihatehippies

I don't know if it will help, but I wrote a backdoor that supports file transfer. It might help. [url]http://www.daniweb.com/forums/thread256651.html[/url] I also have an updated version with two way file transfer. If your interested let me know. Hope I could help.

Member Avatar for Tech B
0
156
Member Avatar for Candylove
Member Avatar for Candylove

you could also try a system restore, or if it was backed up, you could restore from the backup. A boot cd as mentioned above is also a good idea. If all else fails, you'll have to nuke the system and reinstall your OS.

Member Avatar for PhilliePhan
0
88
Member Avatar for Tech B

I am new to this website, well posting on here anyway. I've taught myself allot about programming and scripting, so I wanna thank everyone for posting. This isn't my first program, but its the first useful thing I've done. It uses the 'w', 'a', 'd', 's' keys to move the …

Member Avatar for Tech B
0
275
Member Avatar for A_Dubbs

How about compiling it to be a background process. Like .pyw? I tried compiling .pyw's but it still shows the console box. Never mind lol. I found it. setup(windows=["file.py"])

Member Avatar for snippsat
0
752
Member Avatar for Kruptein

I would like to know some details, but I MIGHT be interested. I would only be able to work on my part in my free time due to school and work.

Member Avatar for Kruptein
0
79
Member Avatar for ariel.goldstien

Try uninstalling and reinstalling. I don't know if you installed from a binary, but installing from source is usually a better option.

Member Avatar for Tech B
0
59
Member Avatar for Tech B

Everything works great. But sometimes I get an Error message saying something about ip/port bindings. I don't have the traceback but this could cause problems down the road. Any suggestions? [code] #Backdoor Server #Version 0.3.0 #Every now and the I get an Error dealing with the ip/port bindings # seems …

Member Avatar for snippsat
0
2K
Member Avatar for pysup

This looks good. I read a little about killing processes in Gray Hat Python via PID. There is another way too with WMI([url]http://www.daniweb.com/forums/thread245419.html[/url]) I used it to kill the internet, but could be used for other things like notepad. Mine was set to kill the process at a certain time.

Member Avatar for Tech B
0
229
Member Avatar for Tech B

I've been reading a lot here lately on self replicating code. I wanted to try my hand at it. It only copies itself in forward directories. I.E. "C:\Users\cd.." is not supported yet but will be later. I wanted to post it here to see if anyone had ideas, tips, and …

0
75

The End.