Re: Using SHFileOperation

2005-07-20 Thread avishay
Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread Dieter Raber
Thanks everybody, I followed the link Waldemar had provided and there I found what I was looking for. Dieter -- http://mail.python.org/mailman/listinfo/python-list

Python Game Programming Challenge update

2005-07-20 Thread pyweek1
There's only one week to go before registration opens for the first Python Game Programming Challenge (also known as PyWeek). That means there's only (checks website) 37 days to go before the challenge starts! If you have a Python-based graphics, sound, music or game library that you'd like to u

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread Peter Hansen
Jp Calderone wrote: > In the particular case of wxWidgets, it turns out that the *GUI* blocks > for long periods of time, preventing the *network* from getting > attention. But I agree with your position for other toolkits, such as > Gtk, Qt, or Tk. Are you simply showing that there are two po

How to limit the uploading file size in python?

2005-07-20 Thread praba kar
Dear All, In Php we can limit the uploading file size by php.ini configuration file. But In python what way we can limit the file uploading size. kindly let me know. regards Prabahar __ How much free photo storage d

Re: Dose someone have installed python on IRIX ?

2005-07-20 Thread hugonz
Hi, No I have not done it before, but no one is able to help you if you do not post what kind of errors you are getting. Basically if it compiled and linked ok, maybe you specified something in the ./configure script that the plattform does not support... Hugo -- http://mail.python.org/mailman/

Re: About undisclosed recipient

2005-07-20 Thread Bartek Ryłko
Hi! Thanks for Your info!! It was very usefull for me! :-) Thanks once again! On 7/9/05, Jeff Epler <[EMAIL PROTECTED]> wrote: > You provided far too little information for us to be able to help. > > If you are using smtplib, it doesn't even look at message's headers to > find the recipient list;

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread Donn Cave
Quoth Paul Rubin : | Christopher Subich <[EMAIL PROTECTED]> writes: | > > In the particular case of wxWidgets, it turns out that the *GUI* | > > blocks for long periods of time, preventing the *network* from | > > getting attention. But I agree with your position for othe

Generating images with text in them

2005-07-20 Thread phil hunt
I am trying to generate some images (gifs or pngs) with text in them. I can use the Python Imaging Library, but it only has access to the default, rather crappy, font. Ideally I'd like to use one of the nicer fonts that come with my X Windows installation. Using Tkinter I can draw these fonts

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread Paul Rubin
Christopher Subich <[EMAIL PROTECTED]> writes: > > In the particular case of wxWidgets, it turns out that the *GUI* > > blocks for long periods of time, preventing the *network* from > > getting attention. But I agree with your position for other > > toolkits, such as Gtk, Qt, or Tk. > > Wow, I'm

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread Christopher Subich
Jp Calderone wrote: > In the particular case of wxWidgets, it turns out that the *GUI* blocks > for long periods of time, preventing the *network* from getting > attention. But I agree with your position for other toolkits, such as > Gtk, Qt, or Tk. Wow, I'm not familiar with wxWidgets; how's

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread Jp Calderone
On Thu, 21 Jul 2005 00:18:58 -0400, Christopher Subich <[EMAIL PROTECTED]> wrote: >Peter Hansen wrote: >> stringy wrote: >> >>> I have a program that shows a 3d representation of a cell, depending on >>> some data that it receives from some C++. It runs with wx.timer(500), >>> and on wx.EVT_TIMER,

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread Christopher Subich
Peter Hansen wrote: > stringy wrote: > >> I have a program that shows a 3d representation of a cell, depending on >> some data that it receives from some C++. It runs with wx.timer(500), >> and on wx.EVT_TIMER, it updates the the data, and receives it over the >> socket. > > > It's generally ina

Weekly Python Patch/Bug Summary

2005-07-20 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 350 open ( +1) / 2882 closed ( +2) / 3232 total ( +3) Bugs: 889 open ( -8) / 5141 closed (+22) / 6030 total (+14) RFE : 189 open ( -5) / 178 closed ( +8) / 367 total ( +3) New / Reopened Patches __ Add unico

