Re: Speeding up permutations generation

2015-03-06 Thread Abhiram R
> > A list of 100 elements has approximately 9.33 x 10**157 permutations. > If you could somehow generate one permutation every yoctosecond, > exhausting them would still take more than a hundred orders of > magnitude longer than the age of the universe. > -- > https://mail.python.org/mailman/listi

Re: Sudoku solver

2015-03-25 Thread Abhiram R
On Mar 26, 2015 5:39 AM, "Ian Kelly" wrote: > > "Hard" for a human doesn't necessarily mean "hard" for a programmatic > solver in this case. Try your solver on this one: > > $ cat sudoku2.dat > . . . 7 . . . . . > 1 . . . . . . . . > . . . 4 3 . 2 . . > . . . . . . . . 6 > . . . 5 . 9 . . . > . .

Re: Sudoku solver

2015-03-25 Thread Abhiram R
On Thu, Mar 26, 2015 at 8:54 AM, Ian Kelly wrote: > On Wed, Mar 25, 2015 at 8:56 PM, Abhiram R wrote: >> >> On Mar 26, 2015 5:39 AM, "Ian Kelly" wrote: >>> >> >>> "Hard" for a human doesn't necessarily mean "hard&quo

RE: Re: Re: Installing pywin32.

2015-09-28 Thread Abhiram R
> > I will give the team viewer ID of my machine so can you please install the pywin32 module to me. > Hi , It's best if you install it yourself. It isn't really complicated. :) and you'll learn it in the process as well Steps you could possibly Google - 1) installation of Python 3.5 (which i bel

Re: palindrome

2015-11-16 Thread Abhiram R
rint str1 > -- > > ​ The question asks to get an input from the user and print if it's a palindrome or not. It should be just strA=raw_input() if strA==strA[::-1]: print "Palindrome" else: print "Not" Right? Am I missing something? Why are you generat

Re: palindrome

2015-11-16 Thread Abhiram R
On Tue, Nov 17, 2015 at 10:18 AM, Seymore4Head wrote: > On Tue, 17 Nov 2015 10:09:27 +0530, Abhiram R > wrote: > > >On Tue, Nov 17, 2015 at 9:59 AM, Seymore4Head > > >wrote: > > > >> http://www.practicepython.org/exercise/2014/03/12/06-string-lists.h

How to use SQLite (sqlite3) more efficiently

2014-06-05 Thread R Johnson
Thank you all for your replies and suggestions. To Chris's "two small points": I saw that using the mailing list was recommended to several other people who posted here using Google Groups, so I thought it might be recommended to me as well sometime :). I'll try to use it from now on. My code w

How to use SQLite (sqlite3) more efficiently

2014-06-05 Thread R Johnson
I forgot to mention that the scripts Peter pointed to used REPLACE instead of INSERT OR REPLACE. The SQLite documentation says that REPLACE is an alias for INSERT OR REPLACE provided for compatibility with other SQL database engines. Is there a preference for one or the other? I had changed my

Re: How to use SQLite (sqlite3) more efficiently

2014-06-05 Thread R Johnson
Sorry for the attachment issue. I'm used to the wxPython-users Google group, where posters are instructed to attach code to their post instead of including it in the body of the message. I placed the latest version of my sample code below, since I made a few minor changes to it after posting it

How to use SQLite (sqlite3) more efficiently

2014-06-06 Thread R Johnson
> The subject line isn't as important as a header, carried invisibly > through, that says that you were replying to an existing post. :) Sorry for my ignorance, but I've never edited email headers before and didn't find any relevant help on Google. Could you please give some more details about

Re: Writing Python File at Specific Interval

2014-07-09 Thread Abhiram R
Looping in the list to improve on my suggestion or suggest an alternative On Wed, Jul 9, 2014 at 11:03 PM, Abhiram R wrote: > Hi Subha, > What is the current methodology you're using? If your code is already > being called every 24 hours or whatever, you can use a "touch&q

Re: Python 3 is killing Python

2014-07-15 Thread Abhiram R
Annd I just saw that the lifetime has been pushed up to 2020 :) #SelfCorrected On Wed, Jul 16, 2014 at 3:05 AM, Abhiram R wrote: > Umm..Guido Van Rossum said in Pycon 2014 that Py 2.x would be supported > only until 2015 :-| So...you know.. you have like an year before you *do *hav

Re: Python 3 is killing Python

