Re: Is there a Python Version Manager?

2010-10-04 Thread TerryP
On Oct 4, 4:12 am, Kushal Kumaran kushal.kumaran+pyt...@gmail.com wrote: Is virtualenv what you need? http://pypi.python.org/pypi/virtualenv snip -- regards, kushal Not quite. It basically amounts to a UNIX version of xcopy'ing an existing Python installation. ... install Python X.Y

Is there a Python Version Manager?

2010-10-03 Thread TerryP
Having STFW and come up empty, I'm wondering if anyone knows if there is an analogue to the Ruby Version Manager http:// rvm.beginrescueend.com/ in the Python world? rvm is essentially a tool that can install several Ruby implementations side by side and easily hot swap them in your shell session.

Re: Python 2.X vs. 3.X - level of acceptance?

2010-04-28 Thread TerryP
For the most part keeping new code compatible with both Python 2.6 and 3.1 isn't a challenge, the most noticeable issue is with string data. The obvious downside is if the code has to run on an interp that doesn't understand the modern 'except ClassName as varname:' thing. --

Re: Download Visual Studio Express 2008 now

2010-04-28 Thread TerryP
On Apr 27, 11:09 pm, Martin v. Loewis mar...@v.loewis.de wrote: I'm curious to know exactly the differences between the c/c++ compilers you get with various versions of VS and those you get with the (command line only) Windows SDK (formerly called the platform SDK). The windows sdk is a

Re: Download Visual Studio Express 2008 now

2010-04-27 Thread TerryP
I've generally found it wise to grab the ISO images for the express editions collection, and save it somewhere in cold storage. Never have needed to compile Python on Windows, but some modules only support older versions (e.g. 2.4 or 2.5), which is irksome. So it's a good idea to have stuff setup

Re: DLLs loading in interpreter but not with direct run on Windows

2010-04-24 Thread TerryP
On Apr 23, 4:47 pm, JTimoty jtim...@gmail.com wrote: Hi, I've got a weird problem, apparently related to the way python searches for DLLs on Windows. I compiled PyQt4 (no errors) but scripts that use it fail with DLL load failed: Invalid access to memory location. If I play with loading

Re: Language mavens: Is there a programming with if then else ENDIF syntax?

2009-11-17 Thread TerryP
On Nov 16, 4:54 pm, Steve Ferg steve.ferg.bitbuc...@gmail.com wrote: This is a question for the language mavens that I know hang out here. It is not Python related, except that recent comparisons of Python to Google's new Go language brought it to mind. NOTE that this is *not* a suggestion to

Re: Vim breaks after Python upgrade

2009-11-17 Thread TerryP
In my experience (FreeBSD), compiling vim with Python, Perl, or Ruby support (etc), generally requires recompiling vim after upgrading the corresponding language. Note also that (if like me) you manage vim installations `by hand` on all systems, rather then use the systems package management

Re: #define (from C) in Python

2009-11-12 Thread TerryP
If it's such a big hairy deal, just recompile a copy of the C Pre Processor to use something other then #, and hook it up to your python scripts in a pipe line from a shell wrapper. Personally, I'd rather have Lisps lambda or perls sub then Cs preprocessor, and even in those cases, Python

Re: Command parsing... best module to use?

2009-11-02 Thread TerryP
On Nov 2, 2:27 pm, Collin D collin.da...@gmail.com wrote: Hey everyone. I am writing a game in python, and it includes a text console somewhat like the one in WoW and Runescape. I want to be able to include / commands, like IRC, and was wondering what the best module would be to parse these.

Re: Why do you use python?

2009-10-31 Thread TerryP
For me a language is a language for the most part, doesn't matter... Python is a language I choose for any of several reasons: 0.) It is easy to setup dependent packages on both BSD, Linux, and Windows 1.) Most important things already have a Python binding somewhere 2.) Working in

Re: how to get os.system () call to cooperate on Windows

2009-10-27 Thread TerryP
On Oct 26, 10:00 am, Anthra Norell anthra.nor...@bluewin.ch wrote: The function os.system ('copy file_name directory_name') turns out doesn't do anything except flashing a DOS command window for half a second. So my question is: How can one copy files on the OS level? Under a Windows system

Re: What IDE has good git and python support?

2009-10-27 Thread TerryP
The best IDE for git and python is bash :-P. I use a mixture of FreeBSD, rxvt-unicode, GNU screen, zsh, vim, git, Python, and Exuberant Ctags. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2009-10-26 Thread TerryP
On Oct 26, 11:57 am, Girish girish@gmail.com wrote: Hello, Which is the best software to create GUI other then Boa. Thanks, Girish. Any editor can be used to create a GUI program in Python. Beyond that it depends on what you are using; since you stated Boa, I assume WxPython - so take a