Re: interactive python session spool/save-log command?

2005-07-20 Thread Brian van den Broek
Robert Kern said unto the world upon 2005-07-20 21:15: > S. M. Tuttle wrote: > >>I'm going to be teaching an introductory course on Python >>in the Fall, so I am hurriedly trying to both learn >>Python and prepare the course during the next few weeks. >> >>I'm curious if there is a command that al

Re: Python IDE

2005-07-20 Thread Stani
Try out the new version of SPE 0.7.4.a. You would make me happy if you can make it crash. (But not by running crashing programs or infinitive loops inside spe.) http://www.stani.be/python/spe Ciao, Stani -- http://mail.python.org/mailman/listinfo/python-list

Re: Copying attributes

2005-07-20 Thread Terry Hancock
On Wednesday 20 July 2005 05:45 pm, red wrote: > Everything seems be ok, but i'm getting: > > Traceback (most recent call last): > File "", line 169, in write > File "", line 102, in build_face_table > AttributeError: normal > > I was wondering why? I'm not sure either, yet, but can you

Re: Newbie question about lists

2005-07-20 Thread Robert Kern
Paul Rubin wrote: > "Leo Jay" <[EMAIL PROTECTED]> writes: > >>[Decimal("0.25"), Decimal("0.10"), Decimal("0.05"), Decimal("0.01")] > > I wonder if we should have some special syntax for decimals: maybe > > [$.25, $.10, $.05, $.01] > > That would even fit in with decimals being used for financi

Re: Newbie question about lists

2005-07-20 Thread Leo Jay
IMO, python should use the decimal for default. .25 is right for Decimal(".25"). isn't that better? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question about lists

2005-07-20 Thread Paul Rubin
"Leo Jay" <[EMAIL PROTECTED]> writes: > [Decimal("0.25"), Decimal("0.10"), Decimal("0.05"), Decimal("0.01")] I wonder if we should have some special syntax for decimals: maybe [$.25, $.10, $.05, $.01] That would even fit in with decimals being used for financial quantities. -- http://mail.pyth

Re: interactive python session spool/save-log command?

2005-07-20 Thread Robert Kern
S. M. Tuttle wrote: > I'm going to be teaching an introductory course on Python > in the Fall, so I am hurriedly trying to both learn > Python and prepare the course during the next few weeks. > > I'm curious if there is a command that allows everything from > that point on in a python interactive

Re: Newbie question about lists

2005-07-20 Thread Leo Jay
you may use the decimal module which was introduced in Python2.4 >>> from decimal import * >>> li = [Decimal(".25"), Decimal(".10"), Decimal(".05"), Decimal(".01")] >>> print li [Decimal("0.25"), Decimal("0.10"), Decimal("0.05"), Decimal("0.01")] >>> -- http://mail.python.org/mailman/listinfo/p

interactive python session spool/save-log command?

2005-07-20 Thread S. M. Tuttle
I'm going to be teaching an introductory course on Python in the Fall, so I am hurriedly trying to both learn Python and prepare the course during the next few weeks. I'm curious if there is a command that allows everything from that point on in a python interactive session to be saved/spooled/for

Re: How to use octave in python

2005-07-20 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi, > > I want to use octave to read a file and do some matrix operation. My > question is, how do I do it inside my python script? Also, can I write > octave line by line in python without having to write the octave code > in another script and then call it in the py

Re: Newbie question about lists

2005-07-20 Thread Austin
Well, that answers that. Thank you! -- http://mail.python.org/mailman/listinfo/python-list

How to use octave in python

2005-07-20 Thread [EMAIL PROTECTED]
Hi, I want to use octave to read a file and do some matrix operation. My question is, how do I do it inside my python script? Also, can I write octave line by line in python without having to write the octave code in another script and then call it in the python script? Thanks in advance --

Re: returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
I can now pass and return quite a few types except object instances: my python code gets to the point where I do: def Get_Obj(self): . return an_object My VB code looks like Dim obj as Variant obj = acom.Get_Obj() I get an "unexpected Python error . Objects of type 'instance'

