RE: Searching 2 Strings in A File

2012-06-06 Thread Prasad, Ramit
tern, aLogFile], stdout=PIPE, stdin=PIPE, > stderr=STDOUT) > > > > Regards, > > > > Do Nguyen > > > > If it's two arguments, then you need pattern1 and pattern2. > > But if it works, perhaps egrep is happy with a single argument. egrep is happy with a

RE: Installing MySQLdb via FTP?

2012-06-08 Thread Prasad, Ramit
stall it; I imagine a decent webhost would be able to do this manually if asked via email/ticket. I would imagine that if you know where all the files go, it would be possible copy all the files over FTP and have it work. Granted, I am not familiar with installing this package so I could be

RE: Where is the lastest step by step guide to compile Python into an executable?

2012-06-08 Thread Prasad, Ramit
> > Where is the lastest step by step guide to compile Python into an > executable? > > > > Regards. > > > > David > > > > > > > > > > Google. I think you mean the Internet as Google is just an index. Unless you are referrin

RE: Create directories and modify files with Python

2012-06-12 Thread Prasad, Ramit
mail thread/conversation but if there are no replies then I would have to look in All Mail. But for "normal" email conversations it does have my posts in there. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work p

RE: [newbie] Equivalent to PHP?

2012-06-13 Thread Prasad, Ramit
-web-frameworks-compared-169442 The comments on /. should round out anything missing from the article (I hope) http://developers.slashdot.org/story/11/08/10/2111203/six-python-web-frameworks-compared Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Hous

RE: Pytz error: unpack requires a string argument of length 44

2012-06-13 Thread Prasad, Ramit
lled) from the directory with the unpacked contents of the tarball. I did not need admin rights to manually install on Windows, but that might depend on where your Python is installed. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 7

RE: [newbie] Equivalent to PHP?

2012-06-13 Thread Prasad, Ramit
f factors 1. familiarity/popularity of a framework 2. support 3. what someone thinks is "best" for specifications 4. cost Notice only 1 of those factors was what was actually "best". Also remember you asked this on a *Python* mailing list. I am sure you will get different resp

RE: When adding my application to Windows right-click menu

2012-06-13 Thread Prasad, Ramit
s/t229799-how-to-add-a-program-to-the-open-with-right-click-menu.html There is a way to do it via registry but I cannot find the link, but essentially it should have a string like c:\Python\python.exe %1 where %1 is the file being currently selected (cipher app module). Ramit Ramit Prasad |

RE: [newbie] Equivalent to PHP?

2012-06-13 Thread Prasad, Ramit
forget that it was developed nearly a decade ago and technology has changed (hopefully improved) a lot since then. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -- This email is confidential and

RE: does python have bright future?

2012-06-15 Thread Prasad, Ramit
been around for two decades and seems to be growing in popularity (just my opinion, not based on fact). I expect it will be around for another decade or two. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 -

RE: Threads vs subprocesses

2012-06-15 Thread Prasad, Ramit
tching from one calculation to another which just slows all of the calculations down. I would imagine the fastest way to proceed would be to iteratively do the calculations; thread and subprocess creation have their own memory/CPU overheads. In summary a single process/thread on a single core

RE: Hashable object with self references OR how to create a tuple that refers to itself

2012-06-15 Thread Prasad, Ramit
[x,]. Not entirely sure why Dieter is bringing up C code / Cython... Just as a note, if you store references to an object A in the collection in another object B in the collection and then try to remove A from the collection it will not get garbage collected nor removed from B. To allow for garbage

RE: Need Assistance on this program.

2011-06-02 Thread Prasad, Ramit
Are you writing a command line interpreter (even if a partial one)? If so take a look at : http://docs.python.org/library/cmd.html Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This

RE: How to import data from MySQL db into excel sheet

2011-06-06 Thread Prasad, Ramit
col(9).width = 3200 I am not sure exactly what unit the 3200 represents so I just adjust this manually to be a size that works for me. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This communic

RE: new string formatting with local variables