Re: PyQt4 - remember widget positions

2009-10-21 Thread TerryP
easy for you to comprehend how to do it in Python. -- TerryP -- http://mail.python.org/mailman/listinfo/python-list

Re: Poll on Eval in Python

2009-10-20 Thread TerryP
On Oct 20, 4:30 pm, Nobody nob...@nowhere.com wrote: One language's eval isn't the same as another's. E.g. there's a big difference between Lisp's eval (which takes an s-expression as an argument) and an eval which takes a string as an argument. The former is fine; the latter should be

Re: print()

2009-10-18 Thread TerryP
On Oct 18, 12:35 pm, mattia ger...@gmail.com wrote: Yes, reading the doc I've come up with s = %(0)03.02f%(1)s done % {0: 100.0-100.0*(size/tot), 1: %} but to it is not a good idea to use a dict here.. Also look at the new str.format() -- http://mail.python.org/mailman/listinfo/python-list

Re: Spawning Cmd Window via Subprocess

2009-10-16 Thread TerryP
On Oct 16, 8:15 pm, D dmcclo...@gmail.com wrote: Hello, I would like to be able to spawn a new CMD window (specifing size, color and placement of the window),  and write to it separately. Specifically, I have a backup program that displays each file backed up in the main window, and I would

Re: print()

2009-10-16 Thread TerryP
On Oct 16, 9:04 pm, mattia ger...@gmail.com wrote: Is there a way to print to an unbuffered output (like stdout)? I've seen that something like sys.stdout.write(hello) works but it also prints the number of characters! http://docs.python.org/3.1/library/functions.html#print a suitable object

Re: How to schedule system calls with Python

2009-10-15 Thread TerryP
On Oct 15, 7:42 pm, Jeremy jlcon...@gmail.com wrote: I need to write a Python script that will call some command line programs (using os.system).  I will have many such calls, but I want to control when the calls are made.  I won't know in advance how long each program will run and I don't

Re: How to schedule system calls with Python

2009-10-15 Thread TerryP
On Oct 15, 8:52 pm, Jeremy jlcon...@gmail.com wrote: On Oct 15, 2:15 pm, TerryP bigboss1...@gmail.com wrote: If you want simple sequenceal execution of external programs, use a suitable blocking function to execute them (like system) combined with a simple loop over the sequence of commands

Re: Are there any modules for IRC, that work with Python 3.1?

2009-10-15 Thread TerryP
On Oct 15, 10:36 pm, a...@pythoncraft.com (Aahz) wrote: Why do you think that would be wise?  If library writers haven't upgraded their libraries to 3.1, shouldn't that be a message to you? To me, it generally sends this kind of message: if lib.has_lots_of_users: try:

Re: The rap against while True: loops

2009-10-14 Thread TerryP
Mensanator, thank goodness that was generated :-P -- http://mail.python.org/mailman/listinfo/python-list

Re: The rap against while True: loops

2009-10-14 Thread TerryP
with a for (i=0; i count; i++) versus for (i=0; i count; i--) discussion. By that, I mean: Fruitful conversation but there is no one spoon for every bowl. -- TerryP. Just Another Programmer. -- http://mail.python.org/mailman/listinfo/python-list

Re: Poll on Eval in Python

2009-10-14 Thread TerryP
On Oct 14, 9:48 pm, Kazimir Majorinc em...@false.false wrote: Do you think it would be better if I asked that? That result would be significantly different? Not really. The eval, exec, and compile builtins are more or less related and serve similar purposes, but don't seem to be highly used

Re: python along or bash combined with python (for manipulating files)

2009-10-13 Thread TerryP
is not a factor in what you are writing, then you should probably not be writing code in any language unless it is the language of Mathematics (and even then, maintainability is a wise consideration). -- TerryP. Just Another Programmer. -- http://mail.python.org/mailman/listinfo/python-list

Re: An assessment of Tkinter and IDLE

2009-10-12 Thread TerryP
use Tkinter. Evaluating Tk interfaces under several languages, has been on my todo list for a very long time. There are however other libraries with a more pressing need to be evaluated before they are cycled into projects. -- TerryP. Just Another Programmer -- http://mail.python.org/mailman

Re: start external program from python

