Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
3
Posts with Upvotes
1
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~12.6K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.
Favorite Forums
Favorite Tags

11 Posted Topics

Member Avatar for lewashby

Generally, type checking in Python is frowned upon. If you really feel like you need to do it, though, there are a couple ways you can do this. You could use the isinstance() function to check the type, and raise an exception if the argument of the correct type. For …

Member Avatar for vegaseat
0
128
Member Avatar for Xzarik

Well, first of all the True and False boolean values already exist in Python. Second, strings are immutable in Python. This means they cannot be changed. You could on the other hand do something like this: [code=python] for i in range(len(someList)): if someList[i].count('0') > someList[i].count('1'): someList[i] = False else: someList[i] …

Member Avatar for Xzarik
0
123
Member Avatar for n.utiu

A simple way to do this would be to try to send or recv information. If the client is no longer connected, you will get a socket.error with the message: [quote] socket.error: [Errno 107] Transport endpoint is not connected [/quote] You can catch this in an except clause to work …

Member Avatar for n.utiu
0
5K
Member Avatar for ryuurei

I had been working on this program for a while. It was inspired by the slowness of Windows' search feature. I made it so I could simply look for files to see if/where they existed quickly. I eventually added in the feature to delete files. It was no major extension …

Member Avatar for tls-005
3
466
Member Avatar for ryuurei

I am looking for some ways to have my Python code access a video stream on ustream and have the program create a user account by entering a username, password, and email address, and then have it then send a message to be entered into the chat. Does anyone know …

0
80
Member Avatar for acrocephalus

Not really, unless it is provided by the OS. In order to do something like this, I would think you would have to have access to the input stream, to monitor it before anything is actually flushed, which Python doesn't really give you.

Member Avatar for cronos4d
0
98
Member Avatar for danswater
Member Avatar for bbman

If you are just programming specifically for Linux, I think using os.system() would satisfy your needs. You would just have to get the string and call the function as such: [code=python]import os url = raw_input('Enter a URL: ') # this would be input() in 3.X os.system('wget ' + url) [/code]

Member Avatar for Jamesbch
0
113
Member Avatar for akvilio

Are you allowed to use strings? If you can, you could get input in the form of a string and cycle through that, comparing each character along the way, and then convert it to a number afterwards (if necessary at all). The only other thing I can think of working …

Member Avatar for akvilio
0
126
Member Avatar for Archenemie

I believe wxPython is just an applications interface framework. What you want to build websites is HTML, JavaScript, perhaps PHP and other such web-related things. Other approaches for web development would include Django for Python, Ruby on Rails, and AJAX. Ultimately, however, websites are initially created with HTML (and CSS …

Member Avatar for ryuurei
0
110
Member Avatar for omGac0W

[QUOTE=omGac0W;1283356]So this is part of the code in one of my functions, and whenever I enter either yes, no, or something else, no matter what the response the do loop will loop again. I don't think my "if(response == "yes")" is working. Help please? :D [CODE] char response[10]; int answer; …

Member Avatar for ryuurei
0
7K

The End.