Python and DevTrack?

2005-11-01 Thread warpcat
I'm a python nubie, so be gental.  I've been setting up functionality
by managing my Perforce clientspec with python (since it seems all of
P4's commands are avaliable at the prompt), and I'd love to get access
to DevTrack in the same way, but it's looking like it's off limits, UI
only.  Does anyone have any experience with this?  Much appreciated.  I
have searched the posts, came up with nothing.
Thanks!

-- 
http://mail.python.org/mailman/listinfo/python-list


better Python IDE? Mimics Maya's script editor?

2006-06-08 Thread warpcat
I've been scripting in Maya, via mel for years now.  Recently learning
to Python, love it.  Thing that's driving me nuts it the IDE.  I'm
using PythonWin right now and trying to find something better, mainly
with this functionality:

In Maya's mel script editor window, it's split into two sections.
Bottom window you can enter commands (where your script lives), top
window gives results.  The thing I'm really used to is highlighting X#
of lines in the bottom window (little snippits from my script), and
executing that selection, with instant feedback of the results on top.
This really speeds my workflow.
It seems completely missing (so far) in Python's IDE.  I have to copy
and paste from a script to the ide window to execute and see the
results, or I have to make a bunch of "buffer scripts" with just the
code snippetsI want to test in.  Seems *really* clunky.

Does anyone know of a scripting enviroment for Python that mimics what
Maya's script editor has?  Much appreciated.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: better Python IDE? Mimics Maya's script editor?

2006-06-14 Thread warpcat
I'm not sure where you got "pythonwin sucks" from my text (none of
those words are there).  Saying one aspect of a piece of software is
clunky to "me" (if that's what you're refering too?) or saying the
whole software "sucks" are pretty different IMO.  All I stated is that
it's very different from how I'm used to working.  I didn't mean any
disrespect, but I do appreciate your info!

Steve Holden wrote:

> You might also wish to reconsider your approach to the Python community.
> "PythonWin sucks" isn't my idea of how to win friends and influence
> people in a first posting to a usenet newsgroup. By and large we are a
> friendly bunch here, but you don't want to start off on the wrong foot :-)
>
> regards
>   Steve
> --
> Steve Holden   +44 150 684 7255  +1 800 494 3119
> Holden Web LLC/Ltd  http://www.holdenweb.com
> Love me, love my blog  http://holdenweb.blogspot.com
> Recent Ramblings http://del.icio.us/steve.holden

-- 
http://mail.python.org/mailman/listinfo/python-list


object query assigned variable name?

2009-05-01 Thread warpcat
I've passed this around some other groups, and I'm being told
"probably not possible".  But I thought I'd try here as well :)   I
*did* search first, and found several similar threads, but they
quickly tangented into other specifics of the language that were a bit
over my head :)  At any rate, here's a simple example, I'd love to
know if as shown, is somehow possible:

Given an object:

class Spam(object):
def __init__(self):
# stuff

I'd like it to print, when instanced, something like this:

>>> s = Spam()
I’m assigned to s!

But it seems prohibitively hard (based on my web and forum searches)
for an object to know what variable name is has been assigned to when
created.  Querying 'self' in __init__ returns a memory location, not
the variable name passed in.

If you're wondering why I'm trying to figure this out, this is just
part of my continued learning of the language and pushing the bounds,
to see what is possible ;)

Any thoughts?
--
http://mail.python.org/mailman/listinfo/python-list


Re: Query screen resolution?

2009-08-28 Thread Warpcat
On Aug 28, 11:27 am, "Rami Chowdhury" 
wrote:
> > But I was hoping for something built-in, and something non-OS
> > specific.
>
> I don't know about built-ins, but I do believe that pygame (which *is*  
> cross-platform) will let you get at that information:
>        http://www.pygame.org/docs/ref/display.html#pygame.display.Info

Actually, I just came up with another hack using PyGame as well like
so:

screen = pygame.display.set_mode((0,0))
WIDTH, HEIGHT = screen.get_size()

If you pass zero values into the resolution, it will pop to the
current screen resolution.  And since I'm making a PyGame app, this
actually works out ok.  However, querying the current_w & current_h
attrs from the Info object is a lot cleaner (I was unaware of that,
thanks!)

But I'd sure like to know if there is built-in way.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Query screen resolution?

2009-08-28 Thread Warpcat
> Your question is based upon the notion that "the screen" is a meaningful
> concept. Once you move away from Windows (and systems which intentionally
> try to be like Windows), that's no longer true.

Good points.  Always something I haven't thought of.  Ok so... let's
*presume* the user has a measurable screen on win\mac\linux\etc since
on any other OS they wouldn't be running the app
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Query screen resolution?

2009-09-07 Thread Warpcat
> If it's a GUI app, you ask the GUI toolkit which you're using.

Heh, I suppose you're right :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: iterate over list while changing it

2009-09-25 Thread Warpcat
iterate over a copy of the list:

for i, x in enumerate(a[:]):

Always worked for me ;)
-- 
http://mail.python.org/mailman/listinfo/python-list