ANN: SPE 0.7.4.a Python IDE

2005-07-20 Thread Stani
Quick release for wxPython2.6, use at your own risk Major bugfix release for wxPython 2.6+ and Mac Os X (This version doesn't work for sure with wxPython versions lower than 2.5.4.1) Bug reports which are related to wxPython 2.6- will be ignored. SPE has a new website: http://www.stani.be/python/

Re: Newbie question about lists

2005-07-20 Thread Robert Kern
Austin Cox wrote: > Hello, I just started with python and have run into a problem using > lists. > > If I enter: > li = [.25,.10,.05,.01] > and then enter: > print li > it'll output: > [0.25, 0.10001, 0.050003, 0.01] > > Can anyone tell me why it does this, and

Newbie question about lists

2005-07-20 Thread Austin Cox
Hello, I just started with python and have run into a problem using lists. If I enter: li = [.25,.10,.05,.01] and then enter: print li it'll output: [0.25, 0.10001, 0.050003, 0.01] Can anyone tell me why it does this, and how I can get just the value .10, and .

Re: goto

2005-07-20 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Sybren Stuvel wrote: >> Mike Meyer enlightened us with: >> I dislike gotos because it is too easy to inadvertently create infinite loops. <10 WINK; 20 GOTO 10> >>> >>>And it's impossible without them? >> I thought the same thing, but then I read

Re: is this pythonic?

2005-07-20 Thread Peter Hansen
Terry Reedy wrote: >>Wow, I didn't know about enumerate. > > It is listed and explained in Lib Ref Manual, Chapter 2, on builtin > functions and types and their methods. Everyone should read at least that > much of the Lib manual. Or be sure to read the "What's New in Python X.Y" pages that ar

Copying attributes

2005-07-20 Thread red
Hi, I'm writing a script for Blender and need to build a face array. My engine needs that all faces must be triangles, so I convert quads to triangles by dividing them into two triangles. Here is the function: def build_face_table(mesh): face_table = {} i = 0 for f in me

Re: Lots of pdf files

2005-07-20 Thread Bruce Stephens
Paul Rubin writes: > Greg Lindstrom <[EMAIL PROTECTED]> writes: >> There does not appear to be a simple way to merge many pdf's into one. > > There's probably some way to do it with pstops or some related program > or set of programs. The pdftk manpage gives this as one

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread Peter Hansen
stringy wrote: > I have a program that shows a 3d representation of a cell, depending on > some data that it receives from some C++. It runs with wx.timer(500), > and on wx.EVT_TIMER, it updates the the data, and receives it over the > socket. It's generally inappropriate to have a GUI program do

File Table List in Plone

2005-07-20 Thread groups
All, Is there is a Plone type or product for generating a file list on a plone page, eg: a list of downloadable files in a table? An example of what I want can be found at http://www.zope.org/Members/MacGregor/ExtFile under "Available Releases" where a list of files resides. Is this a manually g

native hotshot stats module

2005-07-20 Thread Floris Bruynooghe
As part of my Google Summer of Code project I have developed a hstats module. It reads a file with profile data saved by hotshot and displays statistics of it after sorting it. The current interface is very basic in the philosophy of You Arent Gonna Need It[1]. So my question here is: please tes

Filling up commands.getstatusoutput's buffer

2005-07-20 Thread travislspencer
Hey, Has anyone ever had commands.getstatusoutput's buffer fill up when executing a verbose command? If so, what workaround did you use? Did you just pipe the output into a file and then read it in or fork a processes or something else? -- Regards, Travis Spencer -- http://mail.python.org/ma

Re: mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread Luis M. Gonzalez
Dieter Raber wrote: > Hi there, > > I am wondering if there is a mod_python for the above configuration. I > downloaded mod_python-3.1.3.win32-py2.3.exe, which of course as the > name implies keeps on asking me for a python 2.3 installation. I > imagine one could cheat a little bit with a fake re

Re: mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread [EMAIL PROTECTED]
Dieter Raber wrote: > Hi there, > > I am wondering if there is a mod_python for the above configuration. I > downloaded mod_python-3.1.3.win32-py2.3.exe, which of course as the > name implies keeps on asking me for a python 2.3 installation. I > imagine one could cheat a little bit with a fake regi

Re: mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread Luis M. Gonzalez
Dieter Raber wrote: > Hi there, > > I am wondering if there is a mod_python for the above configuration. I > downloaded mod_python-3.1.3.win32-py2.3.exe, which of course as the > name implies keeps on asking me for a python 2.3 installation. I > imagine one could cheat a little bit with a fake re

Re: is this pythonic?

2005-07-20 Thread Terry Reedy
> Wow, I didn't know about enumerate. It is listed and explained in Lib Ref Manual, Chapter 2, on builtin functions and types and their methods. Everyone should read at least that much of the Lib manual. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows command line problem

2005-07-20 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I think the lesson there is 'dont depend on getopt, write your own > command line parser'. I always write my own, as it's so easy to do. > I suppose you built your own car so you could get out a bit, too? After all, there's nothing tricky about a simple internal combust

Re: Lots of pdf files

2005-07-20 Thread Paul Rubin
Greg Lindstrom <[EMAIL PROTECTED]> writes: > There does not appear to be a simple way to merge many pdf's into one. There's probably some way to do it with pstops or some related program or set of programs. -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread Steve Holden
Dieter Raber wrote: > Hi there, > > I am wondering if there is a mod_python for the above configuration. I > downloaded mod_python-3.1.3.win32-py2.3.exe, which of course as the > name implies keeps on asking me for a python 2.3 installation. I > imagine one could cheat a little bit with a fake reg

Re: What does "::" mean?

2005-07-20 Thread Robert Kern
Rob Williscroft wrote: > import sys > > live = 'live' > > print live[ sys.maxint : : -1 ] > print live[ len(live)-1 : : -1 ] > > print live[ len(live)-1 : -len(live)-1 : -1 ] > print live[ len(live)-1 : -sys.maxint : -1 ] > print live[ sys.maxint : -sys.maxint : -1

Re: python certification

2005-07-20 Thread egbert
On Wed, Jul 20, 2005 at 08:06:51AM -0700, Kay Schluehr wrote: > Andreas Kostyrka schrieb: > > > (These are the people look for Pearl and Pyhton programmers ;) ) > > Or Phyton :) In 2000 we had already the Phyththon Misspelling Contest. I presented then a regexp that could check if we were talkin