2009-10-12 Thread TerryP
On Oct 12, 10:15 am, Bjorn bjornj...@gmail.com wrote: Hi, I woul like to start a program from within python (under linux): This works fine: import os path = 'tclsh AppMain.tcl hej.gb' os.system(path) The file AppMain.tcl is the executable and the file hej.gb is a textfile in the same

Re: Why ELIF?

2009-10-11 Thread TerryP
On Oct 11, 7:07 am, Erik Max Francis m...@alcyone.com wrote: Because that's uglier.  `or` means something completely unrelated in expressions.  Variations of `else if` in `if ... else if ...` chains is routine in computer languages.  Choosing a deliberately different syntax just for the sake

Re: Why ELIF?

2009-10-11 Thread TerryP
of a dictionary. Take a look how the standard 'cmd' module dispatches stuff. I might take flak here, for writing something like 'dict[key] (func_args)' instead of something more Pythonic, but the code serves to express a point, not teach a system of branch of Zen :-P. -- TerryP. Just Another

Re: Is pythonic version of scanf() or sscanf() planned?

2009-10-11 Thread TerryP
On Oct 9, 5:59 pm, Joshua Kugler jos...@joshuakugler.com wrote: ryniek90 wrote: So maybe someone, someday decide to put in Python an alternative, really great implementation ofscanf() ? My idea of a greatscanf() function would be a clever combination of re.match(), int(), and float(). j

Re: Why ELIF?

2009-10-11 Thread TerryP
On Oct 11, 9:43 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sun, 11 Oct 2009 11:15:06 -0700, TerryP wrote: I might take flak here, for writing something like 'dict[key] (func_args)' instead of something more Pythonic, Looking up a first-class function in a dictionary

Re: An assessment of Tkinter and IDLE

2009-10-11 Thread TerryP
(I've never used it) but good documentation and an API that's light on brain damage is the *best* thing to follow up with, next to mind reading ;). -- TerryP. Just Another Programmer -- http://mail.python.org/mailman/listinfo/python-list

Re: vim clientserver [was: best vi / emacs python features]

2009-10-10 Thread TerryP
On Oct 10, 6:13 pm, Chris Jones cjns1...@gmail.com wrote: Hmm.. On *nix systems, decent applications understand the $EDITOR environment variable - don't know about gnome friends, though. I tend to write programs that understand EDITOR, BROWSER, etc; wish the rest of the world did. So what

Are there any modules for IRC, that work with Python 3.1?

2009-10-09 Thread TerryP
Internet Rely Chat client ;) -- TerryP -- http://mail.python.org/mailman/listinfo/python-list

Re: best vi / emacs python features

2009-10-08 Thread TerryP
But in actual practice you use a space cadets editor like Vim.                                         Ross Ridge Actually by space cadets editor, I meant needing one of these: http://en.wikipedia.org/wiki/Space_cadet_keyboard -- TerryP. -- http://mail.python.org/mailman/listinfo/python-list

Re: best vi / emacs python features

2009-10-07 Thread TerryP
up and save on wrist strain. Before I read a tutorial about vi, I used XEmacs very happily---vi just lines up better with how my brain works. -- It is also general consensus that I am nuts ;) TerryP. -- http://mail.python.org/mailman/listinfo/python-list

Re: best vi / emacs python features

2009-10-07 Thread TerryP
On Oct 8, 3:29 am, Chris Jones cjns1...@gmail.com wrote: I do have a question: You mentioned Vim's clientserver mode. What's it good for? It's most valuable for sending data to an existing instance of vim, by name. Both files and keystrokes can be sent fwiw. vim basically organizes it self

Re: Is pythonic version of scanf() or sscanf() planned?

2009-10-05 Thread TerryP
In the last 4 years, I have never missed functions like .*scanf() or atoi(). It's probably a greeaaat thing that Python provides nether as built ins (per se). -- http://mail.python.org/mailman/listinfo/python-list

Re: Skeletal animation

2009-10-04 Thread TerryP
On Oct 4, 10:05 pm, Manowar r_marcanto...@netzero.net wrote: I am new to pyton and have asked this question several times the answer is always not sure. Here is my question sekeltal animation ( bone animation) is it possible with python? What i want to develop is an aquarium in realtime,

Re: The Python: Rag October issue available

2009-10-03 Thread TerryP
On Oct 3, 4:29 pm, Bernie edi...@pythonrag.org wrote: Hi, no -its just put on the website.  Unless there's a method you can suggest? Not to butt in, but off the top of my head, you could probably set up a mailing list and post the link to the file every cycle - simple but effective. --