2014-07-15 Thread Abhiram R
Umm..Guido Van Rossum said in Pycon 2014 that Py 2.x would be supported only until 2015 :-| So...you know.. you have like an year before you *do *have to migrate to 3.x . On Wed, Jul 16, 2014 at 2:17 AM, Devin Jeanpierre wrote: > On Tue, Jul 15, 2014 at 1:24 PM, Mark Lawrence > wrote: > > On 1

Re: Python 3 is killing Python

2014-07-15 Thread Abhiram R
a) What is "top post"? b)I did correct myself in the next post. Or maybe you missed that. On Wed, Jul 16, 2014 at 3:19 AM, Mark Lawrence wrote: > On 15/07/2014 22:35, Abhiram R wrote: > >> Umm..Guido Van Rossum said in Pycon 2014 that Py 2.x would be supported >>

Re: Python 3 is killing Python

2014-07-15 Thread Abhiram R
On Wed, Jul 16, 2014 at 4:00 AM, Kevin Walzer wrote: > "Top posting" is the practice of responding to an e-mail thread by putting > your response at the top of the text you are quoting. It's standard > practice in the corporate world... > > On 7/15/14, 6:13 PM, Ab

Re: Python 3 is killing Python

2014-07-15 Thread Abhiram R
On Wed, Jul 16, 2014 at 5:23 AM, Rick Johnson wrote: > On Tuesday, July 15, 2014 5:40:29 PM UTC-5, Abhiram R wrote: > > [snip excessive quotations] > > Aah. Understood. Apologies for the "noobishness" :) > > Noobishness can be tolerated for a "reasonabl

Re: This Python 3 is killing Python thread is killing me.

2014-07-16 Thread Abhiram R
On Wed, Jul 16, 2014 at 11:02 PM, Deb Wyatt wrote: > Can you all stop already with the non python US bashing? Please? > > Deb in WA, USA > > > > -- > https://mail.python.org/mailman/listinfo/python-list > ​I'm actually picking up a lot of snippets of information from that thread by being a spe

Re: I need an idea for practise!

2014-07-17 Thread Abhiram R
On Thu, Jul 17, 2014 at 3:29 PM, Nicholas Cannon wrote: I have made 2 programs(with GUI). And basically they are quite boring(a > text editor and calculator). > -- > https://mail.python.org/mailman/listinfo/python-list > ​What library did you use for the GUI?​ -- Abhiram.R -- https://mail.p

Re: What is best way to learn Python for advanced developer?

2014-07-30 Thread Abhiram R
> I'm looking for online courses and any ressources I can have on the > subject. > > ​If you can get your hands on the Python course on www.lynda.com, that'd do the job.​ -- Abhiram.R -- https://mail.python.org/mailman/listinfo/python-list

To modify IDLE source code

2014-08-28 Thread Abhiram R
Hi, I've got the IDLE source code from IDLElib online. Now I want to modify it so as to improve upon it i.e I have a feature in mind I want to add into it. Is there any documentation that will help me make sense (more easily) of each of the py files in said library? Thanks Abhiram -- https://mai

Re: Problem with my nose test plugin

2013-02-02 Thread R. Osinga
On Saturday, February 2, 2013 3:43:45 PM UTC+1, R. Osinga wrote: > Hi all, > > > > I want to execute unit tests from web2py and I want to automatically > discover, so I think it is wise to use nose tests for that. That way, I can > write a plugin to receive the tes

pdb.py - why is this debugger different from all other debuggers?