2011-06-06 Thread Prasad, Ramit
> print "{} was captured by {}".format(solo, jabba) Is this Python2.7 specific? Python 2.6.x : >>>print "{} was captured by {}".format('t1', 't2') ValueError: zero length field name in format Ramit This communication is for informational purposes only. It is not intended as an offer or soli

RE: How to import data from MySQL db into excel sheet

2011-06-06 Thread Prasad, Ramit
tting >of any kind. Topic says importing into excel, so I assume the OP is *currently* using CSV but wants to *switch* to Excel. If that is true then the following is the syntax for it. Assuming you open a workbook and create a worksheet within with a local name of "sheet". > sh

RE: Dynamic Zero Padding.

2011-06-07 Thread Prasad, Ramit
Python 2.6.x >>> 'test {0:.2f}'.format(1) 'test 1.00' >>> 'test {0:{1}f}'.format(1,2) 'test 1.00' >>> 'test {0:{1}f}'.format(1,.2) 'test 1.00' >>> 'test {0:.{1}f}'.format(1,2) 'test

RE: Convert '165.0' to int

2011-08-01 Thread Prasad, Ramit
ndard representation of scientific notation. It basically translates to: 1.65 x 10^2 For more details, see: http://en.wikipedia.org/wiki/Scientific_notation Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 21

RE: Convert '165.0' to int

2011-08-01 Thread Prasad, Ramit
inimum that works for your use case. If you only expect ###.# then code for that. Avoid trying to over-engineer your solution. *If* you think you are going to receive information that might be like '1.65e2' then code for it, otherwise spend your time working on other problems. Ramit Ra

RE: Passing every element of a list as argument to a function

2011-08-09 Thread Prasad, Ramit
dictionary { 'keywordName' : 'value' } Example: >>>def F(name=None): pass >>>F(**{'name':'boo'}) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 71

RE: Ten rules to becoming a Python community member.

2011-08-16 Thread Prasad, Ramit
other two are valid. http://www.englishgrammarsecrets.com/usedto/menu.php http://www.englishpage.com/verbpage/usedto.html http://www.5minuteenglish.com/mar20.htm http://www.learnenglish.de/grammar/usedtotext.htm http://www.thefreedictionary.com/used+to http://www.englishclub.com/grammar/verbs-m_us

RE: allow line break at operators

2011-08-16 Thread Prasad, Ramit
ugh". I am not sure why people are so stuck on braces. I figured other people would be like me and tired of having to do things like figuring out where I missed an end brace. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 w

RE: allow line break at operators

2011-08-16 Thread Prasad, Ramit
ut agreeing with you to ever come to agree with you? Why's >that? Rantingrick: Do answer his question, please. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and sub

RE: List spam

2011-08-18 Thread Prasad, Ramit
>> Or 'Enter a Python keyword (search the tutorial if you do not know any) >> ' > >Sounds good, but now you've trained the spammer who is without a doubt >watching this list. Teach them Python before they can post, I like it! Ramit Ramit Pra

RE: Get reference to parent class from subclass?

2011-08-30 Thread Prasad, Ramit
ed via the super() built-in. I am not entirely sure what you are trying to do...but I think usage of super is probably better than trying to access the base classes manually. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work

RE: Why do class methods always need 'self' as the first parameter?

2011-08-31 Thread Prasad, Ramit
ought that any function added to an object would be a method (unless decorated as a class method). Hmm, or does the decoration just tell Python not to turn an object's function into a method? I.e. Is the decorator basically just the syntactic sugar for doing the above? Ramit Ramit P

RE: Python thread

2011-09-01 Thread Prasad, Ramit
your application to >make better of use of the computational resources of multi-core machines, you >are advised to use multiprocessing. However, threading is still an appropriate >model if you want to run multiple I/O-bound tasks simultaneously. Ramit Ramit Prasad | JPMorgan Chase Inve

RE: newbie question (for loop)

2011-03-15 Thread Prasad, Ramit
In addition, "list" is a reserved word in python and while you can rebind it, it usually not recommended. Unless IPython is different? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 ---

RE: checking if a list is empty

2011-05-11 Thread Prasad, Ramit
ation "if not x:" to be far more English readable than "if x==None or len(x)== 0 or x==0 or bool(x):" (or some derivative/combination of those). Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work pho

RE: checking if a list is empty

2011-05-11 Thread Prasad, Ramit
code in any language. I may not have made the point well, but I cannot see any advantage for trying to program for the lowest common denominator. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This comm

RE: checking if a list is empty

2011-05-11 Thread Prasad, Ramit
ing to read my code understands "if x:" notation or is expected to learn enough Python to understand it. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -Original Message- F

RE: checking if a list is empty

2011-05-11 Thread Prasad, Ramit
amming in Lisp. It is more than just "learning the syntax", it includes a thought paradigm as well. Just like I claim to be able to do math, but severely suck at RPN math. (Okay, that analogy is bad but it is all I can come up with at the moment.) Ramit Ramit Prasad | JPMorgan Ch

RE: Proper way to handle errors in a module

2011-05-11 Thread Prasad, Ramit
mistakes below, but you get the idea. Def a(): Blahblah Raise SomeError Def b(): Try: A() Except SomeError: Return blah Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002

RE: Puzzled by list-appending behavior

2011-05-26 Thread Prasad, Ramit
ilt-ins you *really* do not want to happen (python 2.6.4): >>> True = False >>> True == False True >>> print True False >From what I can tell, this does not work in Python 3.x (at least not in Python >3.1.1) Ramit Ramit Prasad | JPMorgan Chase Investmen

RE: Puzzled by list-appending behavior

2011-05-27 Thread Prasad, Ramit
>I have to say, I do like Python's lack of keywords for these things I thought True/False were among the list of keywords in Python 3.x ? Or are those the only keywords? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77

RE: Python's super() considered super!

2011-05-27 Thread Prasad, Ramit
red) for pornography because he clicked a link. I would *REALLY* prefer not to be 4chan-ed into jail (or fired) because I could not safely tell what a shortened URL really pointed to. Besides, shortened URLs do not live as long and are more likely to fail when people search the archives. Ramit Ra

RE: The worth of comments

2011-05-27 Thread Prasad, Ramit
>(Did I *really* write that code? It has my name on it.) Damn those ninja programmers who stole your name and coded something! Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 T

RE: sqlalchemy and Unicode strings: errormessage

2011-05-31 Thread Prasad, Ramit
actually not Unicode. (decode converts to Unicode, encode converts away from Unicode) >>> type(u'test'.encode('utf8')) >>> type('test'.decode('utf8')) >>> type('test'.encode('utf8')) >>> type(u'

Setting Pythonpath programmatic

2019-12-14 Thread Prasad Rajassekaran
0 Aim:- I would want to set python path programmatic in my project. So that, all other directories files can be imported without any issues. Problem statement:- I used to add all the folders & sub-folders in environment variables under PYTHONPATH but this has two constrains. 1, Any new fold

RE: PEP8 79 char max

2013-07-31 Thread Prasad, Ramit
Grant Edwards wrote: > On 2013-07-31, Neil Cerutti wrote: > > > Besides, after studying The Pragmatic Programmer I removed nearly > > all the tables from my code and reference them (usually with csv > > module) instead. > > I don't understand. That just moves them to a different file -- > doesn

RE: Using system python vs. updated/current version

2013-07-31 Thread Prasad, Ramit
memilanuk wrote: > Hello there, > > What would be considered the correct/best way to run a current release > of python locally vs. the installed system version? On openSUSE 12.3, > the repos currently have 2.7.3 and 3.3.0. As far as I know, I'm not > really hitting any limitations with the exist

RE: pcurl and network connection's problem

2013-07-31 Thread Prasad, Ramit
sam319 wrote: > I am having problems with pycurl in my threads , when i run it , it does > correctly but some times the > connection has been established but nothing will be downloaded and the > threads stay alive without > doing any thing (especially when the network's speed is slow and has abor

RE: Newbie: static typing?

2013-08-08 Thread Prasad, Ramit
Rui Maciel wrote: > Chris Angelico wrote: > > > On Tue, Aug 6, 2013 at 10:01 AM, Rui Maciel wrote: > >> It would be nice if some functions threw an error if they were passed a > >> type > >> they don't support or weren't designed to handle. That would avoid > >> having to deal with some bugs whi

RE: Python3 Multiprocessing

2013-08-09 Thread Prasad, Ramit
Devyn Collier Johnson > On 08/09/2013 03:44 PM, MRAB wrote: > > On 09/08/2013 20:30, Devyn Collier Johnson wrote: [snip] > >> > > jobs1.join() > > jobs2.join() > > > > Thanks MRAB! That is easy. I always (incorrectly) thought the join() > command got two threads and made them one. I did not know i

RE: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Prasad, Ramit
Michael Torrie wrote: > On 08/11/2013 11:54 PM, Gregory Ewing wrote: > > Michael Torrie wrote: > >> I've always wondered if the 160 character limit or whatever it is is a > >> hard limit in their system, or if it's just a variable they could tweak > >> if they felt like it. > > > > Isn't it for com

RE: Verifying Variable value

2013-08-14 Thread Prasad, Ramit
chandan kumar wrote: > Hi , > > Is there a way to validate variable values while debugging any python > code.Run below example  in > debugging mode and i would like to know the value of c (I know print is an > option) with any other > option other than printing. > In C# or some other tools we c

RE: PEP 450 Adding a statistics module to Python

2013-08-16 Thread Prasad, Ramit
CM wrote: > > On Friday, August 9, 2013 9:10:18 PM UTC-4, Steven D'Aprano wrote: > > I am seeking comments on PEP 450, Adding a statistics module to Python's > > standard library: > > I think it's a very good idea. Good PEP points, too. I hope it happens. > +1 especially for non-Cpython versi

RE: refresing the edited python function

2013-08-20 Thread Prasad, Ramit
alex23 > > On 19/08/2013 10:55 AM, Sudheer Joseph wrote: > > I have been using ipython and ipython with qtconsole and working on a > > code with functions. Each time I make a modification in function > > I have to quit IPTHON console (in both with and with out qt console ) > > and reload the funct

RE: Unpickling data with classes from dynamic modules

2013-08-21 Thread Prasad, Ramit
Fredrik Tolf wrote: > > Dear list, > > I have a system in which I load modules dynamically every now and then > (that is, creating a module with types.ModuleType, compiling the code for > the module and then executing it in the module with exec()), and where I > would wish to be able to have clas

RE: utcoffset v. _utcoffset

2013-08-21 Thread Prasad, Ramit
Skip Montanaro wrote: > > Consider this little Python script: > > import dateutil.parser > import pytz > > x = dateutil.parser.parse("2013-08-16 23:00:00+01:00") > localtz = pytz.timezone("America/Chicago") > y = localtz.normalize(x) > > When I execute it (Python 2.7.2, dateutil 1.5, pytz 2011h

RE: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Prasad, Ramit
Bitswapper wrote: > > So I have a parent and child class: > > > class Map(object): > def __init__(self, name=''): > self.mapName = name > self.rules = {} > > class Rule(Map): > def __init__(self, number): > Map.__init__(self) > self.number = number This

RE: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-27 Thread Prasad, Ramit
Ian Kelly wrote: > On Thu, Aug 22, 2013 at 3:26 PM, Prasad, Ramit > wrote: > > Bitswapper wrote: > >> > >> So I have a parent and child class: > >> > >> > >> class Map(object): > >> def __init__(self, name=''): > &

RE: [error] [client 178.59.111.223] (2)No such file or directory: exec of

2013-08-28 Thread Prasad, Ramit
Ferrous Cranus wrote: > Yes Uli, the script metrits.py is being invoked by Apache Web Server which in > turn runs under user > Nobody. > So, that mean that? user 'nobody' has no write permission to /home/nikos > folder? Yes. You should make it group writable with "nobody" as the group. Use chmod

RE: subprocess.Popen instance hangs

2013-08-29 Thread Prasad, Ramit
Tim Johnson > using Python 2.7.1 on OS X 10.7.5 > > I'm managing a process of drush using an instance of subprocess.Popen > > The process has a '--verbose' option. When that option is passed as > part of the initializer `args' argument, the process will hang. > > It should be no surprise as drus

RE: sax.handler.Contenthandler.__init__

2013-08-30 Thread Prasad, Ramit
Neil Cerutti wrote: > This code is from The Python Cookbook, 2nd edition, 12.2 Counting > Tags in a Document: > > from xml.sax.handler import ContentHandler > import xml.sax > class countHandler(ContentHandler): > def __init__(self): > self.tags={} > def startElement(self, name, at

RE: Help please, why doesn't it show the next input?

2013-09-11 Thread Prasad, Ramit
William Bryant wrote: > Sent: Wednesday, September 11, 2013 2:32 PM > To: python-list@python.org > Subject: Re: Help please, why doesn't it show the next input? > > @Dave Angel > > What is .lower() ? Thanks for bottom posting and trimming, but you should leave some content quoted for context. Ot

RE: Language design

2013-09-11 Thread Prasad, Ramit
Mark Janssen wrote: > 1) It tried to make Object the parent of every class. No one's close > enough to God to make that work. > 2) It didn't make dicts inherit from sets when they were added to Python. > 3) It used the set literal for dict, so that there's no obvious way to > do it. This didn't g

RE: Using the MSI installer on Windows: Setting PATH and Setuptools

2013-09-19 Thread Prasad, Ramit
cyt...@m.allo.ws wrote: > Hello All, > > I really hate Windows, and I have only intermittent access to Windows > machines right now. > > When I install Python 2.7 on Windows using the MSI installer, it definitely > does not modify the PATH > variable. So I modify the PATH variable myself as fol

Authenticate users using command line tool against AD in python

2015-07-27 Thread Prasad Katti
I am writing a command line tool in python to generate one time passwords/tokens. The command line tool will have certain sub-commands like --generate-token and --list-all-tokens for example. I want to restrict access to certain sub-commands. In this case, when user tries to generate a new token

Re: Authenticate users using command line tool against AD in python

2015-07-31 Thread Prasad Katti
On Tuesday, July 28, 2015 at 12:56:29 AM UTC-7, Michael Ströder wrote: > Prasad Katti wrote: > > I am writing a command line tool in python to generate one time > > passwords/tokens. The command line tool will have certain sub-commands like > > --generate-token and --list-all-

help(string) commands not working on pyton 3.5

2015-10-15 Thread Prasad Joshi
Hi, I have installed the "Windows x86-64 executable installer<https://www.python.org/ftp/python/3.5.0/python-3.5.0-amd64.exe>" on my desktop but I cannot get help ( ) or help (string) command working. What could be an issue? Thanks! Prasad Joshi. -- https://mail.python.org/

RE: help(string) commands not working on pyton 3.5

2015-10-16 Thread Prasad Joshi
gt; Also help worked when I switched to plain integer as you mentioned below but looks like it didn't save it. Btw - I am pretty new to python hence asking these questions. Thanks again! Prasad Joshi. -Original Message- From: eryksun [mailto:eryk...@gmail.com] Sent: Thursday,

RE: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Prasad, Ramit
assed super the current class you want the super class of, not the type of the super class. So it should be: super(B, self).log('system') # Notice that it passed class B Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002

RE: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Prasad, Ramit
are trying to access. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securiti

RE: The Usenet newsgroup news:comp.lang.python ...

2011-09-13 Thread Prasad, Ramit
>> Mikael Lyngvig accurately summarizes comp.lang.python discussion >No, you're posting spam links. Go away and spend the rest of your >miserable life in a deep hole. I was wondering since the text seemed like plausible non-spam (to me). Ramit Ramit Prasad | JPMorgan Chas

RE: ImportError: cannot import name dns

2011-09-13 Thread Prasad, Ramit
nv python from foo import dns === It is a circular dependency. Dns will try to import udp which will in turn import dns (again) in an endless cycle; instead an ImportError is raised. Circular dependency is a Bad Thing. Ramit Ramit Prasad | JPMorgan Chase Investment Ba

RE: how to make a nested list

2011-09-15 Thread Prasad, Ramit
>>> B = 3 * [ [ None, None ]] That makes a list of the exact same list object: [ a, a, a ] where a = [ None, None ]. Instead I would do something like (untested python2.x): B = [ [ None, None ] for x in xrange(3) ] Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies T

RE: Request for research feedback

2011-09-15 Thread Prasad, Ramit
ng lines (a few times the limit of 78 characters per line) >make your post unreadable. Sincerely, Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to importan

RE: help regarding extracting a smaller list from larger one

2011-09-15 Thread Prasad, Ramit
ay(v) will create new array (untested). Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and conditions including on offers for th

RE: ImportError: cannot import name dns

2011-09-16 Thread Prasad, Ramit
"from foo import dns") Cannot do this because dns is still not defined even though it the name is in sys.modules and since we are still in the middle of the first statement defining dns, it raises an error. 7. check for "dns" in sys.modules (found!) 8. done executing

RE: Using tuples to eliminate multiple dict values

2011-09-16 Thread Prasad, Ramit
text' ] >>> d = { 1:t1, 2:t1, 3:t1, 5:t2, 6:t2, 7:t2 } >>> d[1] ['text'] >>> d[1][0]='new text' >>> d[2][0] 'new text' >>> d {1: ['new text'], 2: ['new text'], 3: ['new text'], 5: ['other text

RE: way to calculate 2**1000 without expanding it?

2011-09-16 Thread Prasad, Ramit
takes about 200 >microseconds to run on my laptop. If you happen to be new to Python, I will say I used these functions to create a one liner (in alphabetical order). Int Lambda Map Reduce Str Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | H

RE: way to calculate 2**1000 without expanding it?

2011-09-16 Thread Prasad, Ramit
>>> sum(map(int,str(2**1000))) *smacks face* Gah, forgot about sum. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and c

RE: Hierarchical commnd line parsing / help texts

2011-09-26 Thread Prasad, Ramit
> It seems it's time to start reading about argparse FYI, it only appears on Python 2.7+ Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to i

RE: options for plotting points on geographic map

2011-09-29 Thread Prasad, Ramit
7;s >probably easier than I think). You could create the webpage and then render it in your desktop app. I have seen plenty of apps like that. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423

