Search Results

Showing results 1 to 39 of 39
Search took 0.01 seconds.
Search: Posts Made By: Shadow14l
Forum: C# Oct 14th, 2008
Replies: 4
Views: 445
Posted By Shadow14l
I'd suggest starting by opening up the image file in binary "rb", and depending on what is a line for you, extract them out accordingly.
Forum: C# Oct 14th, 2008
Replies: 2
Views: 1,398
Posted By Shadow14l
I think he is submitting this as a snippet...
Forum: C# Oct 14th, 2008
Replies: 1
Views: 752
Posted By Shadow14l
Use a codec to encode your video before you upload it, it usually greatly decreases the size of your video, and some new ones barely reduce quality that it's unnoticeable.
Forum: Python Sep 21st, 2008
Replies: 12
Views: 3,919
Posted By Shadow14l
I'd use a while loop if you're gonna use two different lists. If you want to use a for loop, I'd suggest using a dictionary to store values and keys.

Here's an example of the while loop:
words =...
Forum: Python Sep 1st, 2008
Replies: 2
Views: 1,403
Posted By Shadow14l
Stop posting useless crap...




ub007, if you want to use command arguments use this example:
import sys
for argument in sys.argv:
print argument
Forum: Python Sep 1st, 2008
Replies: 5
Views: 659
Posted By Shadow14l
Never use input(), always consider the user may accidentally put in a string character. That way you can handle it appropriately.


Anyways csm_tC, you need to use a try & except block.

Here's...
Forum: Python Sep 1st, 2008
Replies: 6
Views: 1,231
Posted By Shadow14l
If it's an entry box...

entry = Entry()
entry.pack()
##### Type 'hello' into the box
print entry.get()
>> hello
Forum: C# Aug 23rd, 2008
Replies: 3
Views: 412
Posted By Shadow14l
In vc#, when you start a method (by typing a period "."), it will automatically pop up ALL the methods known. Start typing which one you want and it will go to it, hit enter to accept the right one,...
Forum: Python Aug 17th, 2008
Replies: 4
Views: 3,177
Posted By Shadow14l
filerz = "c:\\cookie\\win\\etc\\beeeeeeepyyrasdf.doom"

def filetype(file):
return file.split(".")[-1]

print filetype(filerz)

>> doom
Forum: Python Aug 17th, 2008
Replies: 8
Views: 1,180
Posted By Shadow14l
I prefer this method

import os
path = ('c:\\stuff\\countfiles\\')
print "Counting all .txt files in: " + path
x=0
for files in os.listdir(path):
if files.endswith('.txt'):
x+=1
...
Forum: Python Jul 27th, 2008
Replies: 1
Views: 572
Posted By Shadow14l
I thought I knew how packets worked, but I'm just not understanding how to capture and read them...

I am playing this online game which is connected to a server (some server off of battle.net).
...
Forum: Python Jul 14th, 2008
Replies: 4
Views: 3,070
Posted By Shadow14l
Thanks a lot, I was looking for an easy answer like this!!!!!
Forum: Python Jul 13th, 2008
Replies: 4
Views: 3,070
Posted By Shadow14l
It doesn't support those, I was looking for a module, or another method to do that.
Forum: Python Jul 13th, 2008
Replies: 4
Views: 3,070
Posted By Shadow14l
I just need some code that will return a string of the name of the current activated window title/name.

I've spent almost hours looking for a simple example though...
...
Forum: Python Jul 6th, 2008
Replies: 0
Views: 1,405
Posted By Shadow14l
I am using this function to download files:

def download(url):
urllib.urlretrieve(url, url.split("/")[-1])

I am downloading files from a site, but I don't know the EXACT filename... All I...
Forum: Python Jun 9th, 2008
Replies: 5
Views: 1,257
Posted By Shadow14l
string = "hi"

f = open("filename.txt")
contents = f.read()
f.close()

print "Number of '" + string + "' in your file is:", contents.count("hi")

Replace "hi" with the word you want to count...
Forum: Game Development May 21st, 2008
Replies: 6
Views: 4,865
Posted By Shadow14l
The tutorials are on that yoyo site :)

They are very helpful. Check them out some time, just use google, you'll get somewhat of an exact url :P
Forum: Game Development May 19th, 2008
Replies: 6
Views: 4,865
Posted By Shadow14l
1. Decide the exact characters you want to be in your game. See if you can get them then. Use variables to set the turn numbers and length.

2. Gamemaker 7 makes gamemaking incredibly easy. You...
Forum: Show Off your Projects May 19th, 2008
Replies: 10
Views: 2,607
Posted By Shadow14l
Ahhh, beeps caught me off my guard O.o

They get a bit annoying :/
Forum: Pay-Per-Click Advertising May 19th, 2008
Replies: 2
Views: 10,575
Posted By Shadow14l
I know it may seem silly, but you should purchase a domain. More people would be interested in your site if it was .com/.net/.org

