Re: html sql client

2007-03-01 Thread gert
On Mar 2, 7:33 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, gert wrote: > > I was thinking about making a column module that names the columns, i > > was hoping there would be some sort of api feature that already exist > > because parsing sql statemants to figu

Re: html sql client

2007-03-01 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, gert wrote: > I was thinking about making a column module that names the columns, i > was hoping there would be some sort of api feature that already exist > because parsing sql statemants to figure out which column is refers to > what is allot of work. Are you searching f

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-01 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: 8<-- > The C programm gets its "commands" from its stdin and sends its state > to stdout. Thus I have some kind of dialog over stdin. > > So, once I start the C Program from the shell, I immediately get its > output in my terminal. If I start it from a

Re: Matplotlib axes label

2007-03-01 Thread John Henry
On Mar 1, 9:53 pm, [EMAIL PROTECTED] wrote: > On Mar 1, 3:10 pm, "John Henry" <[EMAIL PROTECTED]> wrote: > > > I've been asking this question at the matplotlib user list and never > > gotten an answer. I am hoping that there are matplotlib users here > > that can help. > > > My problem with matplo

Re: Matplotlib axes label

2007-03-01 Thread attn . steven . kuo
On Mar 1, 3:10 pm, "John Henry" <[EMAIL PROTECTED]> wrote: > I've been asking this question at the matplotlib user list and never > gotten an answer. I am hoping that there are matplotlib users here > that can help. > > My problem with matplotlib's way of handling axes label is illustrated > by th

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > That still sounds like an unreliable manual type system, > It's unreliable in the sense that the coder has to follow the naming > convention, and must have some bare minimum of sense. If your coders are > morons, no naming convention will save you. (

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Erik Max Francis
Steven D'Aprano wrote: > A type system doesn't help. So what if they're both floats? The test > is still bogus, your code will still wait too long to engage the > retro-rockets, and the billion dollar space craft will still be travelling > at hundreds of miles an hour when it reaches the surface o

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-01 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > Hi, > > Thanks for your answer. I had a look into the fcntl module and tried > to unlock the output-file, but > > >>> fcntl.lockf(x.stdout, fcntl.LOCK_UN) > Traceback (most recent call last): > File "", line 1, in > IOError: [Errno 9] Bad file descriptor > > I

html sql client

2007-03-01 Thread gert
Anybody who is interested in a sql client with a html interface http://sourceforge.net/projects/dfo/ db7 is for python based on cherrypy, code is straightforward and easy to modify so it can work with other sql databases. db5 was before i knew pyhton :) Suggestions very welcome about what to do

Re: urlDecode()

2007-03-01 Thread gert
On Mar 1, 1:40 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 28 Feb 2007 22:45:40 -0300, gert <[EMAIL PROTECTED]> escribió: > > > import re > > > def htc(m): > > return chr(int(m.group(1),16)) > > > def urldecode(url): > > rex=re.compile('%([0-9a-hA-H][0-9a-hA-H])',re.M) > >

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Steven D'Aprano
On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> But if you used Apps Hungarian, and saw this line of code: >> >> if hmmCurrentHeight <= hinCriticalHeight: >> >> then you should instantly recognise that there's a problem. Comparing >> a heigh

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > But if you used Apps Hungarian, and saw this line of code: > > if hmmCurrentHeight <= hinCriticalHeight: > > then you should instantly recognise that there's a problem. Comparing > a height in millimetres to a height in inches is not a good thing to d

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Steven D'Aprano
On Thu, 01 Mar 2007 21:45:55 +0100, Bruno Desthuilliers wrote: > As a side note : hungarian notation is usually considered bad form here. > Look here for usual naming conventions: > http://www.python.org/dev/peps/pep-0008/ Which Hungarian notation do you mean? If you mean the Windows "Systems H

Re: PyCon blogs?

2007-03-01 Thread Rob Andrews
Now that I've half recovered from PyCon, I've uploaded some initial prattle: http://trekkingbob.blogspot.com/2007/03/pycon-all-up-in-my-veins.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a c array to python list