RE: Question on Manipulating List and on Python

2011-09-29 Thread Prasad, Ramit
llent post on this a week or so ago (on the tutor list, not this one). See: http://mail.python.org/pipermail/tutor/2011-September/085573.html Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 ChrisA

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
>May I suggest a[n] email client that can group mailing list threads? Please do. Bonus points if it handles threading in a Gmail-like style. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5

RE: [OT] Off-Topic Posts and Threads on the Python Mailing List

2011-09-30 Thread Prasad, Ramit
t;I'm a [programmer]. I have a working knowledge of the entire universe and everything it contains." Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and su

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
ld be good to know. Never know when I will want to start avoiding Gmail :) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and conditions i

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
uot;desktop app". > Maybe one Apache's Buzz? I think you will have to Google that one for me, as the first results I found were Apache Wicket and Apache Beehive...both which seem not related. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main St

RE: Suggested coding style

2011-09-30 Thread Prasad, Ramit
hat 'Gmail-like style' makes a big difference ;)". Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and conditions includin

RE: Thread handling issue

2011-10-07 Thread Prasad, Ramit
ng threads I was wondering the best way to prevent this? -- http://mail.python.org/mailman/listinfo/python-list Why not just wait until they are done with all user input and then fire threads after that? Ramit

RE: Code Review: a framework for writing IRC applications or bots