Dr. Dobb's Python-URL! - weekly Python news and links (Jul 20)

2005-07-20 Thread Simon Brunning
QOTW: "Discussing goto statements and Microsoft together is like mixing dynamite and gasoline." - DH '"Spaghetti" doesn't quite describe it. I've settled on "Lovecraftian": reading the code, you can't help but get the impression of writhing tentacles and impossible angles.' - Robert Kern Hig

Re: What does "::" mean?

2005-07-20 Thread Rob Williscroft
Robert Kern wrote in news:mailman.1954.1121875043.10512.python- [EMAIL PROTECTED] in comp.lang.python: > [EMAIL PROTECTED] wrote: >> Hi Robert, >> I didn't succeed in reversing a string with the "full form" you >> proposed: >> live[len(live)-1:-1:-1] # where live="live" >> The result is an emp

looking for an introduction to python book

2005-07-20 Thread David Fickbohm
People, I am looking for an introduction to python book.  Hopefully with a windows orientation ThanksDaveDave FickbohmUse Technology to the Fullest1250 45th st suite 200Emeryville, CA, 94608510 594 4151 voice Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard.-- http://mail.pyth

Re: Printing a variable's name not its value

2005-07-20 Thread travislspencer
[EMAIL PROTECTED] wrote: > Bruno Desthuilliers wrote: > > def printVerbose(*args, **kwargs): > > > > > if VERBOSE in globals: > > > for a in args: > > > if a in globals: > > > value = globals[a] > > for k, v in kwargs.iteritems(): > > >

