Posts
 
Reputation
Joined
Last Seen
Ranked #133
Strength to Increase Rep
+13
Strength to Decrease Rep
-3
100% Quality Score
Upvotes Received
91
Posts with Upvotes
82
Upvoting Members
45
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
47 Commented Posts
~754.71K People Reached
About Me

I love life.

Interests
Video Games, Movies, Drinking, Fishing, Hiking
PC Specs
1. Windows XP SP2, Core2 Duo @ 2GHz, 2 GB 2. Ubuntu Hardy Heron, Pentium4 @ 2.3 GHz, 2.5 GB 3. Windows…
Favorite Tags
Member Avatar for dseto200

If you're using a tuple to keep track of what the user has already tried then you'll need to concatenate in the following manner: [code=python] >>> a = () >>> a += 'a' Traceback (most recent call last): File "<input>", line 1, in <module> TypeError: can only concatenate tuple (not …

Member Avatar for Reverend Jim
0
3K
Member Avatar for lllllIllIlllI

I did this and had a hell of a time figuring it out! Go to Run -> "Run...", then type in [icode]C:\PythonXX\pythonw.exe "$(FULL_CURRENT_PATH)"[/icode] ** Note I use pythonw.exe, you can just as easily use the standard python.exe (I just hate that console window), and when you've got that hit the …

Member Avatar for Kuldeep_8
1
3K
Member Avatar for funfullson

[QUOTE=funfullson;1104986]sorry.I saw links but i can not solve my problem yet. ... .but how can i do it?[/QUOTE] You should really follow those links that woooee provided. For this type of task you should be either using pexpect or subprocess PIPES, not [ICODE]os.system[/ICODE].

Member Avatar for Krystor
0
2K
Member Avatar for zac202020

Here's a way: [code=python] shape = 0 while shape != 4: # Your existing code can go here [/code] Just slap that -blam- into a while loop and you've got a class 5 repeater.

Member Avatar for Gribouillis
0
4K
Member Avatar for mms6

[QUOTE=mms6;1029512]anyone plz help me out here[/QUOTE] We're not here to do your homework for you. But good job on copy-pasting your assignment. [QUOTE=masterofpuppets;1029534]hi after reading the specification like 5 times here's what I came up with :)[/QUOTE] Dear MasterofPuppets, You shouldn't be spoon feeding people looking for us to do …

Member Avatar for Hassaan_4
-2
893
Member Avatar for vegaseat

Wow turtle is fun to play with :) [code=python] import turtle, time tp = turtle.Pen() tp.color('blue') for k in xrange(51): for j in xrange(k): tp.right(360/float(k)) tp.forward(25) time.sleep(3)[/code] *Oops I didn't mean to post this here, it was supposed to be in the thread asking about turtle *sorry* Editor's note: It's …

Member Avatar for vegaseat
23
34K
Member Avatar for vegaseat

[QUOTE=Ene Uran;871712]Beer was the national drink of ancient Egypt. The pharoahs even appointed a "royal chief beer inspector" to protect its quality. I don't think there is such a person in the US.[/QUOTE] Well each brewery does employ their own Brew Master that checks the brew on a daily basis, …

Member Avatar for vegaseat
11
9K
Member Avatar for lapo3399

As far as conversions are concerned there are a number of functions: [QUOTE]int(x [,base]) converts x to an integer long(x [,base]) converts x to a long integer float(x) converts x to a floating-point number complex(real [,imag]) creates a complex number chr(x) converts an integer to a character unichr(x) converts an …

Member Avatar for vegaseat
0
2K
Member Avatar for python1

Gribouillis I'm not sure if this has been fixed or not (perhaps you're using a newer version of Python where this bug has been eliminated) but when I use your path.join this is what I get: [code=python] >>> from os.path import join as pjoin >>> pjoin("C:", "foo", "bar", "baz") 'C:foo\\bar\\baz' …

Member Avatar for Parikshit_1
0
44K
Member Avatar for kiddo39

[code=python] >>> answer =('7', 'Q', '5', 'H', '9', '4', '3', '8', 'L') >>> ''.join(answer) '7Q5H9438L' >>> [/code]

Member Avatar for TrustyTony
0
31K
Member Avatar for jcafaro10

Sometimes, if the module isn't in the same place, it is a matter of the path. At the begging of your progam you can do something like: [code=python] import sys sys.path.append('/path/tomy/module') from MyMod import moduleA [/code] However I don't know how Eclipse as an IDE differs in terms of working …

Member Avatar for snippsat
0
155
Member Avatar for harrykokil

If you search this forum for pygame you will find tons of examples of games that our forums members have creating using said module. Either that or google.

Member Avatar for TrustyTony
0
10K
Member Avatar for Opsive

It depends heavily on the format that you are receiving the time data in. Could you provide us with an example of EXACTLY what you are getting? If it is coming in as a string with the Time Zone then iyou simply use time.strptime(), which will make it very easy …