2011-10-12 Thread Prasad, Ramit
s that try to do this, not from firsthand experience in development. Your mileage (kilometerage?) may vary. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to imp

RE: Opportunity missed by Python ?

2011-10-14 Thread Prasad, Ramit
are good for getting a quick job done, but not for code that has long term use. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers an

RE: [NUMPY] "ValueError: total size of new array must be unchanged" just on Windows

2011-10-14 Thread Prasad, Ramit
[5, 6], [7, 8]]) >>> a = _ >>> numpy.reshape( a, (2,2,2)) array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]]) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 Th

Re-raise different exception with original stack trace

2011-10-14 Thread Prasad, Ramit
is exception Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of secu

RE: Re-raise different exception with original stack trace

2011-10-18 Thread Prasad, Ramit
stack trace On 14/10/2011 22:30, Prasad, Ramit wrote: > Hi all, > Hopefully you guys can help me with my problem. > > Basically I have a UI program that can "save" information. The UI passes the > save to the controller and the controller saves a file and does some post

RE: [NUMPY] "ValueError: total size of new array must be unchanged" just on Windows

2011-10-19 Thread Prasad, Ramit
Redirecting to his question to the list. >I need of a matrix, not of an array. >But is this error due to a numpy bug? I am not an expert on NumPy/SciPy, but I do not believe matrixes are allowed to be 3 dimensional. Google only produced results of 3 dimensional arrays. Ramit Ramit

