Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
38
Posts with Upvotes
38
Upvoting Members
20
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
4 Commented Posts
2 Endorsements
Ranked #621
Ranked #202
~203.50K People Reached
Favorite Tags
Member Avatar for Viasur

Dont forget to select your code and press (CODE) next time. And do you have a sample file, becasue this normally works. import csv for row in csv.reader(open('mesaure.csv')): print row

Member Avatar for Gribouillis
0
4K
Member Avatar for gishi
Member Avatar for theweirdone

Like this? [CODE]#!/usr/bin/env python import urllib def save_page(site="http://www.tvrage.com/Warehouse_13/episode_list"): mypath = site f = open('temp2.txt', 'w') for item in urllib.urlopen(mypath).readlines(): f.write(item) f.close() def find_title(temp="temp2.txt"): f = open(temp) site = f.readlines() f.close() for item in site: if item.find('<title>') != -1: before_html, tag_before, rest_html = str(item).partition('<title>') title, tag_after, after_html = rest_html.partition('</title>') print 'Title:', …

Member Avatar for Aung Myat
0
672
Member Avatar for Kippstah
Member Avatar for Beat_Slayer
-2
237
Member Avatar for ultimatebuster

??? Does yours outputs like this mate? [CODE]>>> import unittest >>> dir (unittest) ['FunctionTestCase', 'TestCase', 'TestLoader', 'TestProgram', 'TestResult', 'TestSuite', 'TextTestRunner', '_CmpToKey', '_TextTestResult', '_WritelnDecorator', '__all__', '__author__', '__builtins__', '__doc__', '__email__', '__file__', '__metaclass__', '__name__', '__package__', '__unittest', '__version__', '_makeLoader', '_strclass', 'defaultTestLoader', 'findTestCases', 'getTestCaseNames', 'main', 'makeSuite', 'os', 'sys', 'time', 'traceback', 'types'] >>> print unittest.TestCase <class …

Member Avatar for Utopia_Tz
0
5K
Member Avatar for <LDJ>

Can you provide a sample xml and itl, it's a pretty easy task to achieve. Cheers and Happy coding...

Member Avatar for JoshuaBurleson
0
525
Member Avatar for Tcll

So you can't read C++, and want to convert some C++ files to Python? How about leaking the C++ files so we can help you? Meanwhile, i'll google for tools. ;)

Member Avatar for JoshuaBurleson
0
2K
Member Avatar for Beat_Slayer

Well, it bothers me to build menus for every shell application that needs one. So, I've written a module to handle that, like in the good old turbo pascal times. :) Here it is, the module comments are pretty explainatory, I think, and the sample usage if run as script …

Member Avatar for Beat_Slayer
0
3K
Member Avatar for Beat_Slayer

Simple script for image transparency. Someone asked one some time ago, and i had other but for a different system, and decided to write a Python/PIL version. The value of the color used as transparent is the value of the pixel at position (0, 0). You can adjust tolerance value. …

Member Avatar for gleam.uahmed
0
1K
Member Avatar for rubik-pypol

You don't have questions, nowone cared about this, so just let it sink, till someone finds it attractive. Cheers and Happy coding

Member Avatar for rubik-pypol
0
398
Member Avatar for acrocephalus

[URL="http://docs.python.org/tutorial/index.html"]One of my favorites, it just explains you everything, has a lot of examples.[/URL]

Member Avatar for Dylan Solarsh
0
238
Member Avatar for yari
Member Avatar for techie1991

Going from the root as as folder python, [CODE]python\Objects\intobject.c[/CODE] Cheers and Happy coding

Member Avatar for techie1991
0
154
Member Avatar for P!th

Have you tried [URL="http://www.pygame.org/docs/ref/joystick.html"]pygame.joystick[/URL]. Wheres the code? Cheers and Happy coding

Member Avatar for P!th
0
232
Member Avatar for doffing81

doffing81, theres no need to hardcode the 5 deals. [CODE]def deal(): """this function deals the cards individually to each hand""" for i in range(5): self.append(deck.pop(0)) #pop(0) grabs the first card/item in list p2.append(deck.pop(0)) #pop() would grab last...I believe p3.append(deck.pop(0)) p4.append(deck.pop(0))[/CODE] Cheers and Happy coding