Re: Lots of pdf files

2005-07-20 Thread Wojciech Mula
Greg Lindstrom wrote: > There does not appear to be a simple way to merge many pdf's into one. Program pdftk can merge pdf's, but I have never tried it. You may also use pdflatex --- there is a package called pdfpages provides powerful command \includepdf. w. -- http://mail.python.org/mailman/

Re: python certification

2005-07-20 Thread Adrian Flanagan
[EMAIL PROTECTED] wrote: > i want to get a small certificate or diploma in python. I can recommend brainbench.com (http://www.brainbench.com, of course) for certifications that are both respected and reasonably priced. Only drawback: their Python certification is for version 1.5! They have got

Re: Printing a variable's name not its value

2005-07-20 Thread tiissa
Simon Dahlbacka wrote: > as you have been told, there is no way to get a variable's name Well, if you really want to, you can get all the names bound to a given object: def get_names(obj): g = globals() names = [] for name in g: if g[name] is obj: names.appe

Re: returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
Sorry, it was in the book: Variant ! Regards; Philippe Philippe C. Martin wrote: > Hi, > > Is it possible ? > > ex: return ['1','2'] > > If so which type should I use in VB ? > > dim res as ??? > > Set testObj = CreateObject("") > > res = testObj.AMethodThatReturnsAListOfStrings

Re: is this pythonic?

2005-07-20 Thread Bill Mill
On 7/20/05, Bill Mill <[EMAIL PROTECTED]> wrote: > On 7/20/05, Simon Brunning <[EMAIL PROTECTED]> wrote: > > On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: > > > Or is there better way? > > > > > > for (i, url) in [(i,links[i]) for i in range(len(links))]: > > > > for i, url in enumerate(links): > > >

Re: is this pythonic?

2005-07-20 Thread Bill Mill
On 7/20/05, Simon Brunning <[EMAIL PROTECTED]> wrote: > On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: > > Or is there better way? > > > > for (i, url) in [(i,links[i]) for i in range(len(links))]: > > for i, url in enumerate(links): > +2 for creating seeing a need and crafting a reasonable solutio

Re: convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Hi Robert, Hans-Peter Jansen wrote: > Robert Kern wrote: > > That did the trick, thanks a lot, Peter. Unfortunately, on the s/Peter/Robert/g Sorry, Robert. That's the price to pay for doing multiple replies at the same time. Mea culpa.. > target system, there's still python 2.0 running :-( Lo

Re: wxPython && wxGlade

2005-07-20 Thread Simon Dahlbacka
basically, you can just stack an outer vertical box sizer with two items and in the upper "slot" you put a horizontal box sizer with your two buttons and in the bottom slot you put the big button hope this helps /Simon ps. as this is a wxpython related question, you might get better answers on t

returning list of strings from Python COM to Visual basic 6

2005-07-20 Thread Philippe C. Martin
Hi, Is it possible ? ex: return ['1','2'] If so which type should I use in VB ? dim res as ??? Set testObj = CreateObject("") res = testObj.AMethodThatReturnsAListOfStrings() Thanks, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Lots of pdf files

2005-07-20 Thread Greg Lindstrom
Hello- I'm running Python 2.3 on a Linux system and have lots (about 2000) files in pdf format to print each day. If I just wind up and fire all the files at the printer at once (as 2000 separate print jobs), the print server throws a fit and our system admin comes down and slaps me around for

mod_python Apache/2.0.52 (Win32) Python 2.4

2005-07-20 Thread Dieter Raber
Hi there, I am wondering if there is a mod_python for the above configuration. I downloaded mod_python-3.1.3.win32-py2.3.exe, which of course as the name implies keeps on asking me for a python 2.3 installation. I imagine one could cheat a little bit with a fake registry entry that says it was abo

Re: is this pythonic?

2005-07-20 Thread Caleb Hattingh
Wow, I didn't know about enumerate. Many thanks Caleb On Wed, 20 Jul 2005 15:19:50 +0200, Simon Brunning <[EMAIL PROTECTED]> wrote: > On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: >> Or is there better way? >> >> for (i, url) in [(i,links[i]) for i in range(len(links))]: > > for i, url in enumer

Re: Printing a variable's name not its value

2005-07-20 Thread travislspencer
Simon Dahlbacka wrote: > as you have been told, there is no way to get a variable's name, take a > look at http://effbot.org/zone/python-objects.htm to find out why this > is so. Thanks, Simon, for the link. -- Regards, Travis Spencer -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing a variable's name not its value

2005-07-20 Thread travislspencer
Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > > globals = {} > > globals() is a builtin function, you should no shadow it. Oh, woops. I'll fix that. > def printVerbose(*args, **kwargs): > > > if VERBOSE in globals: > > for a in args: > > if a in globals: > >

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 7/20/05, Cyril Bazin <[EMAIL PROTECTED]> wrote: > The question of the type of the data sutructure depends of your use of the > data. > You could avoid some confusion without naming your columns "lines"... Yes, that is because they are "plant lines", that is why is called "lines" :) > Anyway

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Cyril Bazin
The question of the type of the data sutructure depends of your use of the data. You could avoid some confusion without naming your columns "lines"... Anyway, here is a piece of code that read the file and count the star on the fly: (The result is a dict of dict of int.)

Re: Printing a variable's name not its value

2005-07-20 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hey, > > I am trying to write a function that takes an arbitrary number of > arguments and does one of two things. If the variable is a key in a > dictionary, it prints the key and its value. Otherwise, if any of the > variables isn't in the dictionary, the function

Re: Python IDE

2005-07-20 Thread Florian Diesch
linuxfreak <[EMAIL PROTECTED]> wrote: >Got going with python...and i must say its a pretty cool language. > Been using Xemacs to write me programs. But I want an IDE that would I'm using GNU emacs > give me auto-completion, Read the manual about tags and abbrevs Emacs Language Sensitive Edi

Re: OO design

2005-07-20 Thread Florian Diesch
chris <[EMAIL PROTECTED]> wrote: > I've been scripting with python for a while now. Basically writing a few > functions and running in the ipython shell. That's been very useful. But the > more I do this the more I see that I'm doing more or less the same thing > over and over again. So its feels l

wxPython && wxGlade

2005-07-20 Thread Mike L.G.
Hello! Is there a way to span columns using wxGlade? I'd like to get a layout that looks like this: |---| ||-||--|| ||edit ||button|| ||-||--|| ||-|| || button|| ||-|| |---| I would like the 2nd button on the 2nd row to span

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 20 Jul 2005 11:51:56 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote: > You get the idea: model the data in the way that makes it most useable > to you, and/or most efficient (if this is a large data set). I don't think this could be called a large dataset (about 40Kb all the file). It would b

Re: Printing a variable's name not its value

2005-07-20 Thread Simon Dahlbacka
as you have been told, there is no way to get a variable's name, take a look at http://effbot.org/zone/python-objects.htm to find out why this is so. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Graham Fawcett
Sebastian Bassi wrote: > On 20 Jul 2005 10:47:50 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote: > > This looks a lot like 2D data (row/column), not 3D. What's the third > > axis? It looks, too, that you're not really interested in storage, but > > in analysis... > > I think it as 3D like this: >

Printing a variable's name not its value

2005-07-20 Thread travislspencer
Hey, I am trying to write a function that takes an arbitrary number of arguments and does one of two things. If the variable is a key in a dictionary, it prints the key and its value. Otherwise, if any of the variables isn't in the dictionary, the function prints the variable's name and value.

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 20 Jul 2005 10:47:50 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote: > # zip is your friend here. It lets you iterate > # across your line names and corresponding values > # in parallel. This zip function is new to me, the only zip I knew was pkzip :). So will read about it. --

Re: OO design

2005-07-20 Thread Terry Hancock
On Wednesday 20 July 2005 07:22 am, chris wrote: > Also minor clarifications:: > > > I'm hoping some of you python > > lamas out there might be able to share some of your wisdom on the subject. > > lama = guru = teacher(not a furry animal, although my dog has certainly > taught me a few trick

EasyDialogs in MacOSX Tiger

2005-07-20 Thread Ian A. York
When I use EasyDialogs.Message in OSX (10.4.2), I have to manually switch to Python, the icon for which jumps in the dock until I click it. This is the case using pythonw with either 2.3 or 2.4. This question has come up before ("EasyDialogs module problem with python 2.4.1", April 18/05),

Re: access the text being generated in other windows

2005-07-20 Thread algebraist
yeah, someone else mentioned getting the window's handle (can use spyxx.exe for this) and then using hooks... but i'm not sure where to go to learn about using window hooks, in python (or in general, actually)... is this 'downright dirty screen scraping'? -- http://mail.python.org/mailman/listin

Re: convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Robert Kern wrote: > Hans-Peter Jansen wrote: >> Hi Pythonistas, >> >> I need to convert ascii escapes into binary form, e.g.: >> \f -> ^L >> [EMAIL PROTECTED] -> [EMAIL PROTECTED]@ >> >> (rvalues in terminal representation) >> >> Any idea, how to do this most elegantly in python? >> Do I reall

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Sebastian Bassi
On 20 Jul 2005 10:47:50 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote: > This looks a lot like 2D data (row/column), not 3D. What's the third > axis? It looks, too, that you're not really interested in storage, but > in analysis... I think it as 3D like this: 1st axis: [MARKER]Name, like TDF1,

Re: Using SHFileOperation

2005-07-20 Thread Roger Upole
SHFILEOPSTRUCT is just a tuple, with the elements listed in docs. from win32com.shell import shell, shellcon shell.SHFileOperation((0, shellcon.FO_DELETE, 'somefilename', None, shellcon.FOF_ALLOWUNDO|shellcon.FOF_NOCONFIRMATION)) hth Roger "avishay" <[EMAIL PROTECTED]> wrote in messag

Re: How to store "3D" data? (data structure question)

2005-07-20 Thread Graham Fawcett
Sebastian Bassi wrote: > Hello, > > I have to parse a text file (was excel, but I translated to CSV) like > the one below, and I am not sure how to store it (to manipulate it > later). > > Here is an extract of the data: > [snip] This looks a lot like 2D data (row/column), not 3D. What's the third

Re: Need to interrupt to check for mouse movement

2005-07-20 Thread MooMaster
Have you tried binding EVT_MOTION(func) to your window? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie - chapter 19 in "How to think like a CS in python"

2005-07-20 Thread MooMaster
Well, being a lowly CS student myself this sounded like fun, so I went ahead and took the challenge. The first thing you have to consider is how to add the new element to the list. Obviously you have to iterate through the list, find the first element that the new one is greater than, and insert th

Re: main window in tkinter app

2005-07-20 Thread Christopher Subich
William Gill wrote: > That does it!, thanks. > > Thinking about it, when I created a derived class with an __init__ > method, I overrode the base class's init. It should have been > intuitive that I needed to explicitly call baseclass.__init(self), it > wasn't. It might have hit me if the f

Re: convert ascii escapes into binary form

2005-07-20 Thread Robert Kern
Hans-Peter Jansen wrote: > Hi Pythonistas, > > I need to convert ascii escapes into binary form, e.g.: > \f -> ^L > [EMAIL PROTECTED] -> [EMAIL PROTECTED]@ > > (rvalues in terminal representation) > > Any idea, how to do this most elegantly in python? > Do I really need to do a search n'replace

How to store "3D" data? (data structure question)

2005-07-20 Thread Sebastian Bassi
Hello, I have to parse a text file (was excel, but I translated to CSV) like the one below, and I am not sure how to store it (to manipulate it later). Here is an extract of the data: Name,Allele,RHA280,RHA801,RHA373,RHA377,HA383 TDF1,181, ,188, ,190, ,193,*,*,,, ,None,,,*,*,* ,,

Re: Newbie question: Explain this behavior - a followup

2005-07-20 Thread David Smith
max wrote: > David Smith <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > >>range statements, the example doesn't work. >> >>Given that the beginning and ending values for the inner range >>statement are the same, the inner range statement will never be > > > Is your question about t

Re: python certification

2005-07-20 Thread Sebastian Bassi
On 16 Jul 2005 09:51:55 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > i want to get a small certificate or diploma in python. > it should be online cuz i live in pakistan and wont have teast centers > near me. > it should be low cost as i am not rich. > and hopefully it would be something l

convert ascii escapes into binary form

2005-07-20 Thread Hans-Peter Jansen
Hi Pythonistas, I need to convert ascii escapes into binary form, e.g.: \f -> ^L [EMAIL PROTECTED] -> [EMAIL PROTECTED]@ (rvalues in terminal representation) Any idea, how to do this most elegantly in python? Do I really need to do a search n'replace orgy, combined with regex for this task? TI

ANN: PyDev 0.9.6 released

2005-07-20 Thread Fabio Zadrozny
Hi All, PyDev - Python IDE (Python Development Enviroment for Eclipse) version 0.9.6 has just been released. This is to be considered a stable release for all features but the debugger, as there are still some integration issues for it to work with Eclipse 3.1, so, if you are using PyDev becau

Re: Image orientation and color information with PIL?

2005-07-20 Thread tvmaly
Jeff, this was exactly what I was looking for. I wrote a script with this code and it worked perfectly. Thanks Ty -- http://mail.python.org/mailman/listinfo/python-list

Re: What does "::" mean?

2005-07-20 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hi Robert, > I didn't succeed in reversing a string with the "full form" you > proposed: > live[len(live)-1:-1:-1] # where live="live" > The result is an empty string. > To reverse "live" (in a "full form"), I have to put a char in front of > the string and...: > ('x

Need to interrupt to check for mouse movement

2005-07-20 Thread stringy
I have a program that shows a 3d representation of a cell, depending on some data that it receives from some C++. It runs with wx.timer(500), and on wx.EVT_TIMER, it updates the the data, and receives it over the socket. In my program I also want to be able to rotate the 3d representation, and can

Re: What does "::" mean?

2005-07-20 Thread qwweeeit
Hi Robert, I didn't succeed in reversing a string with the "full form" you proposed: live[len(live)-1:-1:-1] # where live="live" The result is an empty string. To reverse "live" (in a "full form"), I have to put a char in front of the string and...: ('x'+live)[len(live)+1:0:-1] # --> "evil"

Re: getting the class name of a subclass

2005-07-20 Thread Dan Sommers
On Wed, 20 Jul 2005 14:06:57 GMT, flupke <[EMAIL PROTECTED]> wrote: > file class_name.py > > class A(object): > def __init__(self): > print "I'm A" > def printclass(self): > print "Name ",__name__ > print "Class ",A.__name__ Why "A.__

Re: wxPython field validation

2005-07-20 Thread fred.dixon
why not validate then put cursor back into that field until satisfied. might use the lost focus (cant remember exact name right now) -- http://mail.python.org/mailman/listinfo/python-list

Re: getting the class name of a subclass

2005-07-20 Thread flupke
George Sakkis wrote: > Make printclass a class method: > > class A(object): > def __init__(self): > print "I'm A" > > # for python 2.4 > @classmethod > def printclass(cls): > print "Module", cls.__module__ > print "Class", cls.__name__ > # for 2.3 or

Re: getting the class name of a subclass

2005-07-20 Thread George Sakkis
"flupke" <[EMAIL PROTECTED]> wrote: > I have the following test code setup, trying to get the class name of a > subclass in the super class. (Reason why i want this is described below) > > file class_name_start.py > > import class_name as cn > > obj = cn.B() > obj.printcla

  1   2   >