RE: Problem with a wx notebook

2011-10-20 Thread Prasad, Ramit
# end wxGlade def OnPageChanged(self, event): event.Skip() def OnPageChanging(self, event): event.Skip() = Is this still a problem? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work pho

RE: [OT] Re: Benefit and belief

2011-10-20 Thread Prasad, Ramit
>I think you need to speak German fluently to be a good programmer. Why? Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers and conditi

RE: how to change the order of a button, static text or other components

2011-10-21 Thread Prasad, Ramit
1. By "button" do you mean keyboard/mouse or GUI; if you mean GUI button then what toolkit (Tk, wx, etc) are you referring to? 2. Define "selected components". How are they selected? What is a component? 3. Define "order" in regards to "components". Ramit

RE: webapp development in pure python

2011-10-26 Thread Prasad, Ramit
ed together code for personal use. Apologies in advance if I misunderstood something. Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -- This email is confidential and subject to important disclaimers

RE: python-based downloader (youtube-dl) missing critical feature ...

2011-11-07 Thread Prasad, Ramit
>Maybe Lbrtchx is one of the Sheldon Cooper's nicknames :o) > >JM > >PS : I have the feeling that my nerdy reference will fall flat... Not completely ;) Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work pho

RE: xml-rpc server on wine

2011-11-08 Thread Prasad, Ramit
you start accessing it from outside your local network). Even internally, I tend to use hostnames and not IP addresses, but mostly because it is faster/easier for me to type (I assign static IPs internally). Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main St

RE: Extracting elements over multiple lists?

2011-11-15 Thread Prasad, Ramit
>>for x in a, b, c: >>del x[0] >for arr in [a,b,c]: > arr.pop(0) >(Peter's "del" solution is quite close, but I find the 'del' statement >tricky in python and will mislead many python newcomers) Can you expand on why 'del' is

RE: overview on dao

2011-11-15 Thread Prasad, Ramit
of many programmers. Ramit P.S. I vote for PyLaoziDao :P Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 -- This email is confidential and subject to important disclaimers and conditions including on offers

RE: im.py: a python communications tool

2013-04-12 Thread Prasad, Ramit
Mark Janssen wrote: > >> It doesn't have to say so, if it's not charging any money -- there's no > >> expectation that you're getting anything at all! > > > > Of course there is. If Oprah Winfrey stands up and publicly says that > > she's giving you a car, FOR FREE, no strings attached, and then gi

RE: newbie question about confusing exception handling in urllib

2013-04-12 Thread Prasad, Ramit
Steven D'Aprano wrote: > try: > main() > except Exception as err: > log(err) > print("Sorry, an unexpected error has occurred.") > print("Please contact support for assistance.") > sys.exit(-1) > > I like the traceback[0] module for logging last exception thrown. See tracebac

RE: extract HTML table in a structured format

2013-04-12 Thread Prasad, Ramit
Jabba Laci > Hi, > > I wonder if there is a nice way to extract a whole HTML table and have the > result in a nice structured > format. What I want is to have the lifetime table at the bottom of this page: > http://en.wikipedia.org/wiki/List_of_Ubuntu_releases (then figure out with a > script un

RE: im.py: a python communications tool

2013-04-12 Thread Prasad, Ramit
Neil Cerutti wrote: > On 2013-04-12, Mark Janssen wrote: > > Possibily, but don't accept this view of the legal system. > > Judges can be quite reasonable. They don't want more time > > taken for bullshit cases and would much prefer for things to be > > settled (that is what their duty is -- to s

<    1   2   3   4   >