Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #2K
~12.1K People Reached
Favorite Forums

16 Posted Topics

Member Avatar for inuasha

alright so my exact problem is that when I attempt to visit a url stored in a text file I get the error "URLError: <urlopen error no host given>" This is strange because if I type in the urls myself they work fine(opener.open("site.com")) The lines of code causing the error …

Member Avatar for snippsat
0
278
Member Avatar for Trak

Read what Zed Shaw says in the book. He explains that an octothorp is a # sign. And a script is any program that you write. I hope that this helps you and also if you mean to make a new line like the same way as pressing enter just …

Member Avatar for brikbrat
0
604
Member Avatar for puddlejumper406

It works fine for me. Here is the code I have been using. [CODE] def main(): print "This program calculates fuel efficiency over a multi-leg journey." print "You should enter the gallons of gas consumes and miles traveled" print "for each leg. Just hit <Enter> to signal the end of …

Member Avatar for woooee
0
312
Member Avatar for inuasha

Alright so I was not sure exactly how to say this, but here is the idea. I have a graph or table I guess you could call that looks like this. [CODE] print ''' ----------------------------- | | | |x | | | |----------------------------- ''' [/CODE] Then I want to make …

Member Avatar for Gribouillis
0
217
Member Avatar for dineshswamy

Also another thing to note is that with python 2.x you should not use input at all as it actually calls the eval() function which can give your problems with certain numbers so use [CODE] int(raw_input()) [/CODE]

Member Avatar for dineshswamy
0
135
Member Avatar for kavithabhaskar

Could you post the source code so we can better understand your question? remember to incase it in a code-block and such

Member Avatar for inuasha
0
118
Member Avatar for inuasha

I want to be able to generate my own random numbers without using the random module. I want to do this that way I can learn somewhat how to do the big boy code on my own.

Member Avatar for snippsat
0
3K
Member Avatar for chris99

like pyTony said you want to use the webbrowser module. where pass is in your could it would look something like this [code=Python]#after you have imported webbrower webbrowser.open('address to site goes here') [/code]

Member Avatar for inuasha
0
266
Member Avatar for inuasha

How would I find the amount of characters in a string and then use that to print a certain amount of some character that you choose. For example: [CODE=Python] a = 'string' # this holds 6 characters print '*' * # amount of characters in string [/CODE]

Member Avatar for inuasha
0
246
Member Avatar for Cap.Alvez

python is an interpreted language and like most languages you can use it to do many things. Also because python is coded in C and most cell phone apps are coded in some sort of C based language it is possible to make an app in python.

Member Avatar for M.S.
0
196
Member Avatar for inuasha

The title really says it all. For example if I had a music file and I wanted to have it play all the way through then how would I make it start another music file after the first is done?

Member Avatar for inuasha
0
215
Member Avatar for monica23

you need the code to print out the html not just the words so instead of print"location blah blah" you need to do print"<html><head><title></title></head><body><p>Location blah blah</p></body</html>"

Member Avatar for inuasha
0
227
Member Avatar for bond00

This is the easiest way I know. [CODE] import os os.startfile(r"%windir%\system32\cmd.exe") [/CODE]

Member Avatar for inuasha
0
6K
Member Avatar for p_sbk

If you would like to open any program including cmd or if you want to execute code in the cmd using python you must look into the os module. [CODE=python] import os os.startfile(r"program location in computer") # the 'r' before the string changes how \ are used os.system("command") # this …

Member Avatar for inuasha
0
145
Member Avatar for monica23

Here this will help you. [code=python] if row['username'] == 'mutango': if row['password'] == 'muta55': print "okay" sys.exit(0) else: print "Wrong" [/code]

Member Avatar for woooee
0
234
Member Avatar for mkbear

Everyone is making this way to complicated here is the program working in whole with a list it will do everything you want and is simple. [code=python]def average(li): total = 0 i = 0 while (i < len(li)): total += i i += 1 print i t = ['1', '2', …

Member Avatar for inuasha
0
222

The End.