Member Avatar for Gribouillis
0
901
Member Avatar for sravan953

I believe that [icode]subprocess.call[/icode] is used to open a file as if you had "dobule-clicked" the file's icon. If you're looking to do it "within" python you'll need to search this forum for how others have done it before you.

Member Avatar for aru123
0
2K
Member Avatar for Astudent

[QUOTE=tyincali;724172] (I think (I) (Might) ((See) A Problem) (Here) [/QUOTE] This is improper syntax, you're missing a closing parenthesis ;) No but seriously, to the OP: the error you are getting is trying to tell you that the image file that you're trying to open doesn't exist. You need to …

Member Avatar for vegaseat
0
7K
Member Avatar for zachabesh

I don't know if this module has been updated to support xlsx, but it provides a method to convert xls to xml: [URL="http://www.lexicon.net/sjmachin/xlrd.html"]xlrd[/URL]

Member Avatar for zarfishan
0
5K
Member Avatar for abacus_x

You're not multiplying by 2^16 and 2^8 you're shifting by 16 and 8 bits, respectively. By doing so (and then adding), you're able to fit the two letters into a single 16 bit block... or something like that.

Member Avatar for blj.davidson
0
162
Member Avatar for bladelord76

Greetings, welcome. Wondering what version of Python you're using and on which platform? First a tip: Don't EVER use tabs for Python indentation. It's pretty much standard practice to use 4 spaces instead. Most text editors can be set up to handle this. Here: Read over [URL="http://www.python.org/dev/peps/pep-0008/"]PEP 8[/URL], and then …

Member Avatar for Blacktono4
0
1K
Member Avatar for jworld2

An even easier workaround for being able to import modules from ANY directory is to modify the sys.path variable at run time. So at the beginning of your code do something like this: [code=python] import os,sys sys.path.append('/path/to_my/module') import my_custom_module [/code] And if you're working with a hard-coded windows path make …

Member Avatar for vegaseat
0
5K
Member Avatar for jancho1911

Please use code tags so that your indentation is not lost, and so that we may better read your posts. Code tags go like this: [noparse][code=python] # MY code goes between these tags! [/code][/noparse]

Member Avatar for callmerudy
0
213
Member Avatar for johndb

[QUOTE=vegaseat;1038164]My advice, get rid of Vista as soon as you can.[/QUOTE] And if that's not an option make sure you're both installing and running all these things by right-clicking the executable and selecting "Run as Administrator"

Member Avatar for alex.avak
0
300
Member Avatar for mahela007

[QUOTE=mahela007;1041780]Is it possible to keep writing the output of a program on the same line instead of moving to a new line every time? The output should be written over the preceding output. An example would be a kind of counter... say a number that counts from 1 to 10 …

Member Avatar for Lucaci Andrew
0
11K
Member Avatar for ndoe

Without using list comprehension: [code=python] f = open( "data.txt" ) lines = f.readlines() f.close() f = open( "data2.txt", 'w' ) for line in lines: line = line.strip() if line: f.write( "%s " % line ) f.write( "\n" ) f.close() [/code]

Member Avatar for munna03
0
2K
Member Avatar for Stefano Mtangoo

I've used [URL="http://icofx.ro/"]IcoFX[/URL] in the past with no trouble

Member Avatar for jsdevel
0
163
Member Avatar for Tyler212

It is impossible to answer your question without more information. If you are implementing a CGI HTTP server you should reference the following module, which may already provide some of the functions you're looking for: http://docs.python.org/library/cgihttpserver.html#module-CGIHTTPServer

Member Avatar for jlm699
0
75
Member Avatar for Niner710

You could create your own class based on dictionary that checks whether that key already exists in `__setattr__` and then add the value to a list/tuple. When you do your `get()` you can then use `isinstance` to act accordingly.

Member Avatar for TrustyTony
0
3K
Member Avatar for VinceW

Use code tags: [noparse][code=python] #Code in here [/code][/noparse] This will make your code readable for us forum members, which in turn helps us to solve your problem. In order to limit the number of guesses, you should be using an [icode]if guesses == allowed_guesses:[/icode] statement, or something similar.

Member Avatar for themoviegeek
0
329
Member Avatar for dh273
Member Avatar for tls-005
0
16K
Member Avatar for leegeorg07

[QUOTE=leegeorg07;903214]Hi, me again, sorry if this sounds completely noobish but I have no idea what to do, even with shadwickman's help could anyone help?[/QUOTE] You have no idea what to do with regards to what? You don't know how to download the files? Browse the source tree? What?

Member Avatar for SamarthWiz
0
165
Member Avatar for sneekula

[QUOTE=sneekula;862497]It's time again to poll the well educated folks at DaniWeb about the possible cause of the end of humanity on earth.[/QUOTE] I foresee an unavoidable uprising of our machines against us. Machines kill people at alarming rates, and we only keep trying to make them better and smarter... more …

Member Avatar for bumsfeld
2
931