Also tell all of your friends about it, and if it's a good enough...
Forum: Python May 19th, 2008
Replies: 7
Views: 843
Posted By Shadow14l
You probably syntaxed the the file incorrectly :P

import os

filepath = "C:\\Documents and Settings\\Username\\Desktop\\coolapps\\pythonprograms\\zomglongfilename.file"

info =...
Forum: Python May 19th, 2008
Replies: 3
Views: 716
Posted By Shadow14l
Like Chris said, change the file extension from .py to .pyw. The console should only be used for basic applications or for debugging.
Forum: Python May 18th, 2008
Replies: 8
Views: 748
Posted By Shadow14l
Is this what you mean?

string = "Hi I hope this helps!"

wordlist = string.split(" ")

print "None", wordlist[0], "- 0"
for x in range(len(wordlist)):
try:
jstring = wordlist[x]...
Forum: Python May 18th, 2008
Replies: 4
Code Snippet: Animation using PyGame
Views: 6,195
Posted By Shadow14l
I have a question!!!!!

Whenever you put your mouse over something, that makes one of those floating labels appear when you hover over something something interesting happens.

What happens is...
Forum: Python May 18th, 2008
Replies: 7
Views: 843
Posted By Shadow14l
I don't seem to be getting any errors, maybe you could post a screenie?

I did:

import os
f =...
Forum: Python May 18th, 2008
Replies: 1
Views: 443
Posted By Shadow14l
I read somewhere those mac os x's come installed with Python 2.3.

Are you sure you have Python 2.4????
Forum: Python May 18th, 2008
Replies: 0
Views: 327
Posted By Shadow14l
Nvm :/

Please excuse my blindness.

Where's the delete topic button at? :(

Please excuse it again.

~Shadow14l
Forum: Python May 18th, 2008
Replies: 4
Views: 1,545
Posted By Shadow14l
If that doesn't work, you can always try:

repr()
Forum: Python May 18th, 2008
Replies: 8
Views: 919
Posted By Shadow14l
Yeah, that example works well enough for a solution.

My friend used to always forget to escape. After he learned that, he went on to url's. He was extremely confused, mixing up backspaces along...
Forum: Python May 18th, 2008
Replies: 8
Views: 748
Posted By Shadow14l
One way I liked to get words and count them might help you.

wordlist = string.split(" ")
for word in wordlist:
print word

Then you could use that again, if you wanted each two words...
Forum: Python May 18th, 2008
Replies: 8
Views: 919
Posted By Shadow14l
Chris, you forgot the escape the forward slashes in your example with the directories :P

Cwolfraven, don't forget to use "\\", for every directory name.
Forum: Python May 18th, 2008
Replies: 2
Views: 1,593
Posted By Shadow14l
Thanks, the other time I tried the python tag, I put quotes around "python" xD
Forum: Python May 17th, 2008
Replies: 2
Views: 1,593
Posted By Shadow14l
I just want a console to run. When I use this function, I don't ever want the automatic tk window to appear. How would I use this function without any gui?

*Also on a side note, what is the python...
Forum: Python May 14th, 2008
Replies: 2
Views: 385
Posted By Shadow14l
You'd want to start by getting the info from the file.

allplayerinfo = []
info = open("filename.cvs")
data = info.read()
info.close()

for lines in data:
allplayerinfo.append(lines)
Forum: Python May 12th, 2008
Replies: 4
Views: 1,366
Posted By Shadow14l
I found a very neat sample of doing this:

from ctypes import *
import time, curses, win32con, win32gui

PUL = POINTER(c_ulong)

class KeyBdInput(Structure):
_fields_ = [("wVk",...
Forum: Python May 12th, 2008
Replies: 3
Views: 2,190
Posted By Shadow14l
Maybe you should try using the webbrowser module!!!!!

import webbrowser
firefox = webbrowser.get('mozilla') # or 'firefox'
firefox.open('http://www.google.com') # any site
Forum: Python May 12th, 2008
Replies: 3
Views: 4,778
Posted By Shadow14l
I would use this function, but for the text I would prefer using:

raw_input("Press Enter to Exit")
Forum: Python May 12th, 2008
Replies: 2
Views: 445
Posted By Shadow14l
Thank you very much Jeff, that really helped me. Now the only thing I am concerned with is remembering to replace the "\r".

Thanks again!

-Shadow14l
Forum: Python May 11th, 2008
Replies: 2
Views: 445
Posted By Shadow14l
Whenever I open a page with urllib or urllib2 (file = urllib.urlopen(urllinkhere)) and when I print it, I get this:

http://i121.photobucket.com/albums/o229/Shadow14l/boxes1.gif

See all the...
Showing results 1 to 39 of 39

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC