Re: Listing subtypes

2007-11-28 Thread Samuel
On Nov 29, 1:54 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > print A.__subclasses__() Ah, I knew I had seen this before. Thanks! -Samuel -- http://mail.python.org/mailman/listinfo/python-list

Re: Listing subtypes

2007-11-28 Thread Paddy
On Nov 29, 1:09 am, Ben Finney <[EMAIL PROTECTED]> wrote: > "Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > > > Ben Finney schrieb: > > > A class knows its parents; it doesn't know its children. (Or, in > > > other words, children need to know who their parents are, but > > > aren't required to no

How to access nested structural members from python

2007-11-28 Thread abarun22
Hi I would like to know if there are any ways to access the members of a nested structure inside python. I use SWIG as interface for C. My structure comes as follows. struct SA{ int nb_dep, max_dep SB *b } struct SB{ int id[10], node, kg; double dep[3]; } I have written a C helper function like t

tip of the day generator

2007-11-28 Thread Joseph king
thanks for all the help... -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile Cheetah Template on Windows

2007-11-28 Thread brianrpsgt1
Tim, thank you very much for the reply. The 'cheetah' function is now working! I am still having a problem creating the file. I continually get errors. I am sure that it is something very simple. Below is the code, please guide me in the right direction :: import psycopg2, psycopg2.extens

Fwd: Frame/Dialog with Tabs

2007-11-28 Thread tarun
Hello, Can anyone help with a *sample wxpython code* that can create a frame/dailog with tabs. Something similar in the attachment. Thanks & Regards, Tarun <>-- http://mail.python.org/mailman/listinfo/python-list

Bundling Python on Mac

2007-11-28 Thread Benjamin
Hello, I'm writing a Python/PyQt application. For my Mac distribution. I would like to include all the needed libraries in the Mac bundle. How should I go about doing this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter, wxPython, PyGtk, or PyQt...

2007-11-28 Thread Benjamin
John Jameson wrote: > hi carl, > > I'm totally new with graphics for python. I'm using windows, but you > make it sound like I need to know how to program with MFC to use them? > Is this true? Can't you just stay in python? Yes, all of the libraries below let you stay in Python. (They have binary

Re: How to Teach Python "Variables"

2007-11-28 Thread MonkeeSage
On Nov 28, 8:35 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Nov 27, 5:31 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > > > Of course. But then it really depends on the teaching methodology, > > doesn't it? There is no reason (well, barring the restraints of the > > curriculum vitea), that one s

Re: Very basic, sorting a list ???

2007-11-28 Thread i3dmaster
On Nov 28, 4:22 pm, stef mientki <[EMAIL PROTECTED]> wrote: > hello, > > I'm trying to sort a list, using the same list at the commandline works, > but in a program it doesn't. > > Here is the code > print 'xx1',type(ordered_list) > print 'xx2',ordered_list > print 'xx3',ordered_list.so

Any Pythonista knowing Estonian on this list?

2007-11-28 Thread André
Some of the tasks that are part of Google's H.O.P. involved translation (i18n) of some well-known ... and some lesser known projects. I have received a translation in Estonian for Crunchy - probably of the order of a 100 phrases. I just want to make sure that no practical joke has been played in

Tkinter, wxPython, PyGtk, or PyQt...

2007-11-28 Thread John Jameson
hi carl, I'm totally new with graphics for python. I'm using windows, but you make it sound like I need to know how to program with MFC to use them? Is this true? Can't you just stay in python? best, John I would like like to start doing some GUI-programming in Python, but don't know which lib

MySQLdb autocommit and SELECT problems

2007-11-28 Thread Jesse Lehrman
I'm experiencing strange behavior using MySQLdb. If I turn off autocommit for my connection, I get stale data when I perform multiple and identical SELECT's. If autocommit is enabled, I follow my SELECT statement with a COMMIT statement or I create a new connection I don't get this behavior. E

Re: Listing subtypes

2007-11-28 Thread Ben Finney
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > Ben Finney schrieb: > > A class knows its parents; it doesn't know its children. (Or, in > > other words, children need to know who their parents are, but > > aren't required to notify their parents about anything.) > > Not right. These special chi

Re: Listing subtypes

2007-11-28 Thread Diez B. Roggisch
Ben Finney schrieb: > Samuel <[EMAIL PROTECTED]> writes: > >> I remember seeing an easy way to list all subtypes of a specific type >> but I haven't been able to find it anymore. What I am trying to do is >> this: Given a class, get a list of all classes that derive from it. >> Pretty much like __

Re: Very basic, sorting a list ???

2007-11-28 Thread Peter Decker
On Nov 28, 2007 7:22 PM, stef mientki <[EMAIL PROTECTED]> wrote: > print 'xx3',ordered_list.sort() The sort() method returns None. It sorts the list in place; it doesn't return a copy of the sorted list. -- # p.d. -- http://mail.python.org/mailman/listinfo/python-list

Re: Very basic, sorting a list ???

2007-11-28 Thread Ben Finney
stef mientki <[EMAIL PROTECTED]> writes: > Here is the code >print 'xx1',type(ordered_list) >print 'xx2',ordered_list >print 'xx3',ordered_list.sort() > > And this is the result > xx1 > xx2 [14, 12, 10] > xx3 None > > What am I doing wrong ? Apparently, ignoring the documentation o

Very basic, sorting a list ???

2007-11-28 Thread stef mientki
hello, I'm trying to sort a list, using the same list at the commandline works, but in a program it doesn't. Here is the code print 'xx1',type(ordered_list) print 'xx2',ordered_list print 'xx3',ordered_list.sort() And this is the result xx1 xx2 [14, 12, 10] xx3 None What am I doing

Re: Listing subtypes

2007-11-28 Thread Ben Finney
Samuel <[EMAIL PROTECTED]> writes: > I remember seeing an easy way to list all subtypes of a specific type > but I haven't been able to find it anymore. What I am trying to do is > this: Given a class, get a list of all classes that derive from it. > Pretty much like __mro__ but downwards rather t

Listing subtypes

2007-11-28 Thread Samuel
Hi, I remember seeing an easy way to list all subtypes of a specific type but I haven't been able to find it anymore. What I am trying to do is this: Given a class, get a list of all classes that derive from it. Pretty much like __mro__ but downwards rather then upwards. Any ideas? -Samuel -- ht

Re: Python Network Graph Library

2007-11-28 Thread Anand Patil
On Nov 28, 2007 2:38 PM, jay graves <[EMAIL PROTECTED]> wrote: > On Nov 28, 3:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > Hi Folks, > > > > I am looking for a network Graph Library with Python bindings (Iron or > > C!). > > > > Just need a simple relationship visualisation - seen a

Re: image rendering in python

2007-11-28 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > http://cdnll.i.imagechef.com/ic/templimg2/Shaved%20Head.jpg > Do u know how to make such images using PIL using PIL, you can prepare a background image (the head), an overlay layer (properly shaded flesh tones) and a mask (e.g. using ImageDraw and a suitable font), an

Re: string parsing / regexp question

2007-11-28 Thread Ryan Krauss
On Nov 28, 2007 1:23 PM, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Nov 28, 11:32 am, "Ryan Krauss" <[EMAIL PROTECTED]> wrote: > > I need to parse the following string: > > > > $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left({{{\it m_2}\,s^2 > > }\over{k}}+1\right)\,{\it x_1}-{{F}\over{k}}\cr

Re: string parsing / regexp question

2007-11-28 Thread Ryan Krauss
Interesting. Thanks Paul and Tim. This looks very promising. Ryan On Nov 28, 2007 1:23 PM, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Nov 28, 11:32 am, "Ryan Krauss" <[EMAIL PROTECTED]> wrote: > > I need to parse the following string: > > > > $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left

Re: How to Teach Python "Variables"

2007-11-28 Thread Ben Finney
"Chris Mellon" <[EMAIL PROTECTED]> writes: > Whether you like it or not, the term "pointer" has a specific common > meanings. They do not mean "any means by which you may reference a > value". "variable" is certainly less clear and is used much more > loosely, but in the specific context of compa

Re: Running unmodified CGI scripts persistently under mod_wsgi.

2007-11-28 Thread Graham Dumpleton
On Nov 29, 2:36 am, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Istvan Albert schrieb: > > > It will be awesome ifmod_wsgican run CGI without invoking python on > > each access. > > For SCGI there is something like this: cgi2scgi: it is small executable > written in C, > which connects to a runni

Re: Control mouse position and clicking

2007-11-28 Thread Tony
On Nov 28, 9:33 pm, Bjoern Schliessmann wrote: snip > > On Mac, IIRC, you can't. > > Regards, well, you can do it from Java, (the Robot class, as I recall), so you should be able to do it in Jython, which is a Python implementation, so Tony -- http://mail.python.org/mailman/listinfo/python

Re: Control mouse position and clicking

2007-11-28 Thread Tony
On Nov 28, 9:33 pm, Bjoern Schliessmann wrote: snip > > On Mac, IIRC, you can't. > > Regards, well, you can do it from Java, (the Robot class, as I recall), so you should be able to do it in Jython, which is a Python implementation, so Tony -- http://mail.python.org/mailman/listinfo/python

Re: wxPython problem

2007-11-28 Thread SMALLp
SMALLp wrote: > [EMAIL PROTECTED] wrote: >> On Nov 28, 1:06 pm, SMALLp <[EMAIL PROTECTED]> wrote: >>> Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed >>> IDLE, and i installed package python-wxgtkX. I start IDLE and when i >>> want co compile my aplication all windows close. Al

Re: Python Network Graph Library

2007-11-28 Thread jay graves
On Nov 28, 3:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I am looking for a network Graph Library with Python bindings (Iron or > C!). > > Just need a simple relationship visualisation - seen a few via google > but many seem to be unmaintained. > I've used GraphViz before

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 9:20 am, "Gianmaria Iaculo - NVENTA" <[EMAIL PROTECTED]> wrote: > John can you make an example of this solution? Which possible solution? (a) 32-bit floating point (b) 32-bit integer (c) packed decimal > You maen that a more compact > way is possible??? More compact than what? If your

Re: Books on Python

2007-11-28 Thread kyosohma
On Nov 27, 9:05 pm, "barcaroller" <[EMAIL PROTECTED]> wrote: > Can someone kindly recommend some good books on the following: > > Python for beginners > Python for advanced users > > Is there a bible like Larry Wall's Programming Perl or Bjarne Stroustrup's > The C++ Programming Language?

Re: Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
John can you make an example of this solution? You maen that a more compact way is possible??? Firma Gianmaria Iaculo "John Machin" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > On Nov 29, 8:05 am, "Gianmaria Iaculo - NVENTA" > <[EMAIL PROTECTED]> wrote: >> Txs all, >> i

Re: Books on Python

2007-11-28 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > On Nov 27, 10:05 pm, "barcaroller" <[EMAIL PROTECTED]> wrote: > > Can someone kindly recommend some good books on the following: > > > > Python for beginners > > Python for advanced users > > > > Is there a bible like Larry Wall'

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 8:35 am, "Gianmaria Iaculo - NVENTA" <[EMAIL PROTECTED]> wrote: > U are really nice guys... i'm really apreciating (sorry 4 my bad english) > > Chriss is right this are coordinates and i'm treating as strings > naturally > I dont really have floating points on my module.. it run a 1.

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 8:05 am, "Gianmaria Iaculo - NVENTA" <[EMAIL PROTECTED]> wrote: > Txs all, > i wont to respond to who asked why i needed it: > > I'm using python on GSM modules and the informations i have to move goes > along GPRS/UMTS connections so it's beatiful for me to transfer more > informations

Re: Bit Operations

2007-11-28 Thread Tim Chase
>> >>> 0xff & (((0xff & a) << 4) | (0xff & b)) >> 150 >> >> or, if you're sloppy, >> >> >>> (a << 4) | b >> 150 > > Slightly OT, maybe - why exactly is the second alternative 'sloppy?' > I believe you, because I had a problem once (in Java) with bytes not > having the value I expected unless I d

Re: Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
U are really nice guys... i'm really apreciating (sorry 4 my bad english) Chriss is right this are coordinates and i'm treating as strings naturally I dont really have floating points on my module.. it run a 1.5 python version from Telit. So i dont have zLib too... just have 1.5 Mb of Ram an

exporting from twiki