2007-03-01 Thread Scott David Daniels
zefciu wrote: > Hi! > > I want to embed a function in my python application, that creates a > two-dimensional array of integers and passes it as a list (preferably a > list of lists, but that is not necessary, as the python function knows > the dimensions of this array). As I read the reference,

Re: class declaration shortcut

2007-03-01 Thread Steven D'Aprano
On Thu, 01 Mar 2007 10:44:48 +0100, Bjoern Schliessmann wrote: > Mh. I suspect there's also more to it than I see now, but this > __name__ seems quite useless to me. What if I rebind the class' > name after definition? Or is it really just for some manual > introspection? If it is, it seems a bit

World Ultimate Fighting

2007-03-01 Thread karajitsu
you can find it here the World Ultimate Fighting at http://www.dirtyfighting.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing java2python (Newbie)

2007-03-01 Thread MRAB
On Mar 1, 2:05 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 28 Feb 2007 19:54:26 -0300, MRAB <[EMAIL PROTECTED]> > escribió: > > > On Feb 28, 5:27 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > >> you want to run the windows command prompt, which is called "cmd.exe" > >> i

Re: finding out the precision of floats

2007-03-01 Thread greg
John Machin wrote: > Storing 1.1 and using it in calculations may save you a few > microseconds a day in your real-time apps. The main advantage would be clarity of code. > naming 1.1 as "anualRate" (sic) is utterly ludicrous. So call it annualMultiplicationFactor or something in the code. --

Re: xml minidom redundant children??

2007-03-01 Thread Gabriel Genellina
En Thu, 01 Mar 2007 15:46:53 -0300, <[EMAIL PROTECTED]> escribió: > As a newbie, I'm trying to simply parse a xml file using minidom, but > I don't know why I get some extra children(?). I don't know what is > wrong in xml file, but I've tried different xml files, still same > problem. If you don

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-01 Thread Gabriel Genellina
En Thu, 01 Mar 2007 14:42:00 -0300, <[EMAIL PROTECTED]> escribió: > BUT If I use PIPE for both (so I can .write() on the stdin and .read() > from the subprocess' stdout stream (better: file descriptor)) reading > from the subprocess stdout blocks forever. If I write something onto > the subprocess

Re: Writing an interpreter for language similar to python!!

2007-03-01 Thread greg
Hendrik van Rooyen wrote: > - It is going to be an inferior subset of Python - From what the OP said, it isn't necessarily a subset of Python, just something whose surface syntax is similar. The semantics could be quite different. However, if the semantics *are* to be similar as well, it makes

Re: python equivalent of bash find

2007-03-01 Thread BartlebyScrivener
On Mar 1, 3:58 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > MHO is that you'd better learn linux (well... Unix) tools. Reinventing > the SquareWheel(tm) is usually not a good idea. I agree. It's just a matter of experience and learning when to use Unix tools and when to use Python. The

Matplotlib axes label

2007-03-01 Thread John Henry
I've been asking this question at the matplotlib user list and never gotten an answer. I am hoping that there are matplotlib users here that can help. My problem with matplotlib's way of handling axes label is illustrated by this example: http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine

Python win32 tools

2007-03-01 Thread Sick Monkey
I am trying to build a python program that will reset a user's account (password) on a windows machine (NOTE: my intention here is not to implement anything malicious {and I know about Trinity which is very useful}, but I just wanted a challenge and do it myself.). I have been working with win32

Re: design question: no new attributes

2007-03-01 Thread Diez B. Roggisch
> > One last point. While I remain interested in examples of how > "late" addition of attributes to class instances is useful, > I must note that everyone who responded agreed that it > has been a source of bugs. This seems to argue against a > general ban on "locking" objects in some way, in som

Re: design question: no new attributes

2007-03-01 Thread Bruno Desthuilliers
Alan Isaac a écrit : > The security application seems to call for roles. Considering that a role is a set of permissions in a context. The application doesn't want to say "you need this role", but "you need to have a role that has this permission" (nb : this is based on Zope's security model).

Re: How to update DNS record

2007-03-01 Thread Bjoern Schliessmann
Andi Clemens wrote: > It's working!!! > Yeah! > I don't know why I didn't get this the first time I tried > dnspython, but now its working! And it's so easy, 3 lines of code: Great, thanks for reporting back. Regards, Björn -- BOFH excuse #310: asynchronous inode failure -- http://mail.py

Re: Unpacking problem

2007-03-01 Thread timm . gloger
Ok, that solves my confusion. Thanks, Marc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unpacking problem

2007-03-01 Thread timm . gloger
The problem is, that len('\x90\x06\x00') is not equivalent to calcsize('Bh'): >>> calcsize('Bh') 4 >>> len('\x90\x06\x00') 3 Actually calculating the size for 'hB' results in: >>> calcsize('hB') 3 So far I have not figured out, why there is an additional byte, but it does not effect the result in

Re: Unpacking problem

2007-03-01 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Chris Garland wrote: > But an unsigned char & a short give me this unpack('Bh','\x90\x06\x00') > Traceback (most recent call last): > File "", line 1, in ? > struct.error: unpack str size does not match format Let's pack this: In [90]: pack('Bh', 0x90, 0x6) Out[90]

Re: design question: no new attributes

2007-03-01 Thread Alan Isaac
The security application seems to call for roles. I'll have to think about the schema example. But in any case, my question was poorly stated. I started out wanting to trap was the dynamic addition of attributes to class instances after initialization. While you responded to my later question as as

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Mar 1, 9:45 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > > > I understand (I've been in wikipedia :-) ). Right now the Frame is the > controller as well > as the view. Yeps. Note that this is a common "simplification" of the MVC - Microsoft labelled i

Re: Tkinter menus

2007-03-01 Thread James Stroud
Gigs_ wrote: > class MenuDemo(Frame): > def __init__(self, parent=None): > Frame.__init__(self, parent) > self.pack(expand=YES, fill=BOTH) > self.createWidgets() > > def createWidgets(self): > self.makeMenuBar() > self.makeToolBar() > L = Lab

Re: python equivalent of bash find

2007-03-01 Thread Bruno Desthuilliers
BartlebyScrivener a écrit : > I recently moved from XP to Linux, but would like to use Python > whenever possible. > > line from bash script: > > find ~/Mail -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPvu > "{}" /backup-dest \; > > What modules would I use to accomplish this in Python?

Re: Questions about app design - OOP with python classes

2007-03-01 Thread adriancico
On Mar 1, 9:45 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > As a side note : hungarian notation is usually considered bad form here. > Look here for usual naming > conventions:http://www.python.org/dev/peps/pep-0008/ Thanks for the tip. It's been too many years of VB6, and its difficult

Re: design question: no new attributes

2007-03-01 Thread Bruno Desthuilliers
Alan Isaac a écrit : > "Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in > message news:[EMAIL PROTECTED] > >>I don't share your definition of "reasonable". But you should have >>guessed by now > > > My view may be shaped by a different experience. > I have found dynamic attribute creation conv

Re: Question about raise and exceptions.

2007-03-01 Thread Ben Finney
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > On 1 mar, 04:46, Daniel Klein <[EMAIL PROTECTED]> wrote: > > Thanks for setting me straight. I had (wrongly) thought that the > > stuff inside of () was a tuple. > > For the record, it's the ',' that makes the tuple. The () are (in > this context

Unpacking problem

2007-03-01 Thread Chris Garland
What's wrong here? >>> from struct import unpack I can unpack an unsigned char >>> unpack('B','\x90') (144,) I can unpack a short >>> unpack('h','\x06\x00') (6,) But an unsigned char & a short give me this >>> unpack('Bh','\x90\x06\x00') Traceback (most recent call last): File "", line 1, in

Re: Tuples vs Lists: Semantic difference

2007-03-01 Thread Ben Finney
"George Sakkis" <[EMAIL PROTECTED]> writes: > On Feb 28, 10:45 pm, Ben Finney wrote: > > > Tuples are intended for use as heterogeneous data structures [...] > > Lists are intended for use as homogeneous sequences [...] > > Nice, that's a good summary of the straw man arguments about the > "true"

MySQLdb - N00b Question

2007-03-01 Thread Rory McKinley
Hello List Apologies if this is documented somewhere already, but Google is turning up nothing useful. Does anybody know if it is possible to set up an SSL connection to a remote MySQL database using MySQLdb? Thanks Rory -- http://mail.python.org/mailman/listinfo/python-list

Re: class declaration shortcut

2007-03-01 Thread Steven Bethard
Luis M. González wrote: > This is the closest we got so far to the intended result. > If there was a way to enter attributes without quotes, it would be > almost identical. Ok, below is the Python code so that the following works:: class Person(Struct): "name birthday children" Note that *

Re: python equivalent of bash find

2007-03-01 Thread BartlebyScrivener
> You can probably replicate that using the modules os and shutil. Thank you both for the quick response. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: python equivalent of bash find

2007-03-01 Thread Jerry Hill
On 1 Mar 2007 12:14:43 -0800, BartlebyScrivener <[EMAIL PROTECTED]> wrote: > I recently moved from XP to Linux, but would like to use Python > whenever possible. > > line from bash script: > > find ~/Mail -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPvu > "{}" /backup-dest \; > > What modul

Re: class declaration shortcut

2007-03-01 Thread Luis M. González
On Mar 1, 3:03 pm, "Arnaud Delobelle" <[EMAIL PROTECTED]> wrote: > On Mar 1, 4:01 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > > > Arnaud Delobelle wrote: > [...] > > This does pretty much the same thing as the recipe I posted: > > Not at all. My new_struct create returns a new class which is s

Capture key strokes

2007-03-01 Thread abcd
Is there a way to capture key strokes on a system using python (other than pyHook)? can wxPython capture keystrokes for the system (not just, say a text box)? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Tutorial

2007-03-01 Thread Joshua J. Kugler
Timm Florian Gloger wrote: > Hi, > > is Guido van Rossum's "Python Tutorial" in non-HTML formats (e.g. PDF > or PS) avaiable for free? > > Regards, > Timm You mean like here: http://docs.python.org/download.html You have to download them all, but a download of the PDFs will include the tutoria

python equivalent of bash find

2007-03-01 Thread BartlebyScrivener
I recently moved from XP to Linux, but would like to use Python whenever possible. line from bash script: find ~/Mail -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPvu "{}" /backup-dest \; What modules would I use to accomplish this in Python? Or any other Python tricks to copy or backup

Re: Questions about app design - OOP with python classes

2007-03-01 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Hi > > I am working on a python app, an outliner(a window with a TreeCtrl > on the > left to select a document, and a RichTextBox at the right to edit the > current > doc). > > I am familiarized with OOP concepts and terms but I lack practical > experience >

Re: class declaration shortcut

2007-03-01 Thread Steven Bethard
Arnaud Delobelle wrote: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/502237 [snip] > Although I don't see the necessity of a metaclass: you could have > > class Record(object): > def __init__(self, *vals): > for slot, val in zip(self.__slots__, vals): >

wxPython button binding in XSI

2007-03-01 Thread arcsecond
I feel like an idiot. I've been struggling with this for 4 days. I can make a window but I can't seem to close them. I think I've narrowed down the problem being with my button event bindings. They don't seem to take. But I don't get any errors either. So am I missing something? Any help would be

Re: class declaration shortcut

2007-03-01 Thread Arnaud Delobelle
On Mar 1, 7:37 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: > > On Mar 1, 4:01 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > >> Arnaud Delobelle wrote: > > [...] > >> This does pretty much the same thing as the recipe I posted: > > > Not at all. My new_struct create re

Re: GIS Shape file upload to FTP server

2007-03-01 Thread Jean-Paul Calderone
On Thu, 1 Mar 2007 14:58:11 -0500, "Ahmed, Shakir" <[EMAIL PROTECTED]> wrote: >HI Group, > >As I am very new in python field so this question might be very silly to >you but if I get any help is highly appreciated. > >Problem: > >I wrote a python script which is working fine to upload files to the

Re: New to Tkinter GUI building

2007-03-01 Thread Adam
Ok the window has resized but the elements inside are still like they were, so they are going off the edge on the window. How can I get these to resize? I have put sizes on the frames they are in. Sorry to keep asking but I'm flying blind here, I have checked the python site and the intro to tkinte

pycrust startup question

2007-03-01 Thread WolfgangZ
Hi, I've tried to add " from __future__ import division" to the startup script of pycrust. It seems to be imported as division is listed in the namespace. But it is somehow not activated. Any suggestions? PyCrust 0.9.5 Python 2.5 -- http://mail.python.org/mailman/listinfo/python-list

GIS Shape file upload to FTP server

2007-03-01 Thread Ahmed, Shakir
HI Group, As I am very new in python field so this question might be very silly to you but if I get any help is highly appreciated. Problem: I wrote a python script which is working fine to upload files to the ftp server but the problem is it is reducing the actual size after transferring. I ne

Re: Curious UnboundLocalError Behavior

2007-03-01 Thread Matthew Franz
I had tried the global prefix in the real code (vs. the contrived example in the post), but in the incorrect code block, which made me think something else was up. Yes, these were supposed to be constants that under rare circumstances were changed ;) In the end, I scrapped the rebind approach, be

