Latest Jobs for Freshers and Experienced

2012-12-08 Thread 12nagar
www.fresherjobway.com fresherjobway.com/0-1-year-software-developer-at-pc-solutions-pvt-ltd-delhi/#more-311 http://fresherjobway.com/kent-technology-pvt-ltd-walkin-call-center-executive-business-development-executive-experience-mumbai-7th-to-20th-december-2012/#more-308 fresherjobway.com/nationa

Re: python 3.3 urllib.request

2012-12-08 Thread Hans Mulder
On 8/12/12 07:20:55, Terry Reedy wrote: > On 12/7/2012 12:27 PM, Hans Mulder wrote: >> On 7/12/12 13:52:52, Steeve C wrote: >>> hello, >>> >>> I have a python3 script with urllib.request which have a strange >>> behavior, here is the script : >>> >>>

Help with Singleton SafeConfigParser

2012-12-08 Thread Josh English
I am trying to create a Singleton SafeConfigParser object to use across all the various scripts in this application. I tried a Singleton pattern found on the web: class Singleton(object): def __new__(cls): if not hasattr(cls, '_inst'): print "Creating Singleton Object"

Re: Help with Singleton SafeConfigParser

2012-12-08 Thread Peter Otten
Josh English wrote: > I have seen older posts in this group that talk about using modules as singletons, but this, unless I misunderstand, requires me to code the entire API for SafeConfigParser in the module: > > > import ConfigParser > > > class Options(ConfigParser.SafeConfigParser): >

Re: Help with Singleton SafeConfigParser

2012-12-08 Thread Josh English
On Saturday, December 8, 2012 9:40:07 AM UTC-8, Peter Otten wrote: > > > > Two underscores trigger name mangling only in a class, not in a module. > > Don't try to hide the Options instance: > > > > # module config.py > > import ConfigParser > > > > class Options(ConfigParser.SafeConfig

Re: Confused compare function :)

2012-12-08 Thread MRAB
On 2012-12-08 07:17, Chris Angelico wrote: On Sat, Dec 8, 2012 at 6:01 PM, Terry Reedy wrote: Unfortunately, catching exceptions may be and often is as slow as the redundant check and even multiple redundant checks. It depends on how often you're going to catch and how often just flow through

Re: regex walktrough

