Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
[PYTHON] ShareFast Paste Creator
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Sway" data-source="post: 234337" data-attributes="member: 1889"><p>Ported to 3.x:</p><p><a href="http://pastie.org/8342663#19" target="_blank">[URL]http://pastie.org/8342705</a>[/URL]</p><p></p><p>You should try and create a second version using urllib2, for those who do not want to go through the process of setting up the requests module. Something else you should keep in mind is the way your if __name__ is __main__ statement is set up: it is good practice to create a seperate main() function and then calling it in that if statement, as I did in the ported code. Refer to this: <a href="http://stackoverflow.com/questions/4041238/python-why-use-def-main" target="_blank">http://stackoverflow.com/questions/4041238/python-why-use-def-main</a> for more information about it.</p><p></p><p>Other than that, it is quite useful. Thanks for this!</p></blockquote><p></p>
[QUOTE="Sway, post: 234337, member: 1889"] Ported to 3.x: [URL='http://pastie.org/8342663#19'][URL]http://pastie.org/8342705[/URL][/URL] You should try and create a second version using urllib2, for those who do not want to go through the process of setting up the requests module. Something else you should keep in mind is the way your if __name__ is __main__ statement is set up: it is good practice to create a seperate main() function and then calling it in that if statement, as I did in the ported code. Refer to this: [URL]http://stackoverflow.com/questions/4041238/python-why-use-def-main[/URL] for more information about it. Other than that, it is quite useful. Thanks for this! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
[PYTHON] ShareFast Paste Creator
Top