calling the java jar utility from python

2006-04-07 Thread Jonathan Crowell
Hi.  I want to invoke the java jar utility from my python script and pass it a couple of arguments.  Can anyone tell me how to do this? Thanks, Jon -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error

Re: Newbie wxPython questions.

2006-04-07 Thread diffuser78
I am also a newbie and learning like you are. I was wondering if do you know any wxPython forum just for GUIs ? Good luck with your project and hope that some guru helps us out. -- http://mail.python.org/mailman/listinfo/python-list

Programming Tutorial for absolute beginners

2006-04-07 Thread Clodoaldo Pinto
I'm starting a programming tutorial for absolute beginners using Python and I would like your opinions. http://programming-crash-course.com Regards, Clodoaldo Pinto -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie wxPython questions.

2006-04-07 Thread callmebill
Instead of self.Close(), try parent.Close() The self.Close() is closing self, which is a panel. The panel's parent is the frame. This will let you keep the button on the frame, which eliminates the spacing problem. I'm not gonna test it, cuz the darn lines wrap and make it difficult to copy you

Re: Newbie wxPython questions.

2006-04-07 Thread chris
Oh, by the way... in your frame's constructor (the Frame1.__init__), you'll have to make "parent" a member variable of the class so that OnCloseMe has access to it. I.e., in the __init__ add self.FrameParent = parent Then in OnCloseMe do: self.FrameParent.Close() -- http://mail.python.org/mailm

Re: GUI Treeview

2006-04-07 Thread Peter Hansen
Arne wrote: > Hello ! > > I am looking for a widget with the following properties: > - showing the tree file structure/ directory structure > - next to each file should be a checkbox > - the tree should only show certain files (i. e. only for the looked in > user) For which GUI framework? (e.g.

Re: how you know you're a programming nerd

2006-04-07 Thread Levi Campbell
John Salerno wrote: > So last night I had a dream that me and two other guys needed to get a > simple task done in Java. We were staring at the problem in confusion > and I kept saying "First we have to create a class, then instantiate it, > then..." etc. etc. They didn't agree with me so we kept a

Re: win32com

2006-04-07 Thread floris . vannee
Thanks :) For people who are also having this problem. The VB .NET code to import that COM object is: dim com_object as object com_object = CreateObject("Python.TestServer") 'Python.TestServer in this case, but for different programs, different names of course. And in order to get it work you ne

Re: python on Mac

2006-04-07 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "pierreth" <[EMAIL PROTECTED]> wrote: >You removed /usr/bin/python! This is a really bad idea Is there any way to put it back, short of a full system reinstall? -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython and SuSE 10.0

2006-04-07 Thread Jorge Godoy
Steve <[EMAIL PROTECTED]> writes: > I was wondering if there is a wxPython RPM for SuSE 10.0 available. I > Googled for it with no luck, but I'm hopeful that there is one out > there. There are RPMs within SuSE's DVD / CDs, IIRC. Anyway, you can get it with Apt, smart and even YaST. --

Re: GUI Treeview

2006-04-07 Thread Arne
If possible for the Tkinter frameworkt. Thanks Arne "Peter Hansen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Arne wrote: >> Hello ! >> >> I am looking for a widget with the following properties: >> - showing the tree file structure/ directory structure >> - next to each

Re: how you know you're a programming nerd

2006-04-07 Thread John Salerno
Levi Campbell wrote: > You know you're addicted to a programming language when you have dreams > about it. Me? Addicted? No! Now back to the Python Challenge.. -- http://mail.python.org/mailman/listinfo/python-list

Re: socket.socket.settimeout implementation

2006-04-07 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >Now my observation on FC4 ( kernel version 2.6.11-1.1369_FC4) >"select()" can return before timeout with a >"Interrupted system call" (EINTR) error, Nothing Red-Hat-specific, or even Linux-specific, about this. It's a standard *nix thin

Re: calculating system clock resolution

2006-04-07 Thread MrJean1
Depends iff you are using Linux, print cat /proc/cpuinfo and look for the line "cpu ...Hz: ...". Parsing that would be straightforward. Keep in mind, the time.time() function reports the "wall clock" time, which usually has up to a millisecond resolution, regardless of the CPU speed.

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread bill pursell
Clodoaldo Pinto wrote: > I'm starting a programming tutorial for absolute beginners using Python > and I would like your opinions. > > http://programming-crash-course.com Very nicely laid out. Overall, a really nice presentation. 2 minor points: 1) in the section on the interactive interpreter

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread John Salerno
bill pursell wrote: > 1) in the section on the interactive interpreter you have the sentence: > "In Linux open a shell and type python (must be lower case)". It > would be nice if the word 'python' were in a different font, or perhaps python would be good there. > 2) In the section on installin

Object Tracking Library

2006-04-07 Thread Joseph Chase
Does anyone know of any python libraries or examples for tracking objects across a series of images? Any help is greatly appreciated. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

mod_python + apache + winxp => nogo

2006-04-07 Thread cyberco
And I thought this would be trivial...getting mod_python to run within apache on windows XP. = mod_python 3.2.8 apache 2.0.55 python2.4 winxp = After adding: "LoadModule python_module modules/mod_python.so" to apache's httpd.conf, apache refuses to start, saying: "cannot

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread Clodoaldo Pinto
bill pursell wrote: > 1) in the section on the interactive interpreter you have the sentence: > "In Linux open a shell and type python (must be lower case)". It > would be nice if the word 'python' were in a different font, or perhaps > in quotes, or something. You're targetting the "absolute beg

Re: Why did someone write this?

2006-04-07 Thread Sandra-24
I can't believe I missed it in the documentation. Maybe it wasn't in the offline version I was using, but more likely it was just one of those things. So the trouble seems to be that the traceback holds a reference to the frame where the exception occurred, and as a result a local variable that re

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread Clodoaldo Pinto
John Salerno wrote: > > Also, is the section called "pretty printing" mistitled? Doesn't that > name refer to the pprint module? > I didn't think about pprint. I used pretty in the sense of "Pleasing or attractive in a graceful or delicate way." (dictionary) If you have any suggestions for that pa

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Rune Strand
I've set up that combo several times. I haven't had any problems. I just looked at apach.conf, it's the same line. Did you run the mod_python-3.2.8.win32-py2.4.exe installer? -- http://mail.python.org/mailman/listinfo/python-list

ANN: ConfigObj 4.3.0