2006-01-02 Thread R. Bernstein
Okay, a bit of an exaggeration. Recently, I've been using Python more seriously, and in using the debugger I think one of the first things I noticed was that there is no "restart" ("R" in perldb) or "run" (gdb) command. I was pleasantly pleased discover how

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-05 Thread R. Bernstein
Fernando Perez <[EMAIL PROTECTED]> suggests: > You may want to try out ipython (the current release candidate from > http://ipython.scipy.org/dist/testing/, which has many improvements on this > front). The %pdb magic will trigger automatic activation of pdb at any > uncaught exception, and '%run

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-05 Thread R. Bernstein
[EMAIL PROTECTED] writes: > I was disappointed not to see any replies to this. > I use pdb a lot because most of my debugging needs > are simple, and I don't need/want the overhead or > complications of a heavy duty gui debugger. > > I used ddd only little many many years ago, but > compatibility

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-05 Thread R. Bernstein
Mike Meyer <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: > Actually, you're not talking about changing the paradigm. You're > talking about minor tweaks to the command set. I am sorry if this was a bit of an exaggeration. Whatever. > I don't use pdb a lot either - and I write a *lot* o

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-07 Thread R. Bernstein
Mike Meyer <[EMAIL PROTECTED]> writes: > But if I had to choose between being > able to play with objects interactively or being able to step through > code, I'll take the interactive interpreter every time. Why would you have to choose? You've created a straw-man argument. No one has previously

exec a string in an embedded environment

2006-01-11 Thread Tommy R
Hi all pythonistas! I have a problem with my embedding of python inside a c app. very short background I work on a safety critical embedded application that runs on VxWorks. I have successfully ported the interpreter to VW. In my solution I have restricted other "classes" to use python through my

ANN: (slightly) extended Python debugger

2006-01-12 Thread R. Bernstein
set: python and gdb For the gdb dialect, stack traces look more like they do in gdb and so does frame numbering, "up" and "down" function as gdb's does. In the python mode, stack traces should be the same. In the gdb dialect, some commands have been removed:

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-12 Thread R. Bernstein
Tino Lange <[EMAIL PROTECTED]> writes: > R. Bernstein wrote: > To summarize, I think most of us readers here like your changes or at least > didn't shout loud enough against it ;-) Okay. I'll gladly accept whatever positive interpretation someone wants to offer. :-)

setup.py vs autoconf install/uninstall,

2006-01-12 Thread R. Bernstein
In making a release of the recent changes to pdb.py announce here: http://groups.google.com/group/comp.lang.python/browse_thread/thread/b4cb720ed359a733/fbd9f8fef9693e58#fbd9f8fef9693e58 I tried using setup.py. I think it's great that setup.py tries to obviate the need for "Make" by just doing ev

Getting better traceback info on exec and execfile - introspection?

2006-01-14 Thread R. Bernstein
In doing the extension to the python debugger which I have here: http://sourceforge.net/project/showfiles.php?group_id=61395&package_id=175827 I came across one little thing that it would be nice to get done better. I notice on stack traces and tracebacks, an exec or execfile command appears as

Re: Getting better traceback info on exec and execfile - introspection?

2006-01-14 Thread R. Bernstein
I suggested: > And suppose instead of '' I'd like to give the value or the > leading prefix of the value instead of the unhelpful word ''? > How would one do that? Again, one way is to go into the outer frame > get the source line (if that exists), parse that and interpolate > argument to exec(file

Re: Getting better traceback info on exec and execfile - introspection?

2006-01-15 Thread R. Bernstein
Fernando Perez <[EMAIL PROTECTED]> writes: > R. Bernstein wrote: ... > > However the frame information for exec or execfile looks like this: > > File "", line 1, in ? > > That comes from how the code object was compiled: ... > So any regexp-matching ba

Re: Getting better traceback info on exec and execfile - introspection?