Re: How to update DNS record

2007-03-01 Thread Andi Clemens
Martin P. Hellwig wrote: > I'll looked at the perl function you mentioned and it seems to me (but > I'm not a pearl coder) that it uses the dynamic update procedure, which > is explained by the RFC 2136 (Bjoern mentioned that already). > > So I googled for "Python DNS dynamic update" and in the r

Re: class declaration shortcut

2007-03-01 Thread Steven Bethard
Arnaud Delobelle wrote: > On Mar 1, 4:01 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: >> Arnaud Delobelle wrote: > [...] >> This does pretty much the same thing as the recipe I posted: > > Not at all. My new_struct create returns a new class which is similar > to a C struct (notice the __slots__

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Robert Kern
Ron Garret wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: > >> Ron Garret wrote: >>> In article <[EMAIL PROTECTED]>, >>> Robert Kern <[EMAIL PROTECTED]> wrote: Note that in recent versions of Python, I believe that the pythonw executable is no

Re: xml minidom redundant children??

2007-03-01 Thread MonkeeSage
On Mar 1, 12:46 pm, [EMAIL PROTECTED] wrote: > As a newbie, I'm trying to simply parse a xml file using minidom, but > I don't know why I get some extra children(?). I don't know what is > wrong in xml file, but I've tried different xml files, still same > problem. Most simply, if you need to stic

Re: xml minidom redundant children??

2007-03-01 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Great guys: > > As a newbie, I'm trying to simply parse a xml file using minidom, but > I don't know why I get some extra children(?). I don't know what is > wrong in xml file, but I've tried different xml files, still same > problem. > > *

Re: Yet another unique() function...

2007-03-01 Thread MonkeeSage
On Feb 28, 3:46 pm, Paul Rubin wrote: > I didn't think so but I can't conveniently test it for now. Maybe > tonight. After playing with it a bit (only have 2.5 on this box), it looks like you do need to subscript the next() call. For example, the return from "unique( [[

Re: xml minidom redundant children??

2007-03-01 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, bkamrani wrote: > ** >xml file (fileTest) looks like: > > http://python.org/:aaa"; xmlns:afc="http:// > python.org/:foo"> > > > > > > > **

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > In article <[EMAIL PROTECTED]>, > > Robert Kern <[EMAIL PROTECTED]> wrote: > > >> Note that in recent versions of Python, I believe that the pythonw > >> executable > >> is no longer necessary as a

querying unicode data (sqlite) with python

2007-03-01 Thread Tzury
Given an sqlite db that stores the strings data such as names, etc. encoded in Unicode. How do I write a sql query statement with 'LIKE' or '=' operators and insert the Unicoded name. for example: in table MY_TABLE, in column COL01 there is a value "¿Habla español?" within python I represent thi

xml minidom redundant children??

2007-03-01 Thread bkamrani
Great guys: As a newbie, I'm trying to simply parse a xml file using minidom, but I don't know why I get some extra children(?). I don't know what is wrong in xml file, but I've tried different xml files, still same problem.

Re: Reading csv files using SQL

2007-03-01 Thread Pablo was Paolo
Tim Golden ha scritto: > I vaguely remember that you can get an ODBC driver for CSV. There is a standard ODBC driver for use text file or csv, in windows. But I use Linux on production servers. I'd like to find a Python library or tool. Thanks! Paolo -- http://mail.python.org/mailman/listinfo/py

Implementing a cache?

2007-03-01 Thread Jeff McNeil
I've got a question regarding the implementation of a caching system that I'm porting over from C. I have multiple processes across an array of systems that must retrieve data from a central database at a fairly high rate. The current system uses shared memory and supports expiry after a configu

Re: How to Read Bytes from a file

2007-03-01 Thread [EMAIL PROTECTED]
On Mar 1, 12:46 pm, "Bart Ogryczak" <[EMAIL PROTECTED]> wrote: > > This solution looks nice, but how does it work? I'm guessing > > struct.unpack will provide me with 8 bit bytes > > unpack with 'B' format gives you int value equivalent to unsigned char > (1 byte). > > > (will this work on any sys

Tkinter menus

2007-03-01 Thread Gigs_
class MenuDemo(Frame): def __init__(self, parent=None): Frame.__init__(self, parent) self.pack(expand=YES, fill=BOTH) self.createWidgets() def createWidgets(self): self.makeMenuBar() self.makeToolBar() L = Label(self, text='Menu and T

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Robert Kern
Ron Garret wrote: > In article <[EMAIL PROTECTED]>, > Robert Kern <[EMAIL PROTECTED]> wrote: >> Note that in recent versions of Python, I believe that the pythonw >> executable >> is no longer necessary as a workaround. > > How recent? I'm already using 2.5. 2.5 definitely works. I think it

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Ron Garret
In article <[EMAIL PROTECTED]>, Robert Kern <[EMAIL PROTECTED]> wrote: > Ron Garret wrote: > > I'm trying to run the Python examples distributed with XCode and they > > all give me the same error: > > > > Traceback (most recent call last): > > File "checktext.py", line 35, in > > main()

Re: BeautifulSoup modified to use weak refs and avoid circular links.

2007-03-01 Thread shredwheat
The timeit code disables the garbage collector while running. I ran the tests on my system after adding the following lines to t1() and t2(). del base gc.collect() Original timetest.py: Using proxy 100 loops, best of 3: 4.45 msec per loop Call to dummy proxy 100 loops, best of 3: 2.24

Re: Lists: Converting Double to Single

2007-03-01 Thread Jussi Salmela
Duncan Booth kirjoitti: > Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > >> For floating point, smallest magnitude to largest IS the most >> precise. >> >> Pretend you only have 2 significant digits of precision... >> >> 10 + 0.4 + 0.4 + 0.4 => 10 >> >> 0.4 + 0.4 + 0.4 + 10 =>

Re: class declaration shortcut

2007-03-01 Thread Arnaud Delobelle
On Mar 1, 4:01 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle wrote: [...] > This does pretty much the same thing as the recipe I posted: Not at all. My new_struct create returns a new class which is similar to a C struct (notice the __slots__). The recipe you refer to is nothi

Re: PyCon blogs?

2007-03-01 Thread r1chardj0n3s
On Feb 27, 6:36 pm, [EMAIL PROTECTED] wrote: > Was anybody blogging about PyCon (talks and/or sprints)? Got any pointers? Have you tried Planet Python? http://planet.python.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Vector, matrix, normalize, rotate. What package?

2007-03-01 Thread r1chardj0n3s
On Feb 27, 4:49 pm, "Mattias Brändström" <[EMAIL PROTECTED]> wrote: > Hello! > > I'm trying to find what package I should use if I want to: > > 1. Create 3d vectors. > 2. Normalize those vectors. > 3. Create a 3x3 rotation matrix from a unit 3-d vector and an angle in > radians. > 4. Perform matrix

Re: Python on a mac: how to build pythonw?

2007-03-01 Thread Robert Kern
Ron Garret wrote: > I'm trying to run the Python examples distributed with XCode and they > all give me the same error: > > Traceback (most recent call last): > File "checktext.py", line 35, in > main() > File "checktext.py", line 8, in main > pathname = EasyDialogs.AskFileForOpen(me

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-01 Thread George Trojan
[EMAIL PROTECTED] wrote: > Okay, here is what I want to do: > > I have a C Program that I have the source for and want to hook with > python into that. What I want to do is: run the C program as a > subprocess. > The C programm gets its "commands" from its stdin and sends its state > to stdout. Th

Re: How to update DNS record

2007-03-01 Thread Martin P. Hellwig
Andi Clemens wrote: > Hi, > > I want to update our DNS servers periodically with some IP addresses. But I > don't know how to do this. > I searched the Internet quite a while but I haven't found a good example how > to do this. > I want to change the A-Record for some IPs, this shouldn't be too ha

Python on a mac: how to build pythonw?

2007-03-01 Thread Ron Garret
I'm trying to run the Python examples distributed with XCode and they all give me the same error: Traceback (most recent call last): File "checktext.py", line 35, in main() File "checktext.py", line 8, in main pathname = EasyDialogs.AskFileForOpen(message='File to check end-of-lines

Re: How to Read Bytes from a file

2007-03-01 Thread Bart Ogryczak
On Mar 1, 4:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Mar 1, 8:53 am, "Bart Ogryczak" <[EMAIL PROTECTED]> wrote: > > > > > On Mar 1, 7:52 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > It seems like this would be easy but I'm drawing a blank. > > > > What I want to

Re: Dialog with a process via subprocess.Popen blocks forever

2007-03-01 Thread bayer . justin
Okay, here is what I want to do: I have a C Program that I have the source for and want to hook with python into that. What I want to do is: run the C program as a subprocess. The C programm gets its "commands" from its stdin and sends its state to stdout. Thus I have some kind of dialog over stdi

Re: Reading csv files using SQL

2007-03-01 Thread Tim Golden
Pablo was Paolo wrote: > [EMAIL PROTECTED] ha scritto: >> If you want to work directly with the files why not just use Python's csv >> module? > > Now, with Java, I use the same class to read several databases and csv > files (with SQL instructions). > I'd like to find a library for using the sam

Re: New to Tkinter GUI building

2007-03-01 Thread Adonis Vargas
Adam wrote: > On Feb 28, 9:13 pm, Adonis Vargas <[EMAIL PROTECTED]> > wrote: >> Adam wrote: >> >> >> >>> I think my main questions are: >>> 1. How can I get the Window to be sized the way I want it? >>> 2. How can I get the Scrollbars to fill the side of the text box >>> instead of being small? (l

Re: Reading csv files using SQL

2007-03-01 Thread Pablo was Paolo
[EMAIL PROTECTED] ha scritto: > If you want to work directly with the files why not just use Python's csv > module? Now, with Java, I use the same class to read several databases and csv files (with SQL instructions). I'd like to find a library for using the same approach in Python. Thank you, P

Re: Tuples vs Lists: Semantic difference (was: Extract String From Enclosing Tuple)

2007-03-01 Thread MonkeeSage
On Mar 1, 5:02 am, [EMAIL PROTECTED] wrote: > I don't know Ruby, but I think it allows such purposes with a freezing > function. In ruby all objects can be frozen (freeze is a method on Object, from which all other objects derive), not just Arrays (Arrays == lists in python; ruby has no built-in c

GIS Shape file upload FTP server

2007-03-01 Thread Ahmed, Shakir
HI Group, As I am very new in python field so this question might be very silly but If I get any help that is highly appreciated. Problem: I have a python script which is working fine to upload files to the ftp server but the problem is it is reducing the actual size after transferring

Re: How to Read Bytes from a file

2007-03-01 Thread John Machin
On Mar 2, 12:53 am, "Bart Ogryczak" <[EMAIL PROTECTED]> wrote: > > import struct > buf = open('somefile','rb').read() > count1 = lambda x: (x&1)+(x&2>0)+(x&4>0)+(x&8>0)+(x&16>0)+(x&32>0)+ > (x&64>0)+(x&128>0) > byteOnes = map(count1,struct.unpack('B'*len(buf),buf)) byteOnes = map(count1,struct.unp

Re: finding out the precision of floats

2007-03-01 Thread John Machin
On Mar 1, 9:33 pm, "Bart Ogryczak" <[EMAIL PROTECTED]> wrote: > On Feb 28, 10:29 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > > > > > On Mar 1, 4:19 am, "BartOgryczak" <[EMAIL PROTECTED]> wrote: > > > > On Feb 28, 3:53 pm, "John Machin" <[EMAIL PROTECTED]> wrote: > > > > > On Feb 28, 10:38 pm, "B

Re: pattern matching

2007-03-01 Thread Diez B. Roggisch
azrael wrote: > can someone give me good links for pattern matching in images using > python There is a python-binding available for the OpenCV library, a collection of state-of-the-art CV algorithms. And it comes with a free manual Diez -- http://mail.python.org/mailman/listinfo/python-li

Re: class declaration shortcut

2007-03-01 Thread Steven Bethard
Arnaud Delobelle wrote: > On Feb 28, 7:26 pm, "Luis M. González" <[EMAIL PROTECTED]> wrote: >> I've come across a code snippet inwww.rubyclr.comwhere they show how >> easy it is to declare a class compared to equivalent code in c#. >> I wonder if there is any way to emulate this in Python. >> >> Th

Re: How to Read Bytes from a file

2007-03-01 Thread [EMAIL PROTECTED]
On Mar 1, 8:53 am, "Bart Ogryczak" <[EMAIL PROTECTED]> wrote: > On Mar 1, 7:52 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > It seems like this would be easy but I'm drawing a blank. > > > What I want to do is be able to open any file in binary mode, and read > > in one byte (8 bits) a

Re: How to Read Bytes from a file

2007-03-01 Thread Alex Martelli
Leif K-Brooks <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > You should probaby prepare before the loop a mapping from char to number > > of 1 bits in that char: > > > > m = {} > > for c in range(256): > > m[c] = countones(c) > > Wouldn't a list be more efficient? > > m = [countones(c)

Re: imagemagick

2007-03-01 Thread azrael
i need to use some common filters lik the edge, blur. it was pretty easy and fast to use python magick. but now as I want to use it with python, it is impossible. there is the PIL_usm, but also no installation instrucions. Is there a way to blur the image using the PIL by a specific radius. On M

Re: Python Tutorial

2007-03-01 Thread Timm Florian Gloger
Thanks. And excuse this now so obviously foolish question. It seems that my so-called "brain" was not able to recognise "Downloads" as a valueable possibility to dive into when searching some non-HTML content. Sorry for wasting your time, and thanks even more for answering nevertheless. Regards, T

Re: How to update DNS record

2007-03-01 Thread andi . clemens
Hi, I'm just a trainee working here and I don't really know how the old Perl script worked. But I can post the function, maybe you can recognize what is going on there: my $domain = "wiv-dom.com"; my $nameserver = "bldc01.wiv-dom.com"; sub makeDNSEntry { my $res = new Net::DNS::Resolver;

Re: starship.python.net is down

2007-03-01 Thread Matthew . Cahn
On Feb 26, 3:46 pm, Tom Bryan <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Any news onstarship.python.net? It still seems to bedown. > > Yes. Unfortunately, there may be a hardware problem. Stefan, the admin > who owns the hosted machine, is working with the host company to > determ

Re: How to Read Bytes from a file

2007-03-01 Thread Jussi Salmela
Bart Ogryczak kirjoitti: > On Mar 1, 7:52 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: >> It seems like this would be easy but I'm drawing a blank. >> >> What I want to do is be able to open any file in binary mode, and read >> in one byte (8 bits) at a time and then count the number of 1 b

  1   2   >