2012-12-08 Thread MRAB
On 2012-12-08 17:48, rh wrote: Look through some code I found this and wondered about what it does: ^(?P[0-9A-Za-z-_.//]+)$ Here's my walk through: 1) ^ match at start of string 2) ?P if a match is found it will be accessible in a variable salsipuedes 3) [0-9A-Za-z-_.//] this is the one that

Re: regex walktrough

2012-12-08 Thread Hans Mulder
On 8/12/12 18:48:13, rh wrote: > Look through some code I found this and wondered about what it does: > ^(?P[0-9A-Za-z-_.//]+)$ > > Here's my walk through: > > 1) ^ match at start of string > 2) ?P if a match is found it will be accessible in a > variable salsipuedes I wouldn't call it a variab

Re: Help with Singleton SafeConfigParser

2012-12-08 Thread Mark Lawrence
On 08/12/2012 17:48, Josh English wrote: On Saturday, December 8, 2012 9:40:07 AM UTC-8, Peter Otten wrote: Two underscores trigger name mangling only in a class, not in a module. Don't try to hide the Options instance: # module config.py import ConfigParser class Options(ConfigParser.SafeC

Running a Python app on a remote server and displaying the output files

2012-12-08 Thread Jason Hsu
I have a Python 2.7 script at https://github.com/jhsu802701/dopplervalueinvesting . When I run the screen.py script locally, the end result is a new screen-output sub-directory (within the root directory) and a results.csv file within it. What I'm trying to do is put this script on a remote ser

Issue with seeded map generation

2012-12-08 Thread Graham Fielding
Hey, all! I've managed to get my project to a semi-playable state (everything functions, if not precisely the way I'd like it to). One small issue is that when the player movs from one level to the next, the items and monsters in the previous level all 'reset' and return to the positions th

Parsing in Python

2012-12-08 Thread subhabangalore
Dear Group, I am looking at a readymade tool to resolve anaphora, and I am looking a Python based one. I checked NLTK. It has DRT parser. But I do not like that. In other parsers you have to insert grammar. But I am looking for a completely built in. If anyone can kindly suggest. Regards, S

Re: Issue with seeded map generation

2012-12-08 Thread Mitya Sirenef
On 12/08/2012 04:32 PM, Graham Fielding wrote: Hey, all! > > I've managed to get my project to a semi-playable state (everything functions, if not precisely the way I'd like it to). One small issue is that when the player movs from one level to the next, the items and monsters in the previous

Re: Issue with seeded map generation

2012-12-08 Thread Hans Mulder
On 8/12/12 22:32:22, Graham Fielding wrote: > Hey, all! > > I've managed to get my project to a semi-playable state (everything > functions, if not precisely the way I'd like it to). One small issue is > that when the player moves from one level to the next, the items and > monsters in the previ

Re: regex walktrough

2012-12-08 Thread Hans Mulder
On 8/12/12 23:19:40, rh wrote: > I reduced the expression too. Now I wonder why re.DEBUG doesn't unroll > category_word. Some other re flag? he category word consists of the '_' character and the characters for which .isalnum() return True. On my system there are 102158 characters matching '\w':

Re: regex walktrough

2012-12-08 Thread Hans Mulder
On 8/12/12 23:57:48, rh wrote: > Not sure if the \w sequence includes the - or the . or the / > I think it does not. You guessed right: >>> [ c for c in 'x-./y' if re.match(r'\w', c) ] ['x', 'y'] >>> So x and y match \w and -, . and / do not. Hope this helps, -- HansM -- http://mail.python

Re: Running a Python app on a remote server and displaying the output files

2012-12-08 Thread Chris Angelico
On Sun, Dec 9, 2012 at 7:22 AM, Jason Hsu wrote: > I have a Python 2.7 script at > https://github.com/jhsu802701/dopplervalueinvesting . When I run the > screen.py script locally, the end result is a new screen-output sub-directory > (within the root directory) and a results.csv file within it.

Re: regex walktrough

2012-12-08 Thread MRAB
On 2012-12-08 23:27, Hans Mulder wrote: On 8/12/12 23:19:40, rh wrote: I reduced the expression too. Now I wonder why re.DEBUG doesn't unroll category_word. Some other re flag? he category word consists of the '_' character and the characters for which .isalnum() return True. On my system the

Re: regex walktrough

2012-12-08 Thread MRAB
On 2012-12-08 23:34, Hans Mulder wrote: On 8/12/12 23:57:48, rh wrote: Not sure if the \w sequence includes the - or the . or the / I think it does not. You guessed right: [ c for c in 'x-./y' if re.match(r'\w', c) ] ['x', 'y'] So x and y match \w and -, . and / do not. This is short

Re: Issue with seeded map generation

2012-12-08 Thread Ian Kelly
On Sat, Dec 8, 2012 at 2:32 PM, Graham Fielding wrote: > Hey, all! > > I've managed to get my project to a semi-playable state (everything > functions, if not precisely the way I'd like it to). One small issue is > that when the player movs from one level to the next, the items and monsters > in

Re: Confused compare function :)

2012-12-08 Thread Ramchandra Apte
On Thursday, 6 December 2012 17:44:17 UTC+5:30, Chris Angelico wrote: > On Thu, Dec 6, 2012 at 10:47 PM, Steven D'Aprano > > wrote: > > > Not so. Which one is faster will depend on how often you expect to fail. > > > If the keys are nearly always present, then: > > > > > > try: > > > do

Re: Confused compare function :)

2012-12-08 Thread Chris Angelico
On Sun, Dec 9, 2012 at 2:07 PM, Ramchandra Apte wrote: > Not really. I remember a bug saying that only 256 hashes were required of > known texts and then the randomization becomes useless. That requires that someone be able to get you to hash some text and give back the hash. In any case, even i

Re: Confused compare function :)

2012-12-08 Thread Steven D'Aprano
On Sun, 09 Dec 2012 14:22:21 +1100, Chris Angelico wrote: > On Sun, Dec 9, 2012 at 2:07 PM, Ramchandra Apte > wrote: >> Not really. I remember a bug saying that only 256 hashes were required >> of known texts and then the randomization becomes useless. > > That requires that someone be able to g