2007-11-28 Thread Gerry
I have a twiki, with documentation on 200 "things". I'd like to export the 200 pages, with their embedded graphs, to some static version (word, pdf, ...) that I can give to a non-connected, reference user community to "read" - i.e., no =navigation required beyond back and forth to a table of conte

Re: Control mouse position and clicking

2007-11-28 Thread Bjoern Schliessmann
Glich wrote: > hi, how can I, control mouse position and clicking from python? > > I want to interact with a flash application inside firefox. > thanks. > > ps: I am not using windows. On Mac, IIRC, you can't. Regards, Björn -- BOFH excuse #394: Jupiter is aligned with Mars. -- http://ma

Re: Bit Operations

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 3:18 PM, J. Clifford Dyer <[EMAIL PROTECTED]> wrote: > On Wed, Nov 28, 2007 at 10:05:40PM +0100, Gianmaria Iaculo - NVENTA wrote > regarding Re: Bit Operations: > > > > Txs all, > > i wont to respond to who asked why i needed it: > > > > I'm using python on GSM modules and the info

Python Network Graph Library

2007-11-28 Thread [EMAIL PROTECTED]
Hi Folks, I am looking for a network Graph Library with Python bindings (Iron or C!). Just need a simple relationship visualisation - seen a few via google but many seem to be unmaintained. Any suggestions? Thanks, Davy Mitchell -- Davy Mitchell Blog - http://daftspaniel.blogspot.com Twitter -

Re: Bit Operations

2007-11-28 Thread J. Clifford Dyer
On Wed, Nov 28, 2007 at 10:05:40PM +0100, Gianmaria Iaculo - NVENTA wrote regarding Re: Bit Operations: > > Txs all, > i wont to respond to who asked why i needed it: > > I'm using python on GSM modules and the informations i have to move goes > along GPRS/UMTS connections so it's beatiful for

Tuning question

2007-11-28 Thread Wally Lepore
Hi Graham Is this email still good? Its been awhile since we spoke last on the tuning list. Are you still on Yahoo messenger? Also, what is your email address please. You told me to email you when I had questions that seemed too basic for the tuning list. Thanks Graham. My email is [EMAIL PROTEC

Re: Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
Txs all, i wont to respond to who asked why i needed it: I'm using python on GSM modules and the informations i have to move goes along GPRS/UMTS connections so it's beatiful for me to transfer more informations with less space... imagine i have to send this simple data 41.232323,12.345678

Re: Creating the windows MSI of python

2007-11-28 Thread Floris Bruynooghe
On Nov 28, 5:26 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > Floris Bruynooghe wrote: > > It would be great if someone knows how Python builds it's MSI. > > The Tools/ directory contains a script in Tools/msi/msi.py. Martin von > Löwis is using the script to generate the official MSI bundles.

Re: Bit Operations

2007-11-28 Thread Dan Upton
> >>> 0xff & (((0xff & a) << 4) | (0xff & b)) > 150 > > or, if you're sloppy, > > >>> (a << 4) | b > 150 Slightly OT, maybe - why exactly is the second alternative 'sloppy?' I believe you, because I had a problem once (in Java) with bytes not having the value I expected unless I did the and-magi

Optimized Python bytecode

2007-11-28 Thread Looney, James B
I'm using SCons to build all kinds of things, and part of our build process involves creating a "release" version of our software. In the case of Python, that means compiling the .py into a .pyc or .pyo. Because I'm placing the compiled script into a different location from the .py, I have to figu

Re: Bit Operations

2007-11-28 Thread J. Clifford Dyer
On Wed, Nov 28, 2007 at 09:07:56PM +0100, Gianmaria Iaculo - NVENTA wrote regarding Bit Operations: > > Hi there, > I'm so new to python (coming from .net so excuse me for the stupid question) > and i'm tring to do a very simple thing,with bytes. > > My problem is this: > > i've a byte that na

Re: Bit Operations

2007-11-28 Thread Grant Edwards
On 2007-11-28, Chris Mellon <[EMAIL PROTECTED]> wrote: > On Nov 28, 2007 2:07 PM, Gianmaria Iaculo - NVENTA ><[EMAIL PROTECTED]> wrote: >> Hi there, >> I'm so new to python (coming from .net so excuse me for the stupid question) >> and i'm tring to do a very simple thing,with bytes. >> >> My proble

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 7:07 am, "Gianmaria Iaculo - NVENTA" <[EMAIL PROTECTED]> wrote: > Hi there, > I'm so new to python (coming from .net so excuse me for the stupid question) > and i'm tring to do a very simple thing,with bytes. > > My problem is this: > > i've a byte that naturally is composed from 2 nibbl

Re: string parsing / regexp question

2007-11-28 Thread Tim Chase
Paul McGuire wrote: > On Nov 28, 1:23 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: >> As Tim Grove points out, ... > > s/Grove/Chase/ > > Sorry, Tim! No problem...it's not like there aren't enough Tim's on the list as it is. :) -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: Bit Operations

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 2:27 PM, Chris Mellon <[EMAIL PROTECTED]> wrote: > On Nov 28, 2007 2:07 PM, Gianmaria Iaculo - NVENTA > <[EMAIL PROTECTED]> wrote: > > Hi there, > > I'm so new to python (coming from .net so excuse me for the stupid question) > > and i'm tring to do a very simple thing,with bytes. >

Re: win32serviceutil won't start

2007-11-28 Thread kyosohma
On Nov 28, 1:59 pm, Nikola Skoric <[EMAIL PROTECTED]> wrote: > Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST), > [EMAIL PROTECTED] <[EMAIL PROTECTED]> kaze: > > > Sorry I didn't reply sooner. If you're creating a service based on a > > Python file, check out the following links in addition to the book