2006-01-15 Thread R. Bernstein
op] def is_exec_stmt(frame): """Return True if we are looking at an exec statement""" return frame.f_back is not None and op_at_frame(frame.f_back)=='EXEC_STMT' re_def = re.compile(r'^\s*def\s+') def is_def_stmt(line, frame): """Re

Re: Getting better traceback info on exec and execfile - introspection?

2006-01-15 Thread R. Bernstein
Fernando Perez <[EMAIL PROTECTED]> writes: > I thought a little about this. One possibility ... Thanks. A sibling thread has the code I'm currently using. > Oh, that's because you're using %run, so your code is in complete control. > What I meant about a restriction ... Okay. > If you are int

Re: Getting better traceback info on exec and execfile - introspection?

2006-01-16 Thread R. Bernstein
Fernando Perez <[EMAIL PROTECTED]> writes: > So any regexp-matching based approach here is likely to be fairly brittle, > unless you restrict your tool to the standard python interpreter, and you > get some guarantee that it will always tag interactive code with > ''. Meant to mention for what it'

The Python cross? Was New Python.org website

2006-01-17 Thread Obaid R.
Bugs wrote: > I thought I read here that a new website design was in the works for > python.org in time for the new year? Is that still true and of so, > anyone know what is it's status? > Thanks! I googled around and found no background on how the new Python logo came to be selected. Does any o

New Python.org website?

2006-01-18 Thread Obaid R.
Steve Holden: > The history of this choice is lost in the mists of time. Many other > proposals were made and discussed at around the same time, to the extent > that it became clear no one choice could win universal approval. > >You are the first person to my knowledge to point out that it is shap

Re: New Python.org website?

2006-01-22 Thread Obaid R.
Terry Hancock wrote: > On 18 Jan 2006 18:05:18 -0800 > "Obaid R." <[EMAIL PROTECTED]> wrote: > > I hope it is not counted against me that I am the first > > one to point out that the logo is shaped like a cross. > [...] > > Hey, looks more like a Yin-Ya

Re: automatic debugger?

2006-07-15 Thread R. Bernstein
[EMAIL PROTECTED] writes: > hi > is there something like an automatic debugger module available in > python? Say if i enable this auto debugger, it is able to run thru the > whole python program, print variable values at each point, or print > calls to functions..etc...just like the pdb module, bu

Re: How to use pdb?

2006-07-21 Thread R. Bernstein
[EMAIL PROTECTED] writes: > I am trying to figure out how to use the pdb module to debug Python > programs, and I'm having difficulties. I am pretty familiar with GDB > which seems to be similar, If you are pretty familiar with gdb, try http://bashdb.sourceforge.net/pydb. It is a great deal mor

Re: How to use pdb?

2006-07-22 Thread R. Bernstein
[EMAIL PROTECTED] writes: > R. Bernstein wrote: > > Perhaps what you are looking for is: > > python /usr/lib/python2.4/pdb.py Myprogram.py > > I tried this and it did not work. pdb did not load the file so it > could be debugged. lol. Yes, if you are not in the same d

Set -Werror *inside* Python (Was Re: Can pdb be set to break on warnings?)

2006-10-13 Thread R. Bernstein
This seems like very useful information. In the documentation I've been maintaining for the extended python debugger (http://bashdb.sf.net/pydb) I've added this as a little footnote: http://bashdb.sourceforge.net/pydb/pydb/lib/pydb-invocation.html#foot1113 However since pydb allows for options on

Re: Debugging

2006-10-21 Thread R. Bernstein
Fulvio <[EMAIL PROTECTED]> writes: > *** > Your mail has been scanned by InterScan MSS. > *** > > > Hello, > > I'm trying out a small utility and my method uses PDB for debugging. I tried > to read some information regarding the commands of PDB but are r

Re: Debugging

2006-10-23 Thread R. Bernstein
Fulvio <[EMAIL PROTECTED]> writes: > The previous post I might have missed some explaination on my proceeding. I'd > say that I'm testing a small program under pdb control > (python /usr/lib/python2.4/pdb.py ./myprog.py). So pdb will load myprog and > stop the first line code. > Once I'm at the

Re: Tracing the execution of scripts?

2006-10-27 Thread R. Bernstein
pydb (http://bashdb.sf.net/pydb) has a both the ability to trace lines as they are executed as well as an --output option to have this sent to a file rather than stdout. If your program has threads it would be good to use the --threading option. (The best threading support is if your program uses t

Re: Tracing the execution of scripts?

2006-10-27 Thread R. Bernstein
Fulvio <[EMAIL PROTECTED]> writes: > *** > Your mail has been scanned by InterScan MSS. > *** Delighted to know that. > > On Friday 27 October 2006 17:31, R. Bernstein wrote: > > pydb (http://bashdb.sf.net/pydb) has a both the ab

Solution for XML-RPC over a proxy

2006-07-06 Thread Andrew R
" # "examples.getStateList([1,2])" try: server=xmlrpclib.Server(url, transport=ProxyTransport()) print "Url: %s" % url try: print "Proxy: %s" % os.environ['http_proxy'] exce

Processing Solid Edge objects

2006-11-29 Thread Maria R
I consider using Python to process Solid Edge .par .asm etc objects. Solid Edge provides a pretty rich documentation and tutorials. Still, when trying it out, using PyWin32, I get somewhat frustrated. So, I hope for someone out there to be willing to share experiences. The objective is to automat

Re: Processing Solid Edge objects

2006-11-29 Thread Maria R
olive skrev: > It would help if you could give an exemple of .par and .asm file. > > Is it human readable, XML ... ? > > Is there any other import/export file format provided ? > The .par files and friends are in binary format so the method I prefer is using the provided COM interfaces and acces

best way to align words?

2006-11-30 Thread Robert R.
Hello, i would like to write a piece of code to help me to align some sequence of words and suggest me the ordered common subwords of them s0 = "this is an example of a thing i would like to have".split() s1 = "another example of something else i would like to have".split() s2 = 'and this is anot

Re: best way to align words?

2006-12-02 Thread Robert R.
Hello, thanks for all your replies, i'm now looking to dynamic programming... sorry for forgetting to say that i wanted the words to be ordered, thus : s1 = "hello there dudes" s2 = "dudes hello there" s3 = "there dudes hello" will not return anything while sharing all three words. Bearophile

Re: best way to align words?

2006-12-03 Thread Robert R.
Oleg Batrashev a écrit : > This means that if you have 10 sentences with 5 words in each there is > 5^10 space and time complexity. Definitelly, there are better > algorithms from dynamic programming, but you should review your needs: > how many sentences, words you have. it can be few to many,

Re: merits of Lisp vs Python

2006-12-11 Thread Juan R.
[EMAIL PROTECTED] ha escrito: > - Lisp is hard to learn (because of all those parenthesis) I cannot understand why. It is like if you claim that packaging things in boxes is difficult to learn. HTML and XML have more brackets than LISP (usually double) for structuring data and everyone has learn

Re: merits of Lisp vs Python

2006-12-11 Thread Juan R.
[EMAIL PROTECTED] ha escrito: > Juan R. wrote: > > [EMAIL PROTECTED] ha escrito: > > > - Lisp is hard to learn (because of all those parenthesis) > > > > I cannot understand why. It is like if you claim that packaging things > > in boxes is difficult to l

Re: merits of Lisp vs Python

2006-12-11 Thread Juan R.
Kay Schluehr ha escrito: > Note also that a homogenous syntax is not that important when > analyzing parse trees ( on the contrary, the more different structures > the better ) but when synthesizing new ones by fitting different > fragments of them together. Interesting, could you provide some il

Re: merits of Lisp vs Python

2006-12-11 Thread Juan R.
Harry George ha escrito: > Really? Given its small base, the percentage increases in Ruby use > (for any reason) can look quite impressive. I've see data suggesting > Ruby is replacing Perl and maybe Java. But I've yet to see data which > shows people dropping Python and moving to Ruby. Where do

Re: merits of Lisp vs Python

2006-12-11 Thread Juan R.
Ken Tilton ha escrito: > You missed it? Google fight: > >http://www.googlefight.com/index.php?lang=en_GB&word1=Python&word2=Ruby > > Python wins, 74 to 69.3. And there is no Monty Ruby to help. > > ken Nice animation! http://www.googlefight.com/index.php?lang=en_GB&word1=Ken+Tilton&word2=Mon

Re: merits of Lisp vs Python

2006-12-12 Thread Juan R.
Rob Thorpe ha escrito: > Juan R. wrote: > > Ken Tilton ha escrito: > > > You missed it? Google fight: > > > > > >http://www.googlefight.com/index.php?lang=en_GB&word1=Python&word2=Ruby > > > > > > Python wins, 74 to 69.3. An

Re: merits of Lisp vs Python

2006-12-12 Thread Juan R.
Kay Schluehr ha escrito: > Juan R. wrote: > > > Kay Schluehr ha escrito: > > > Note also that a homogenous syntax is not that important when > > > analyzing parse trees ( on the contrary, the more different structures > > > the better ) but when syn

Re: merits of Lisp vs Python

2006-12-12 Thread Juan R.
Kaz Kylheku ha escrito: > Kay Schluehr wrote: > > Juan R. wrote: > > > A bit ambiguous my reading. What is not feasible in general? Achieving > > > compositionality? > > > > Given two languages L1 = (G1,T1), L2 = (G2, T2 ) where G1, G2 are > > gr

Re: merits of Lisp vs Python

2006-12-12 Thread Juan R.
greg ha escrito: > From another angle, think about what a hypothetical > Python-to-Lisp translator would have to do. It couldn't > just translate "a + b" into "(+ a b)". It would have > to be something like "(*python-add* a b)" where > *python-add* is some support function doing all the > dynami

Re: merits of Lisp vs Python

2006-12-13 Thread Juan R.
Kay Schluehr wrote: > > You mean a universal language adapter? I guess this is always possible > using alpha conversion but I don't believe this leads to theoretical or > practical interesting solutions but is just a limit concept. Not familiarized with you terminology. I think that i would call t

Re: merits of Lisp vs Python

2006-12-13 Thread Juan R.
greg ha escrito: > Juan R. wrote: > > > I see no dinamism on your example, just static overloading. > > There's nothing static about it: > >q = raw_input() >if q == "A": > a = 1 > b = 2 >else: > a = "x&

Re: merits of Lisp vs Python

2006-12-13 Thread Juan R.
[EMAIL PROTECTED] ha escrito: > FWIW, Python documentation consistently uses the jargon: > > () parentheses > {} braces > [] brackets > > That matches North American conventions, but occasionally confuses an > international audience (for example, the English call parentheses > "bracke

Re: merits of Lisp vs Python

2006-12-16 Thread Juan R.
greg ha escrito: > I don't know about the other Pythonistas in this > discussion, but personally I do have experience with > Lisp, and I understand what you're saying. I have > nothing against Lisp parentheses, I just don't agree > that the Lisp way is superior to the Python way in > all respects,

Re: merits of Lisp vs Python

2006-12-16 Thread Juan R.
Raffael Cavallaro ha escrito: > This lock-in to > a particular paradigm, however powerful, is what makes any such > language strictly less expressive than one with syntactic abstraction > over a uniform syntax. Right, but it would be also remarked that there is not reason to ignoring the developme

Re: merits of Lisp vs Python

2006-12-16 Thread Juan R.
Using LISP-like syntax for everything would be so stupid as using quantum mechanics for billiards. Claiming that LISP parens are Stupid, Superfluous, or Silly just because you do not need them in your limited field of discourse, would be so stupid as those people thinking that just because they us

Re: merits of Lisp vs Python

2006-12-24 Thread Juan R.
Fuzzyman ha escrito: > Perhaps only with the addendum that although 'Lisp roolz', no-one uses > for anything of relevance anymore and it is continuing it's geriatric > decline into obscurity. ;-) I do not think that i cannot agree with the contrary of this but i do not think the contrary neither.

[ANN] pycdio 0.10 - Python to CD reading and control (via libcdio)

2006-01-25 Thread R. Bernstein
pycdio is a Python interface to the CD Input and Control library (libcdio). You can get the source at the same place as libcdio: ftp://ftp.gnu.org:/pub/gnu/libcdio/pycdio-0.10.tar.gz The pycdio and libcdio libraries encapsulate CD-ROM reading and control. Python programs wishing to be oblivious

How to handle two-level option processing with optparse

2006-01-25 Thread R. Bernstein
optparse is way cool, far superior and cleaner than other options processing libraries I've used. In the next release of the Python debugger revision, I'd like to add debugger options: --help and POSIX-shell style line trace (similar to "set -x") being two of the obvious ones. So I'm wondering ho

Re: How to handle two-level option processing with optparse

2006-01-26 Thread R. Bernstein
Giovanni Bajo suggests: > If you call OptionParser.disable_interspersed_args() on your parser, > it will stop parsing at the first positional argument, leaving other > options unparsed. Wow - that was a quick answer! Thanks - it works great! I see how I missed this. Neither disable_.. or enable_

Re: How to handle two-level option processing with optparse

2006-01-26 Thread R. Bernstein
Steve Holden <[EMAIL PROTECTED]> writes: > Well you are just as capable ... Yes, I guess you are right. Done. Couldn't find how to suggest an addition to the Python Cookbook (other than some generic O'Reilly email), so I've put a submission to: http://aspn.activestate.com/ASPN/Cookbook/Python/ -

Re: How to handle two-level option processing with optparse

2006-01-26 Thread R. Bernstein
Magnus Lycka informs: > [in response to my comment]: > > I see how I missed this. Neither disable_.. or enable_.. have document > > strings. And neither seem to described in the optparser section (6.21) > > of the Python Library (http://docs.python.org/lib/module-optparse.html). > > http://docs.py

ANN: (slightly) extended Python debugger 0.11

2006-01-29 Thread R. Bernstein
The second public release of the extended Python debugger is now available from sourceforge: http://sourceforge.net/project/showfiles.php?group_id=61395&package_id=175827 For this release documentation has been added. That is also available online at: http://bashdb.sourceforge.net/pydb/pydb/lib/i

OpenRTS - new OSS Python game

2006-02-01 Thread Andreas R.
OpenRTS is a new open source project, with the aim of creating a realtime strategy game. The game is developed in Python with Pygame. See http://www.openrts.org for more info about the game if you are interested. -- http://mail.python.org/mailman/listinfo/python-list

Re: OpenRTS - new OSS Python game

2006-02-01 Thread Andreas R.
Sybren Stuvel wrote: > To be honest, it looks very much like games from 1995... The game has isometric graphics. It's possible to have nice isometric graphics, ie. look at Civilization 3. Besides, there's a lot more to a good strategy game than good looks. -- http://mail.python.org/mailman/lis

asynchat + send problem

2006-02-13 Thread Andreas R.
ave to use select etc.? The source code is here: http://svn.gna.org/viewcvs/openrts/trunk/openrts/server/clienthandler.py?rev=36&view=markup Thanks in advance! Andreas R. www.openrts.org -- http://mail.python.org/mailman/listinfo/python-list

Re: asynchat + send problem

2006-02-13 Thread Andreas R.
Fredrik Lundh wrote: > "Andreas R." <[EMAIL PROTECTED]> wrote: > >> I'm using Python's asynchat for networking. If I invoke the send() >> method of the asynchat module, only a single send operation is possible >> at any given time. If I call it mo

ANN: Extended Python debugger 0.12

2006-02-21 Thread R. Bernstein
This third release of an improved debugger also probably about as great as the last release. Download from http://sourceforge.net/project/showfiles.php?group_id=61395&package_id=175827 On-line documentation is at http://bashdb.sourceforge.net/pydb/pydb/lib/index.html Along with this release is a

Re: using breakpoints in a normal interactive session

2006-02-22 Thread R. Bernstein
[EMAIL PROTECTED] writes: > Is there a way to temporarily halt execution of a script (without using > a debugger) and have it put you in an interactive session where you > have access to the locals? Here's what I was able to do using the Extended Python debugger. http://bashdb.sourceforge.net/p

Re: using breakpoints in a normal interactive session

2006-02-23 Thread R. Bernstein
of the debugger and when it is left via "quit" the instance is destroyed. (In the case of pydb.set_trace() the issue never comes up because the program is terminated on exit.) [EMAIL PROTECTED] (R. Bernstein) writes: > Here's what I was able to do using the Extended

Exception-handling

2006-02-24 Thread Odd-R.
I have come over a strange problem regarding exceptions This is my code: try: #some operation except Exception, info: #some message except: #?? When executing my code, I get to the last block here. This I find rather strange, because I thought Exception would catch all exceptions. But this

ANN: Extended Python debugger 1.14

2006-02-28 Thread R. Bernstein
Download from http://sourceforge.net/project/showfiles.php?group_id=61395&package_id=175827 On-line documentation is at http://bashdb.sourceforge.net/pydb/pydb/lib/index.html Changes since 1.12 * Add MAN page (from Debian) * Bump revision to 0.12 to 1.13 to be compatible with Debian pydb package.

asynchat network send problems

2006-03-01 Thread Andreas R.
ze is often 512 between client and server, when running len(packet) on the *compressed* packed. The len() of a large packet is usually about 64969. Complete source code is available at http://svn.gna.org/daily/openrts-snapshot.tar.gz Thanks anyone for the help, - Andreas R. www.openrts.org --

BluWater: God is not a man

2005-05-11 Thread Obaid R.
For a detailed response to the claims of the poster please refer to the following. [1] "Ron Grossi: God is not a man" an essay: http://groups-beta.google.com/group/microsoft.public.windowsxp.networ... [2] "Ron Grossi: God is not a man" an entire thread: http://groups-beta.google.com/group/microso

Like Christ PBBUH Prayed

2005-05-16 Thread Obaid R.
THE POSTER vs. CHRIST = For those who follow this frequently re-appearing thread, and the various responses to it, I wish to remind them of the following: 1. There is a detailed response to the claims of the poster here: http://groups-beta.google.com/group/microsoft.public.wi

Re: Who uses Python?

2007-06-05 Thread Maria R
I tend to agree with some earlier poster that if you use Python you are, in a sense, a programmer :o) But seriously, we use Python for controlling fully automated logistics solutions (conveyors and stacker cranes), for generating PLC code etc etc. We are also about to start using FactoryCAD (a th

Python for Vcard Parsing in UTF16

2007-04-21 Thread R Wood
Greetings - A recent Perl experiment hasn't turned out so well, which has piqued my interest in Python. The project is this: take a Vcard file exported from Apple's Addressbook and use a language that is good at parsing text to convert it into a mutt alias file. There are better ways to use Mutt

Re: Python for Vcard Parsing in UTF16

2007-04-22 Thread R Wood
Alex Martelli wrote: > R Wood <[EMAIL PROTECTED]> wrote: >... >> alias Linus_Torvalds Linus Torvalds <[EMAIL PROTECTED]> >> >> To me this was a natural task for Perl. Turns out however, there's a >> catch. Apple exports the file in UTF-16

Re: Emacs and pdb after upgrading to Ubuntu Feisty

2007-05-06 Thread R. Bernstein
levander <[EMAIL PROTECTED]> writes: > I've been using pdb under emacs on an Ubuntu box to debug python > programs. I just upgraded from Ubuntu Edgy to Feisty and this combo > has stopped working. Python is at 2.5.1 now, and emacs is at 21.41.1. If I had to take a guess the big change would be

Re: What is deployment?

2007-05-20 Thread Maria R
On May 20, 7:28 am, Paul Rubin wrote: > Ben Finney <[EMAIL PROTECTED]> writes: > > Agreed. I usually discuss "deployment" as meaning "everything required > > to take something from the point of working in a vendor's lab > > environment, to an actual working installation i

Re: Help controlling CDROM from python

2007-03-23 Thread R. Bernstein
; if self.CDdevice == "": > > print "No device specified" > > sys.exit(-1) > > self.openCD() > > > > def openCD(self): > > > > try: &g

Re: pdb in python2.5

2007-01-25 Thread R. Bernstein
"Rotem" <[EMAIL PROTECTED]> writes: > Hi, > > Maybe I'm repeating a previous post (please correct me if I am). > > I've tried the following code in python 2.5 (r25:51908, Oct 6 2006, > 15:22:41) > example: > > from __future__ import with_statement > import threading > > def f(): > l = thr

Possible bug in Python 2.5? (Was Re: pdb in python2.5)

2007-01-25 Thread R. Bernstein
, for now in pydb CVS, I've worked around this by checking. [EMAIL PROTECTED] (R. Bernstein) writes: > "Rotem" <[EMAIL PROTECTED]> writes: > > > Hi, > > > > Maybe I'm repeating a previous post (please correct me if I am). > > > >

Re: Possible bug in Python 2.5? (Was Re: pdb in python2.5)

2007-01-25 Thread R. Bernstein
"Rotem" <[EMAIL PROTECTED]> writes: > Hi, > > I noticed that pydb.pm() also fails in python2.5 when invoked on that > same example (seems like also trying to access a nonexistent > attribute/variable). > > Is this known to you as well/was it fixed? Doesn't do that for me for Python 2.5 on both

Re: Debugging SocketServer.ThreadingTCPServer

2007-02-03 Thread R. Bernstein
"Stuart D. Gathman" <[EMAIL PROTECTED]> writes: > On Tue, 16 Jan 2007 09:11:38 -0500, Jean-Paul Calderone wrote: > > > On Tue, 16 Jan 2007 00:23:35 -0500, "Stuart D. Gathman" > > <[EMAIL PROTECTED]> wrote: > >>I have a ThreadingTCPServer application (pygossip, part of > >>http://sourceforge.net/p

Re: simple question on dictionary usage

2007-11-03 Thread r . grimm
On Oct 27, 6:42 am, Karthik Gurusamy <[EMAIL PROTECTED]> wrote: > On Oct 26, 9:29 pm, Frank Stutzman <[EMAIL PROTECTED]> wrote: > > > > > My apologies in advance, I'm new to python > > > Say, I have a dictionary that looks like this: > > >record={'BAT': '14.4', 'USD': '24', 'DIF': '45', 'OAT': '16'

operator overloading on built-ins

2007-11-08 Thread r . grimm
Hallo, could you explaint me the difference between the two following statements. Python 2.5 (r25:51908, Oct 7 2006, 23:45:05) [GCC 3.3.5 20050117 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> (1).__cmp__(10) -1 >>> 1.__cmp__(10)

Re: how to change current working directory while using pdb within emacs

2007-11-26 Thread R. Bernstein
duyanning <[EMAIL PROTECTED]> writes: > I have written a pyhton script that will process data file in current > working directory. > My script is in an different directory to data file. > When I debug this script using pdb within emacs, emacs will change the > current working directory to the dire

<    1   2   3   4   5   6   7   8   9   10   >