Re: Looking for documentation tools

2009-10-01 Thread TerryP
A GUI tool that allows me to enter descriptions, arguments, return values etc, for each function, class, etc. in some forms and then generates and inserts the correct comment syntax,  so pydoc can generate the documentation HTML. (preferrably for windows) Maybe I am a bastard, but

Re: Python logging and 1.5.2 compatibility

2009-09-30 Thread TerryP
As long as people can dig up an old version, everything should be fine. It's not like you're asking people to port over a quarter million lines of working code to the latest and untested :-) -- TerryP. -- http://mail.python.org/mailman/listinfo/python-list

Re: print object attributes recursively

2009-09-30 Thread TerryP
On Sep 30, 1:49 pm, Piet van Oostrum p...@cs.uu.nl wrote: I don't know what print_r does, but in your example above print [x.L for x in t.M] would work. Probably you would split this into two methods in X and Y. -- Piet van Oostrum p...@vanoostrum.org WWW:http://pietvanoostrum.com/ PGP

Re: python memory use

2009-09-30 Thread TerryP
Honestly, the only performance data involving Java, that would ever surprise me: is when a Java program takes less time to startup and get going, then the computer it is being run from did ;). When planning-ahead for a project, I look at what performance the language implementations offer, in

Re: pygame and py2app : big package

2009-09-20 Thread TerryP
Pierre-Alain Dorange wrote: Sorry, it was not clear. But i want to know if i can make the package smaller, because the total package weight 59.4 MB just for a small arcade game. You would need to skip or strip out any unneeded components that are being packed. Either by playing with how

Re: Where are python module installed?

2009-09-20 Thread TerryP
Maybe you should try reading the source? -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparison of parsers in python?

2009-09-19 Thread TerryP
can be very important. -- TerryP -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite or files?

2009-09-18 Thread TerryP
, down to writing dictionaries out to a file for later slupin' eval() recovery, which is a method that I have occasionally thrown my hands up at I don't even want to mention some of the commercial products I've bumped into! -- TerryP. -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame and py2app : big package

2009-09-18 Thread TerryP
On Sep 18, 9:28 pm, pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) wrote: I used py2app on Mac to build a package of my game (using pygame). It works fine (better than py2exe, i can'tmake work at tht time). But the package is very big. The biggest thing is numpy lib : 19 MB !

Re: OpenAnything

2009-09-17 Thread TerryP
Read this thread: http://groups.google.com/group/comp.lang.python/browse_thread/thread/445ffc93b0e6a460 and you will likely get the idea. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why indentation is use to denote block of code?

2009-09-14 Thread TerryP
Not to be omega-rude and disrespectful either but if you think tradeoffs made in designing a language, such as the choice of indents or braces to denote blocks, are simple and obvious ones, then you are either a very stupid person, or are trying to vent your anger from the safety of a remote

Re: Retracing your steps in an interactive python env

2009-09-14 Thread TerryP
): ... print(x+y) ... inspect.getsource(foo) (throws IOError: could not get source code) Perhaps someone else has more experience on the matter. -- TerryP. -- http://mail.python.org/mailman/listinfo/python-list

Re: Retracing your steps in an interactive python env

2009-09-14 Thread TerryP
Under unix and cygwin, it's also possible to use GNU Screen, along with a much larger then default defscrollback value. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and 3d

2009-09-13 Thread TerryP
Importing models from a file, obviously always raises the question, what kind of model formats :-P. You should probably take a look at something like Python-Ogre or Pygame for a starting point. Doing raw OpenGL is a bit more tricky and even more dependent on format. --

Re: Article of interest: Python pros/cons for the enterprise

2008-02-20 Thread TerryP
Thanks for the link, was a nice read. Have specialized needs better served by other languages that you already know. For example, if you want to do a lot of text processing and you have a basement full of Perl programmers, there's no compelling reason to switch. Now that really hits the sweet

Re: Critique of first python code

2008-02-16 Thread TerryP
Tomek Paczkowski wrote: You can try to put your code through pylint. It will give you some automatic critique. There is a pylint !? That one is defiantly making my workstation later just for fun hehe. -- There seems no plan because it is all plan. -- C.S. Lewis --

Re: Python GUI toolkit

2008-02-16 Thread TerryP
[EMAIL PROTECTED] wrote: what would be the best python GUI toolkit, it must be cross platform. i have tried gtk, but it interface are real bad and its coding was difficult so i dropped it, the only remaining are qt4 and wx, i would like to know if one of these or any other toolkit is