Re: string parsing / regexp question

2007-11-28 Thread Paul McGuire
On Nov 28, 1:23 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > As Tim Grove points out, ... s/Grove/Chase/ Sorry, Tim! -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Bit Operations

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 2:07 PM, Gianmaria Iaculo - NVENTA <[EMAIL PROTECTED]> wrote: > Hi there, > I'm so new to python (coming from .net so excuse me for the stupid question) > and i'm tring to do a very simple thing,with bytes. > > My problem is this: > > i've a byte that naturally is composed from 2 ni

Re: Bit Operations

2007-11-28 Thread Tim Chase
> I'm really confused on how t do it, maybe cause python is > type-less (dynamic typed) Being duck-typed doesn't really have anything to do with it. Python supports logical shifting and combining > i've a byte that naturally is composed from 2 nibbles hi&low, > and two chars.. like A nd B. What

Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
Hi there, I'm so new to python (coming from .net so excuse me for the stupid question) and i'm tring to do a very simple thing,with bytes. My problem is this: i've a byte that naturally is composed from 2 nibbles hi&low, and two chars.. like A nd B. What i wonna do is to write A to the High nib

Re: win32serviceutil won't start

2007-11-28 Thread Nikola Skoric
Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> kaze: > Sorry I didn't reply sooner. If you're creating a service based on a > Python file, check out the following links in addition to the book > Wolfgang mentioned: > > http://agiletesting.blogspot.com/2005/09/run

Re: Control mouse position and clicking

2007-11-28 Thread Laszlo Nagy
Paul McGuire wrote: > On Nov 28, 1:29 pm, Glich <[EMAIL PROTECTED]> wrote: > >> hi, how can I, control mouse position and clicking from python? >> >> I want to interact with a flash application inside firefox. thanks. >> >> ps: I am not using windows. >> > > Ooof, I was about to suggest usi

Re: Control mouse position and clicking

2007-11-28 Thread Paul McGuire
On Nov 28, 1:29 pm, Glich <[EMAIL PROTECTED]> wrote: > hi, how can I, control mouse position and clicking from python? > > I want to interact with a flash application inside firefox. thanks. > > ps: I am not using windows. Ooof, I was about to suggest using pywinauto, because I was able to interac

Control mouse position and clicking

2007-11-28 Thread Glich
hi, how can I, control mouse position and clicking from python? I want to interact with a flash application inside firefox. thanks. ps: I am not using windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython problem

2007-11-28 Thread SMALLp
[EMAIL PROTECTED] wrote: > On Nov 28, 1:06 pm, SMALLp <[EMAIL PROTECTED]> wrote: >> Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed >> IDLE, and i installed package python-wxgtkX. I start IDLE and when i >> want co compile my aplication all windows close. Also when i vrite >> s