2006-04-07 Thread Fuzzyman
`ConfigObj 4.3.0 `_ is now released. This has several bugfixes, as well as *several* major feature enhancements. You can download it from : `ConfigObj-4.3.0.zip 244Kb

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Fuzzyman
cyberco wrote: > And I thought this would be trivial...getting mod_python to run within > apache on windows XP. > > = > mod_python 3.2.8 > apache 2.0.55 > python2.4 > winxp > = > > After adding: > "LoadModule python_module modules/mod_python.so" > I'm no expert - having ne

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Jim Gallacher
cyberco wrote: > And I thought this would be trivial...getting mod_python to run within > apache on windows XP. > > = > mod_python 3.2.8 > apache 2.0.55 > python2.4 > winxp > = > > After adding: > "LoadModule python_module modules/mod_python.so" > > to apache's httpd.conf

minidom + wxPython woes

2006-04-07 Thread Lonnie Princehouse
Hi all, I'm getting a seg fault when I try to use minidom to parse some XML inside a wxPython app. I was wondering if someone else could run the simple code below on Linux and, if it doesn't crash horribly, post which versions of (Python, wxPython) they are using? I can't find other messages rel

Re: minidom + wxPython woes

2006-04-07 Thread Lonnie Princehouse
Oops, I missed a bracket... that should read: testxml = '' But it still crashes ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python + apache + winxp => nogo

2006-04-07 Thread Jim Gallacher
Fuzzyman wrote: > cyberco wrote: > >>And I thought this would be trivial...getting mod_python to run within >>apache on windows XP. >> >>= >>mod_python 3.2.8 >>apache 2.0.55 >>python2.4 >>winxp >>= >> >>After adding: >>"LoadModule python_module modules/mod_python.so" >> >

enviroment for Python similar to Visual C++

2006-04-07 Thread Tomás Rodriguez Orta
Hello friends I am new programator in python, and I am looking for an enviroment graphics similar to visual c++, or delphi, where Can I create application and forms, but over python? sombody have any idea? thanks for you help. TOMAS

Re: What does 'repair Python 2.5a1' do?

2006-04-07 Thread Martin v. Löwis
Thomas Heller wrote: > What does the repair command in the 2.5a1 msi installer do? > > Apparently it does not replace changed files, although it seems > to replace deleted files. MSI's repair procedure is somewhat complicated. Invoking repair just sets the REINSTALL property to ALL: http://msdn.

Re: Newbie wxPython questions.

2006-04-07 Thread John Ladasky
[EMAIL PROTECTED] wrote: > I am also a newbie and learning like you are. I was wondering if do you > know any wxPython forum just for GUIs ? > Good luck with your project and hope that some guru helps us out. If you are reading this via Usenet, you can subscribe to the newsgroup comp.soft-sys.wxw

unicode wrap unicode object?

2006-04-07 Thread ygao
>>> import sys >>> sys.setdefaultencoding("utf-8") >>> s='\xe9\xab\x98' #this uff-8 string >>> ss=U'\xe9\xab\x98' >>> s '\xe9\xab\x98' >>> ss u'\xe9\xab\x98' >>> how do I get ss from s? Can there be a way do this? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: calculating system clock resolution

2006-04-07 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > Hello all > > I have the problem of how to calculate the resolution of the system > clock. > Its now two days of head sratching and still there is nothing more than > these few lines on my huge white sheet of paper stiring at me. Lame I > know. > > import time > > t1 = ti

Re: calculating system clock resolution

2006-04-07 Thread jUrner
Maybe it was not too clear what I was trying to point out. I have to calculate the time time.time() requires to return the next tick of the clock. Should be about 0.01ms but this may differ from os to os. BTW (I'm new to linux) cat /proc/cpuinfo is nice but I have 2457.60 bogomips. Is this somet

Re: output formatting for user-defined types

2006-04-07 Thread Steven D'Aprano
On Thu, 06 Apr 2006 17:14:22 -0700, Russ wrote: >>I suggest another approach: play nice with the rest of Python by allowing >>people to convert your units into strings and floats. Once they have >>explicitly done so, it isn't your problem if they want to add 35 metres to >>18 kilograms and convert

Re: minidom + wxPython woes

2006-04-07 Thread Peter Hansen
Lonnie Princehouse wrote: > Oops, I missed a bracket... that should read: > > testxml = '' > > But it still crashes ;-) Maybe missing a question mark still too? (It's like a processing instruction, not an element.) -Peter -- http://mail.python.org/mailman/listinfo/python-list

How to call functions in Advapi32.dll using ctypes

2006-04-07 Thread Podi
I have ctypes version 0.9.6 and Python 2.4.2 running on Windows XP Professional. When I tried to use some functions in the Advapi32.dll, some functions are available and some are not. Is this a bug or feature by design? In the example below, I am trying to examine the 'InitiateSystemShutdown' fun

very strange problem in 2.4

2006-04-07 Thread conor . robinson
The Problem (very basic, but strange): I have a list holding a population of objects, each object has 5 vars and appropriate funtions to get or modify the vars. When objects in the list have identical vars (like all = 5 for var "a" and all = 10 for var "b" across all vars and objects) and i chang

Re: enviroment for Python similar to Visual C++

2006-04-07 Thread Brian Beck
Tomás Rodriguez Orta wrote: > I am new programator in python, and I am looking for an enviroment > graphics similar to visual c++, or delphi, where Can I create application > and forms, but over python? > sombody have any idea? Tomás, PythonCard is a good place to start: http://pythoncard.sourc

Re: Why did someone write this?

2006-04-07 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "Sandra-24" <[EMAIL PROTECTED]> wrote: > I can't believe I missed it in the documentation. Maybe it wasn't in > the offline version I was using, but more likely it was just one of > those things. > > So the trouble seems to be that the traceback holds a reference

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread Podi
For tutorial in Windows, I think it is better to use the more user-friendly interpreter from http://activestate.com/store/languages/register.plex?id=ActivePython. Advise the user to just click on the "Next" button without submitting the optional contact information. My $0.02 -- http://mail.pytho

Re: Characters contain themselves?

2006-04-07 Thread Steven D'Aprano
On Fri, 07 Apr 2006 15:50:53 +0200, WENDUM Denis 47.76.11 (agent) wrote: > While testing recursive algoritms dealing with generic lists I stumbled > on infinite loops which were triggered by the fact that (at least for my > version of Pyton) characters contain themselves. A "character" is just

Re: Characters contain themselves?

2006-04-07 Thread Steven D'Aprano
On Fri, 07 Apr 2006 15:50:53 +0200, WENDUM Denis 47.76.11 (agent) wrote: > But let's go back to more earthly matters. I couldn't find any clue in a > python FAQ after having googled with the following "Python strings FAQ" > about why this design choice and how to avoid falling in this trap > wi

Re: very strange problem in 2.4

2006-04-07 Thread John Zenger
Your list probably contains several references to the same object, instead of several different objects. This happens often when you use a technique like: list = [ object ] * 100 ..because although this does make copies when "object" is an integer, it just makes references in other cases. [E

Appending Elements in Element Tree

2006-04-07 Thread Ron Adam
In my program I have a lot of statements that append elements, but sometimes I don't want to append the element so it requres an if statement to check it, and that requires assigning the returned element from a function to a name or calling the funtion twice. e = ET.Element('name') e

Re: How to call functions in Advapi32.dll using ctypes

2006-04-07 Thread Serge Orlov
Podi wrote: > I have ctypes version 0.9.6 and Python 2.4.2 running on Windows XP > Professional. > > When I tried to use some functions in the Advapi32.dll, some functions > are available and some are not. Is this a bug or feature by design? Most likely feature by design. What you see in documenta

ANN: pyISBNdb 0.1

2006-04-07 Thread Daniel Bickett
Package: pyISBNdb Version: 0.1 Pre-Alpha Author: Daniel Bickett <[EMAIL PROTECTED]> Website: http://heureusement.org/programming/pyISBNdb/ ABOUT: pyISBNdb is a library that serves as a pythonic interface with the ISBNdb.com API, a service that provides a vast database of book information f

Re: very strange problem in 2.4

2006-04-07 Thread Steven D'Aprano
On Fri, 07 Apr 2006 21:18:12 -0400, John Zenger wrote: > Your list probably contains several references to the same object, > instead of several different objects. This happens often when you use a > technique like: > > list = [ object ] * 100 > > ..because although this does make copies when

Re: how you know you're a programming nerd

2006-04-07 Thread Ron Adam
When you are working on your programming project on Friday night instead of going out. When you do go out, you look forward to getting home so you can work on your programming project some more. -- http://mail.python.org/mailman/listinfo/python-list

Re: Characters contain themselves?

2006-04-07 Thread Atanas Banov
congratulations for (ostensibly) discovering the Barber's paradox (if the village barber shaves all and only those who don't shave tehmselves, who shaves the barber? http://en.wikipedia.org/wiki/Barber_paradox) in python ! :-D as far as i see it, you complaint is not just that any string X contai

Weekly Python Patch/Bug Summary

2006-04-07 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 391 open ( +2) / 3142 closed (+25) / 3533 total (+27) Bugs: 898 open ( -3) / 5731 closed (+44) / 6629 total (+41) RFE : 215 open ( +1) / 207 closed ( +1) / 422 total ( +2) New / Reopened Patches __ give roun

Re: Python equivalent of Perl-ISAPI?

2006-04-07 Thread Atanas Banov
it is your loss as well (so, 2 losses and 1 win). you comparing perl-ex with python-cgi is unfair, to say the least. let's count: 1. you ditched python ASP, because you dont know how it may port on linux (even if it's supported on apache and you probably never, ever, will have to do the said port

Re: Programming Tutorial for absolute beginners

2006-04-07 Thread John Salerno
Clodoaldo Pinto wrote: > John Salerno wrote: >> Also, is the section called "pretty printing" mistitled? Doesn't that >> name refer to the pprint module? >> > I didn't think about pprint. I used pretty in the sense of "Pleasing or > attractive in a graceful or delicate way." (dictionary) > > If yo

Re: how you know you're a programming nerd

2006-04-07 Thread John Salerno
Ron Adam wrote: > When you are working on your programming project on Friday night instead > of going out. Ok, you win. :) Oh wait, it's Friday night and I'm typing this message...dang it! -- http://mail.python.org/mailman/listinfo/python-list

Re: output formatting for user-defined types

2006-04-07 Thread Russ
> dist = 4 * ft > print >> out, dist/ft >> 4 >> Note, however, that this requires the user to explicity ask for the >> conversion. >How is this any more explicit and any less safe than: >dist = 4 * ft >print float(dist) Because the former specifies the actual units and the latter does n

Re: output formatting for user-defined types

2006-04-07 Thread Russ
Let me just revise earlier my reply slightly. >But in any case, I suspect you do automatically convert units. What do you >do in this case: Yes, I do automatically convert units, but I only do correct conversions. Conversion from any unit other than radian to a dimensionless float is incorrect, s

Re: very strange problem in 2.4

2006-04-07 Thread Ben Cartwright
John Zenger wrote: > Your list probably contains several references to the same object, > instead of several different objects. This happens often when you use a > technique like: > > list = [ object ] * 100 This is most likely what's going on. To the OP: please post the relevant code, including

freeze.py builds, but binary doesn't even run locally (shared GTK problem?)

2006-04-07 Thread kristian . hermansen
[EMAIL PROTECTED]:/tmp$ cat helloworld.py #!/usr/bin/env python import pygtk pygtk.require('2.0') import gtk class HelloWorld: def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.show() def main(self): gtk.main() if __na

Re: Screen placement based on screen resolution

2006-04-07 Thread Fredrik Lundh
"Pat" <[EMAIL PROTECTED]> wrote: > I am trying to place a dialog in the center of the screen based on a users > screen resolution. I can get the width and height of the screen, but I can't > seem to use the following: > > root.geometry('WxH+X+Y') > > It appears the values for X and Y need to be i

Re: Screen placement based on screen resolution

2006-04-07 Thread Fredrik Lundh
Lonnie Princehouse wrote: > Tkinter takes strings as its arguments; it's TCL's legacy. geometry strings are an X windows thing... > You can use string formatting for this: > > x = width/2-40 > y = height/2-30 > > root.geometry('%ldx%ld+%ld+%ld' % (width, height, x, y)) note that "+%ld" (why bot

Re: minidom + wxPython woes

2006-04-07 Thread Frank Millman
Lonnie Princehouse wrote: > Hi all, > > I'm getting a seg fault when I try to use minidom to parse some XML > inside a wxPython app. > > I was wondering if someone else could run the simple code below on > Linux and, if it doesn't crash horribly, post which versions of > (Python, wxPython) they ar

Re: unicode wrap unicode object?

2006-04-07 Thread Fredrik Lundh
"ygao" <[EMAIL PROTECTED]> wrote: > >>> import sys > >>> sys.setdefaultencoding("utf-8") hmm. what kind of bootleg python is that ? >>> import sys >>> sys.setdefaultencoding("utf-8") Traceback (most recent call last): File "", line 1, in ? AttributeError: 'module' object has no attribute 'set

Re: very strange problem in 2.4

2006-04-07 Thread Fredrik Lundh
John Zenger wrote: > Your list probably contains several references to the same object, > instead of several different objects. This happens often when you use a > technique like: > > list = [ object ] * 100 > > ..because although this does make copies when "object" is an integer, it > just makes

<    1   2