Member Avatar for doffing81
0
1K
Member Avatar for novice20

You want all the output in text file, or only the error output? Wich OS? Are you using GUI? Cheers and Happy coding

Member Avatar for novice20
0
158
Member Avatar for WildBamaBoy

You can run the listening function on an asynchronized thread. [CODE]from functools import wraps from threading import Thread def async(func): @wraps(func) def async_func(*args, **kwargs): func_handler = Thread(target=func, args=args, kwargs=kwargs) func_handler.start() return func_handler return async_func @async def listener(): print "Initializing Listener..." Listener.Listen(server_ip, int(server_port)) os.system("cls") print "Server IP: %s" % server_ip + …

Member Avatar for lrh9
0
173
Member Avatar for Sky Choi

This should be faster. [CODE]lines = [line for line in tx.readlines(2000000)][/CODE] Cheers and Happy coding

Member Avatar for TrustyTony
0
628
Member Avatar for ryufire

What you mean? Like clipboard access? Or a internal function? Copy to variable and write the variable to the widget maybe? Cheers and Happy coding

Member Avatar for vegaseat
0
126
Member Avatar for XR_

Something like... [CODE]self.transport.getDestination()[/CODE] Cheers and Happy coding

Member Avatar for Beat_Slayer
0
416
Member Avatar for jtaylor-bye

I can't see the problem, and it's working good. Maybe IDLE? Maybe version of the pygame you use? Cheers and Happy coding

Member Avatar for redyugi
0
3K
Member Avatar for python_user

You don't need to display them, if you maintain a list of the image objects open, you can easilly save them all in a nice loop. Show a example of what you mean, I'll help you. Cheers and Happy coding

Member Avatar for python_user
0
5K
Member Avatar for acrocephalus

[CODE]class SpeciesGrid(wx.Frame): self.EnglishNameList = ['Great Tit','Marsh Tit','Coal Tot','Crested Tit'][/CODE] Your code defines EnglishNameList as a attribute of the SpeciesGrid class, so you must change the [CODE]self.EnglishNameList[/CODE] on the SearchDlg class by something like [CODE]SpeciesGrid.EnglishNameList[/CODE]. Cheers and Happy coding

Member Avatar for acrocephalus
0
239
Member Avatar for acrocephalus

The usage is [CODE]SetGridCursor(self, row, col)[/CODE], so why collumn -1 on your code mate? [CODE]self.SpeciesGrid.SetGridCursor(ind, -1)[/CODE] Cheers and Happy coding

Member Avatar for acrocephalus
0
720
Member Avatar for dustbunny000
Member Avatar for mjs051

Only the print implementation. You can do [CODE]from __future__ import print_function[/CODE] and keep the 3.x print style. Cheers and Happy coding

Member Avatar for TrustyTony
0
9K
Member Avatar for simpatar

It seems to work here... [CODE]import re print re.findall('[0-9][0-9][0-9]\.', '1234_.txt') print print re.findall('[0-9][0-9][0-9]\.', '1234.txt')[/CODE] Can you explain what's not working. Cheers and Happy coding

Member Avatar for simpatar
0
115
Member Avatar for lewashby

The distance between vectors, presuming you have vector A and B with two coordinates x and y, is: [CODE]sqrt(((Ax - Bx) ** 2) + ((Ay - By) ** 2))[/CODE]

Member Avatar for Beat_Slayer
0
87
Member Avatar for lewashby

@staticmethod returns a static method for function. @classmethod returns a class method for function. The classmethod is called with the 'cls' argument as first argument and it represents the class. It's called when you create a class object and will serve as constructor for the class. At line 13 it …

Member Avatar for Beat_Slayer
0
106
Member Avatar for -ordi-

You have [URL="http://docs.python.org/library/urllib2.html"]urllib2[/URL] also, or you can try with the Beautiful Soup. Cheers and happy coding

Member Avatar for -ordi-
0
530