Re: string parsing / regexp question

2007-11-28 Thread Paul McGuire
On Nov 28, 11:32 am, "Ryan Krauss" <[EMAIL PROTECTED]> wrote: > I need to parse the following string: > > $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left({{{\it m_2}\,s^2 > }\over{k}}+1\right)\,{\it x_1}-{{F}\over{k}}\cr -{{{\it m_2}\,s^2\,F > }\over{k}}-F+\left({\it m_2}\,s^2\,\left({{{\it m_

Re: Books on Python

2007-11-28 Thread Jeff McNeil
I've purchased a couple of books on Python and I keep going back to Python in a Nutshell. It's about the only printed text I keep on my desk all the time. It has a nice introduction to the language and includes the specification, too. If you're familiar with programming, http://diveintopython.org

Trying to build cjson on Widnows, getting errors

2007-11-28 Thread Jack
Since I don't have VS2003, I'm trying to build cjson with MingW and Cygwin but I'm getting lots of errors like these: build\temp.win32-2.5\Release\cjson.o(.text+0x8e):cjson.c: undefined reference to `_imp___Py_NoneStruct' build\temp.win32-2.5\Release\cjson.o(.text+0x95):cjson.c: undefined refe

Re: wxPython problem

2007-11-28 Thread kyosohma
On Nov 28, 1:06 pm, SMALLp <[EMAIL PROTECTED]> wrote: > Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed > IDLE, and i installed package python-wxgtkX. I start IDLE and when i > want co compile my aplication all windows close. Also when i vrite > smoethin lik thile in IDLE: > >

wxPython problem

2007-11-28 Thread SMALLp
Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i vrite smoethin lik thile in IDLE: import wx app = wx.App() wx.Frmae(none, -1) same thing, Pleas

Re: Books on Python

2007-11-28 Thread shadowsithe
On Nov 27, 10:05 pm, "barcaroller" <[EMAIL PROTECTED]> wrote: > Can someone kindly recommend some good books on the following: > > Python for beginners > Python for advanced users > > Is there a bible like Larry Wall's Programming Perl or Bjarne Stroustrup's > The C++ Programming Language?

Re: Code Management

2007-11-28 Thread misc
On Nov 20, 4:09 pm, Jens <[EMAIL PROTECTED]> wrote: > > 1) Should I put my unittests in a subdirectory? Does the subdirectory > have to be a package? As others have suggested, this is a good way to organise your tests. To avoid problems with the import path, look at nosetests [1]. This allows you

Try/Except/Yield/Finally...I'm Lost :-}

2007-11-28 Thread Victor Subervi
Hi; I am trying to find words in a document that are identical to any word in a vocabulary list, to replace that word with special markup. Let's say the word is "dharma". I don't want to replace the first few letters of, say "dharmawuhirfuhi". Also, to make matters more difficult, if the word "adha

Python Nmap script linux version

2007-11-28 Thread Daniel Folkes
I made this script for fun. you need to have Nmap installed on your linux computer and it will find all the computers on the network and then run Nmap on it. Hope you enjoy! import os fn = 'i.result' ip = '192.168.1.1-255' ip1 = ip[:3] ips = [] os.system("nmap -sP 192.168.1.1-255 > "+fn) f = ope

Re: How to Teach Python "Variables"

2007-11-28 Thread J. Clifford Dyer
On Wed, Nov 28, 2007 at 11:23:42AM -0600, Chris Mellon wrote regarding Re: How to Teach Python "Variables": > > On Nov 28, 2007 10:57 AM, hdante <[EMAIL PROTECTED]> wrote: > > On Nov 28, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > > > > Right. Python variables are pointers, except f

Re: string parsing / regexp question

2007-11-28 Thread Tim Chase
> The trick is that there are extra curly braces inside the \pmatrix{ } > strings and I don't know how to write a regexp that would count the > number of open and close curly braces and make sure they match, so > that it can find the correct ending curly brace. This criterion is pretty much a deal

Re: Creating the windows MSI of python

2007-11-28 Thread Christian Heimes
Floris Bruynooghe wrote: > It would be great if someone knows how Python builds it's MSI. The Tools/ directory contains a script in Tools/msi/msi.py. Martin von Löwis is using the script to generate the official MSI bundles. You need to run it from a development shell. Good luck! Christian -- h

string parsing / regexp question

2007-11-28 Thread Ryan Krauss
I need to parse the following string: $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left({{{\it m_2}\,s^2 }\over{k}}+1\right)\,{\it x_1}-{{F}\over{k}}\cr -{{{\it m_2}\,s^2\,F }\over{k}}-F+\left({\it m_2}\,s^2\,\left({{{\it m_2}\,s^2}\over{k}}+1 \right)+{\it m_2}\,s^2\right)\,{\it x_1}\cr 1\cr }

Re: How to Teach Python "Variables"

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 10:57 AM, hdante <[EMAIL PROTECTED]> wrote: > On Nov 28, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > > Right. Python variables are pointers, except for all the ways that > > they are different. By the same criteria, they are also puppies. Give > > it a rest. > > I'm so

Re: Unexpected behavior when initializing class

2007-11-28 Thread Arnaud Delobelle
On Nov 28, 3:04 pm, Mel <[EMAIL PROTECTED]> wrote: > Paul Rudin wrote: > > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > > A common paradigm to get round this - assuming you want a different > > empty list each time - is something like: > > > def __init__(self, v = None): > > self.values =

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 2:12 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > Right. Python variables are pointers, except for all the ways that > they are different. By the same criteria, they are also puppies. Give > it a rest. I'm sorry if your notion of pointer is incorrect. A pointer (or, more formally,

Creating the windows MSI of python

2007-11-28 Thread Floris Bruynooghe
Hello I've managed to build python2.4 and python2.5 in windows with MSVC++ 7.1 fine following the instructions in the PCbuild directory. However now I am wondering how to create the MSI from this[1], but can't find any instructions. All I'm looking for is the equivalent of "make install" (or "ma

Re: Tip of the day generator.

2007-11-28 Thread Neil Cerutti
On 2007-11-28, Neil Cerutti <[EMAIL PROTECTED]> wrote: > import textwrap > import random > import os > > print "Sigswap v0.4" > [...] Yikes! That program was in dire need of Pythonification. It must have been written early in my Pythonology. -- Neil Cerutti -- http://mail.python.org/mailman/li

Re: WindowsError: [Error 5] Access is denied With _winreg.enum

2007-11-28 Thread kyosohma
On Nov 28, 10:04 am, black_13 <[EMAIL PROTECTED]> wrote: > I have included a small script the reproduces the error I am having in > larger script. > The line 'hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,name)' > seems > to be causing the error but im not sure why. > - scri

Re: Tip of the day generator.

2007-11-28 Thread Jason
On Nov 28, 9:00 am, "Joseph king" <[EMAIL PROTECTED]> wrote: > Hey i was wondering if any one would know if there was a way to have > python randomly read form a file or would you ahve to know the byte > postion and somehow randomize splicing the file so the sentence you > want show's up. > > i.e h

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 2:06 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > > That's right. Languages may have arbitrary sets of operations > > defined for their variables. There's nothing wrong with that. > > No, arbitrary operations would be useless. > 1) You may convince a big company to add you newly dev

Re: WindowsError: [Error 5] Access is denied With _winreg.enum

2007-11-28 Thread Jerry Hill
On Nov 28, 2007 11:04 AM, black_13 <[EMAIL PROTECTED]> wrote: > I have included a small script the reproduces the error I am having in > larger script. The line 'hkey = > _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,name)' > seems to be causing the error but im not sure why. ... > WindowsError: [Er

Re: Tip of the day generator.

2007-11-28 Thread Neil Cerutti
On 2007-11-28, Joseph king <[EMAIL PROTECTED]> wrote: > Hey i was wondering if any one would know if there was a way to > have python randomly read form a file or would you ahve to know > the byte postion and somehow randomize splicing the file so the > sentence you want show's up. > > i.e have a f

Re: How to Teach Python "Variables"

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 9:51 AM, hdante <[EMAIL PROTECTED]> wrote: > On Nov 28, 1:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote: > > > > > > > > > On Nov 28, 1:09 am, Steven D'Aprano > > ><[EMAIL PROTECTED]> wrote: > > >> On Tue, 27 Nov 2007 10:21:36 -08

Re: Tip of the day generator.

2007-11-28 Thread Diez B. Roggisch
Joseph king wrote: > Hey i was wondering if any one would know if there was a way to have > python randomly read form a file or would you ahve to know the byte > postion and somehow randomize splicing the file so the sentence you > want show's up. > > i.e have a file with a lot of tips and useles

Re: How to Teach Python "Variables"

2007-11-28 Thread Neil Cerutti
On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote: > On Nov 28, 1:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: >> On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote: >> >> >> >> > On Nov 28, 1:09 am, Steven D'Aprano >> ><[EMAIL PROTECTED]> wrote: >> >> On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote:

WindowsError: [Error 5] Access is denied With _winreg.enum

2007-11-28 Thread black_13
I have included a small script the reproduces the error I am having in larger script. The line 'hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,name)' seems to be causing the error but im not sure why. - script import _winreg import string def reproduce_erro

Tip of the day generator.

2007-11-28 Thread Joseph king
Hey i was wondering if any one would know if there was a way to have python randomly read form a file or would you ahve to know the byte postion and somehow randomize splicing the file so the sentence you want show's up. i.e have a file with a lot of tips and useless facts and then have python ran

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 1:42 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote: > > > > > On Nov 28, 1:09 am, Steven D'Aprano > ><[EMAIL PROTECTED]> wrote: > >> On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote: > >> > Python variables are pointers and that's it. > > >

Re: How to Teach Python "Variables"

2007-11-28 Thread Neil Cerutti
On 2007-11-28, hdante <[EMAIL PROTECTED]> wrote: > On Nov 28, 1:09 am, Steven D'Aprano ><[EMAIL PROTECTED]> wrote: >> On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote: >> > Python variables are pointers and that's it. >> >> How do I increment a Python variable so that it points to the >> next addre

Re: Running unmodified CGI scripts persistently under mod_wsgi.

2007-11-28 Thread Thomas Guettler
Istvan Albert schrieb: > It will be awesome if mod_wsgi can run CGI without invoking python on > each access. For SCGI there is something like this: cgi2scgi: it is small executable written in C, which connects to a running SCGI server. Executing this small binary on every request is no big over

Re: Unexpected behavior when initializing class

2007-11-28 Thread Mel
Paul Rudin wrote: > "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > A common paradigm to get round this - assuming you want a different > empty list each time - is something like: > > def __init__(self, v = None): > self.values = v if v else [] > > (or maybe test explicitly for None, but y

Re: string conversion latin2 to ascii

2007-11-28 Thread kyosohma
On Nov 27, 5:08 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Nov 28, 8:45 am, [EMAIL PROTECTED] wrote: > > > > > > > > > On Nov 27, 3:35 pm, Martin Landa <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > sorry for a newbie question. I have unicode string (or better say > > > latin2 encoding) co

Re: How to Teach Python "Variables"

2007-11-28 Thread hdante
On Nov 28, 1:09 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote: > > Python variables are pointers and that's it. > > How do I increment a Python variable so that it points to the next > address, like I can do with pointers in C, Pascal, and other l

Re: How to Teach Python "Variables"

2007-11-28 Thread Aaron Watters
On Nov 27, 5:31 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > Of course. But then it really depends on the teaching methodology, > doesn't it? There is no reason (well, barring the restraints of the > curriculum vitea), that one should learn topics so complex as to > require "off-putting" the *real*

Re: the annoying, verbose self

2007-11-28 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Tue, 27 Nov 2007 10:11:48 +0100, Bruno Desthuilliers wrote: > >> Fine. Now since Python let you define your own callable types and your >> own descriptors, you can as well have an attribute that behave just like >> a method without being an instance of any of the met

Re: Troubleshooting garbage collection issues

2007-11-28 Thread [EMAIL PROTECTED]
Thanks for the thoughts - much appreciated! The threaded super-goat was indeed the offender. A very aggressive QA tester got us enough of a pattern to identify the offending module: pyOpenSSL. After looking at it closely, we found there are problems with its thread handling. In particular, the G

  1   2   >