Re: negative polar axis

2007-08-13 Thread Erik Max Francis
Steve Holden wrote: About the best interpretation I can think of is to add 180 degrees to the angle and reverse the sign of the magnitude, but this would be a hack. Where are those coordinates coming from? Well, sometimes in polar coordinates (r, theta), r is allowed to be negative. The

Re: Colored text

2007-08-13 Thread pyscottishguy
On Aug 13, 10:37 am, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-08-13, Michael Bentley [EMAIL PROTECTED] wrote: On Aug 12, 2007, at 7:05 PM, Rohan wrote: Can some one tell me how do I get colored text. Say when I want to write something in a text file , how do I get it colored. You

Re: Adventure-Engines in Python

2007-08-13 Thread Paul Boddie
Wildemar Wildenburger wrote: OK, thanks. I should, of course, have been more specific. By saying adventure I mean the graphical variant (say, Monkey Island or Broken Sword), preferably but not necessarily in 2D. Perhaps you could get a start from this game:

Re: Process Control Help

2007-08-13 Thread Cameron Laird
In article [EMAIL PROTECTED], I mused: In article [EMAIL PROTECTED], Azazello [EMAIL PROTECTED] wrote: On Jul 31, 12:45 pm, Walt Leipold [EMAIL PROTECTED] wrote: . . . It has nothing to do with 'proprietary issues'. A lot of

Re: Module imports during object instantiation

2007-08-13 Thread Ritesh Raj Sarraf
Bruno Desthuilliers wrote: Ritesh Raj Sarraf a écrit : if lock is None or lock != 1: self.DispLock = False else: self.DispLock = threading.Lock() self.lock = True if os.name == 'posix': self.platform = 'posix'

Re: Module imports during object instantiation

2007-08-13 Thread Ritesh Raj Sarraf
Bruno Desthuilliers wrote: Ritesh Raj Sarraf a écrit : The initializer will be called *each time* you instanciate the class. And nothing prevents client code from calling it explicitelly as many times as it wants - ok, this would be rather strange, but this is still technically possible.

Re: Module imports during object instantiation

2007-08-13 Thread Ritesh Raj Sarraf
Steve Holden wrote: Ritesh Raj Sarraf wrote: class Log: def __init__(self, verbose, lock = None): if verbose is True: self.VERBOSE = True else: self.VERBOSE = False Better: self.VERBOSE = verbose or, if you suspect verbose might pass in a mutable

Re: programmatically define a new variable on the fly

2007-08-13 Thread osiris43
Anyway, I don´t see the point in this. Why don´t you just use something like X['g'] instead? While it's not what the original author is intending, it seems to me that dynamically adding fields could be useful when something like a database schema changed frequently. For example, a row in a

Re: Dictionary viewer and editor

2007-08-13 Thread Thomas Jollans
On Monday 13 August 2007, Ariel Balter wrote: http://mail.python.org/pipermail/python-list/2001-August/100288.html Did you ever finish writing this? YAML (without flow style) could qualify as tree format. example: yaml.dump ( {alpha: 1, beta: 2, otherstuff: {bug: None, cool: True, foo:

Re: Drawing a graph

2007-08-13 Thread Ghirai
I ended up using matplotlib (http://matplotlib.sourceforge.net). Thanks for the input everyone. -- Regards, Ghirai. -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.5 bug

2007-08-13 Thread Ricardo Aráoz
Dustan wrote: On Aug 11, 12:32 am, Thorsten Kampe [EMAIL PROTECTED] wrote: 4. don't do something you don't fully understand (in this case installing Python 2.5 and uninstalling Python 2.4) If we were all limited by that rule, none of us would never have used a computer in the first

Re: Finding gurus (was Re: Something in the function tutorial confused me.)

2007-08-13 Thread Ricardo Aráoz
Aahz wrote: In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: Because of this, a Google search for name surname python may sometimes help; when you get 116,000 hits, as for Steve Holden python, that may be a reasonable indication that the poster is one of the world's

Re: Assignments and Variable Substitution

2007-08-13 Thread Evan Klitzke
On 8/13/07, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var So that, in the end, var is '123' and an empty list is named '123' as well. The list assignments are created during a loop. You can't assign a variable whose name is 123, but you can do

Re: The Future of Python Threading

2007-08-13 Thread Seun Osewa
On Aug 11, 12:59 pm, Kay Schluehr [EMAIL PROTECTED] wrote: Have you checked out the processing [1] package? I've currently the impression that people want to change the whole language before they checkout a new package. It would be nice to read a review.

Re: Dictionary viewer and editor

2007-08-13 Thread Paddy
On Aug 13, 8:10 pm, Thomas Jollans [EMAIL PROTECTED] wrote: On Monday 13 August 2007, Ariel Balter wrote: http://mail.python.org/pipermail/python-list/2001-August/100288.html Did you ever finish writing this? YAML (without flow style) could qualify as tree format. example: yaml.dump (

Re: python + XUL

2007-08-13 Thread Bjoern Schliessmann
Madhu Alagu wrote: Has anyone had any success in getting XUL to work with python? Yes. http://www.google.de/search?q=xul+python http://en.wikipedia.org/wiki/Search_engine Björn -- BOFH excuse #74: You're out of memory -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators - more than just syntactic sugar

2007-08-13 Thread Bjoern Schliessmann
BJörn Lindqvist wrote: unpedagogically not separated from ordinary functions. Decorators _are_ ordinary functions. Remember the syntactic sugar in this thread? Regards, Björn -- BOFH excuse #338: old inkjet cartridges emanate barium-based fumes --

Re: wxPython - drawing without paint event

2007-08-13 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: While the book does have issues, it is better (in my opinion) than the only published Tkinter book, although both books are now outdated. Outdated to a certain limit. It's quite a bit more recent than those many tutorials around still today using from wxpython.wx

Re: Finding gurus (was Re: Something in the function tutorial confused me.)

2007-08-13 Thread kyosohma
On Aug 13, 2:22 pm, Ricardo Aráoz [EMAIL PROTECTED] wrote: Aahz wrote: In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: Because of this, a Google search for name surname python may sometimes help; when you get 116,000 hits, as for Steve Holden python, that may

Re: wxPython - drawing without paint event

2007-08-13 Thread kyosohma
On Aug 13, 3:15 pm, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: While the book does have issues, it is better (in my opinion) than the only published Tkinter book, although both books are now outdated. Outdated to a certain limit. It's quite a bit more

Re: Getting started with JPype

2007-08-13 Thread Ian Clark
Disclaimer: I have never used (or even heard of) JPype before... porter wrote: (snip) Package myclass.HelloWorld is not Callable (snip) from jpype import * startJVM(getDefaultJVMPath(), -ea, -Djava.class.path=D:/tmp/jpype- reli/test/dist/test.jar'' ) package = JPackage(myclass)

Re: negative polar axis

2007-08-13 Thread John K Masters
On 10:58 Mon 13 Aug , Erik Max Francis wrote: Steve Holden wrote: About the best interpretation I can think of is to add 180 degrees to the angle and reverse the sign of the magnitude, but this would be a hack. Where are those coordinates coming from? Well, sometimes in polar

JPype - passing to Java main

2007-08-13 Thread unlikeablePorpoise
I am trying to get JPype to pass a String into a Java class main function. Demonstration code below: =JAVA package com; public class JPypeTest { public static void main(String args[]) { System.out.println(args[0]); } public void printArgument(String

chmod g+ Equivalent

2007-08-13 Thread milan_sanremo
I've read the documentation on os.chmod() and can implement all the standard commands, but what is the syntax for the equivalent of chmod g + to set the group id? -- http://mail.python.org/mailman/listinfo/python-list

(sort of) deterministic timing in Python

2007-08-13 Thread John Fisher
I am working on a framework for data acquisition in Python 2.5, am trying to get a structure going more like this: mark start time start event event finishes count time until next interval start second event… rather than this: start event event finishes sleep for interval start

Re: chmod g+ Equivalent

2007-08-13 Thread Lawrence Oluyede
milan_sanremo [EMAIL PROTECTED] wrote: I've read the documentation on os.chmod() and can implement all the standard commands, but what is the syntax for the equivalent of chmod g + to set the group id? chmod() [1] takes as the second parameter a bitwise or-ed combination of a series of values.

Re: chmod g+ Equivalent

2007-08-13 Thread Bjoern Schliessmann
milan_sanremo wrote: I've read the documentation on os.chmod() and can implement all the standard commands, but what is the syntax for the equivalent of chmod g + to set the group id? Group ID is set using os.chown. Regards, Björn -- BOFH excuse #190: Proprietary Information. --

Re: wxPython - drawing without paint event

2007-08-13 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: I guess I haven't looked up any wxPython tutorials. I typically use a combination of the wxPython wiki, the demo and the WIA book for my work. Me too (except the mailing list, occasionally), and it works quite well. Regards, Björn -- BOFH excuse #306: CPU-angle

Re: chmod g+ Equivalent

2007-08-13 Thread milan_sanremo
On Aug 13, 6:42 pm, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: milan_sanremo wrote: I've read the documentation on os.chmod() and can implement all the standard commands, but what is the syntax for the equivalent of chmod g + to set the group id? Group ID is set using os.chown.

Re: chmod g+ Equivalent

2007-08-13 Thread milan_sanremo
On Aug 13, 6:33 pm, [EMAIL PROTECTED] (Lawrence Oluyede) wrote: milan_sanremo [EMAIL PROTECTED] wrote: I've read the documentation on os.chmod() and can implement all the standard commands, but what is the syntax for the equivalent of chmod g + to set the group id? chmod() [1] takes as

Problem with Thread.join()

2007-08-13 Thread Robert Dailey
Hi, I have a class that derives from threading.Thread. To signal the thread to exit its infinite loop, I set an Event. Once the thread checks Event.isSet() and it is true, it proceeds to break out of the loop and exit the function. In the main thread, right after calling Event.set(), I call

Re: ANN: Compyler 0.1

2007-08-13 Thread Irmen de Jong
Thanks Grant for the very informative response. -irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: JPype - passing to Java main

2007-08-13 Thread Ian Clark
[EMAIL PROTECTED] wrote: I am trying to get JPype to pass a String into a Java class main function. Demonstration code below: =JAVA package com; public class JPypeTest { public static void main(String args[]) { System.out.println(args[0]); }

Re: (sort of) deterministic timing in Python

2007-08-13 Thread Matimus
Do you see the difference? I get a true fixed interval from the first, including the time to accomplish the event task(s). In the second case, the sleep just gets tacked on at the end of the events, not very deterministic (timing-wise). Check out the sched (scheduler) module

Re: (sort of) deterministic timing in Python

2007-08-13 Thread [EMAIL PROTECTED]
On Aug 13, 5:16 pm, [EMAIL PROTECTED] (John Fisher) wrote: I am working on a framework for data acquisition in Python 2.5, am trying to get a structure going more like this: mark start time start event event finishes count time until next interval start second event... rather

Re: Finding gurus (was Re: Something in the function tutorial confused me.)

2007-08-13 Thread Steve Holden
[EMAIL PROTECTED] wrote: On Aug 13, 2:22 pm, Ricardo Aráoz [EMAIL PROTECTED] wrote: Aahz wrote: In article [EMAIL PROTECTED], Alex Martelli [EMAIL PROTECTED] wrote: Because of this, a Google search for name surname python may sometimes help; when you get 116,000 hits, as for Steve Holden

Re: chmod g+ Equivalent

2007-08-13 Thread Lawrence Oluyede
milan_sanremo [EMAIL PROTECTED] wrote: I understand that for setting the standard rwx permissions, but how do these affect the ability to change the setgid bit? Under Solaris you cannot do it from the command line in absolute mode, so perhaps it is not possible in python I'm trying to get

import * is not allowed ??

2007-08-13 Thread stef mientki
hello, can anyone explain a little bit more what this error message means: import * is not allowed in function 'JAL_MAIN_RUN' because it contains a nested function with free variables (JAL_simulation_file.py, line 22) what are free variables ? thanks, Stef Mientki --

AttributeError: 'module' object has no attribute 'HTTPSHandler'

2007-08-13 Thread Matt McCredie
I am using Fedora Core 4 linux. Where should I look for _ssl.pyd ? I am trying to build and use Python-2.5.1 I don't have access to that type of system. I do know that you need OpenSSL to use ssl. It might be as simple as just finding and installing OpenSSL for fedora. You can also find the

Re: Python script for mobile platforms -- suggested?

2007-08-13 Thread Robert Dailey
*bump* On 8/12/07, Robert Dailey [EMAIL PROTECTED] wrote: Hi, I'm currently developing a game for a cell phone. The game has a GUI system that's currently using XML to define the individual menus. Basically this means that for every single menu the user goes to, it loads and parses an XML

Re: import * is not allowed ??

2007-08-13 Thread Miki
Hello Stef, can anyone explain a little bit more what this error message means: import * is not allowed in function 'JAL_MAIN_RUN' because it contains a nested function with free variables (JAL_simulation_file.py, line 22) what are free variables ?

Re: wxPython before MainLoop

2007-08-13 Thread [david]
Well yes, I have tried this app with native windows, and I know how to do it. But if all wxPython can offer is a poor imitation of MFC, I'm better off using MFC aren't I? And too all those people who wrote back to insist that users MUST explicitly build a multi-threaded framework for wxPython:

Re: chmod g+ Equivalent

2007-08-13 Thread Steve Holden
milan_sanremo wrote: I've read the documentation on os.chmod() and can implement all the standard commands, but what is the syntax for the equivalent of chmod g + to set the group id? I assume when you say to set the group id you actually mean to assert the setgid bit? I further presume

Re: Assignments and Variable Substitution

2007-08-13 Thread Steve Holden
Evan Klitzke wrote: On 8/13/07, brad [EMAIL PROTECTED] wrote: I'd like to do something like this: var = '123' %s = [], %var So that, in the end, var is '123' and an empty list is named '123' as well. The list assignments are created during a loop. You can't assign a variable whose name

output object fields into a file

2007-08-13 Thread Alex
Hello, I am rather new to python. Maybe my thinking is in the paradigm of C++, that makes me hard to make sense of some python scripts (interacting with C# code) written by my colleague. I am thinking of outputting all objects and their fields of each script into a file. The tricky part is I

Re: wxPython before MainLoop

2007-08-13 Thread Steve Holden
[david] wrote: Well yes, I have tried this app with native windows, and I know how to do it. But if all wxPython can offer is a poor imitation of MFC, I'm better off using MFC aren't I? And too all those people who wrote back to insist that users MUST explicitly build a multi-threaded

Re: check if var is dict

2007-08-13 Thread simohayha
check String is def isStringLike(anobj): try: anobj + '' except: return False else: return True -- http://mail.python.org/mailman/listinfo/python-list

Re: Car Air Conditioners

2007-08-13 Thread Robert Coe
On Mon, 13 Aug 2007 08:18:40 -, Lepi Duja [EMAIL PROTECTED] wrote: : All the informations about car air conditioners can be found on this : website... : : http://car-air-conditioning.blogspot.com/ It's hard to imagine anything more OT in this newsgroup, but FWIW my 2003 Kia has the most

Icons for GUI development

2007-08-13 Thread Benjamin
I'm developing a mail client. Since GUI are usually improved with some icons, I'm looking for some. Because I'm not a very gifted artist I'm searching for a library of GPL or public domain icons. Any suggestions? -- http://mail.python.org/mailman/listinfo/python-list

pyserial win32 port numbering

2007-08-13 Thread [david]
http://pyserial.sourceforge.net/ port numbering starts at zero, no need to know the port name in the user program But the implementation in SerialWin32 is just (Portnum +1) So there is no 'start' to the port numbering at all: there is no assurance that you will have a pySerial serial

Re: output object fields into a file

2007-08-13 Thread Zentrader
On Aug 13, 6:17 pm, Alex [EMAIL PROTECTED] wrote: Hello, I am rather new to python. Maybe my thinking is in the paradigm of C++, that makes me hard to make sense of some python scripts (interacting with C# code) written by my colleague. I am thinking of outputting all objects and their

Re: Car Air Conditioners

2007-08-13 Thread greg
Robert Coe wrote: It's hard to imagine anything more OT in this newsgroup It's on topic as long as the air conditioner can be programmed in Python. With the amount of electronics being used in cars these days, that's not entirely beyond the realms of possibility... -- Greg --

Duke's Bank Equivalent?

2007-08-13 Thread kcfmartinez
Hi, The J2EE tutorial provides developers with The Duke's Bank, which can be used for implementing a banking application (customer's make deposits, withdrawls, earn interest, etc.). Does anyone know of an equivalent in Python? Thanks in advance. --

Re: wxPython before MainLoop

2007-08-13 Thread [david]
Steve, it wasn't me that raised the comparison with MFC. If you don't think that's a helpful comparison, why not reply to that post instead? I don't mind Björn's suggestion that I don't know what I'm talking about, because I started it by telling him he was wrong. But you don't have that excuse.

Re: Configuring apache to execute python scripts using mod_python handler

2007-08-13 Thread joe jacob
On Aug 13, 9:44 pm, 7stud [EMAIL PROTECTED] wrote: On Aug 13, 5:16 am, joe jacob [EMAIL PROTECTED] wrote: I configured apache to execute python scripts using mod_python handler. I followed below mentioned steps to configure apache. 1. In http.conf I added Directory

Re: Python script for mobile platforms -- suggested?

2007-08-13 Thread Jay Loden
Robert Dailey wrote: I'm currently developing a game for a cell phone. The game has a GUI system that's currently using XML to define the individual menus. Basically this means that for every single menu the user goes to, it loads and parses an XML file. Would using Python

Re: Icons for GUI development

2007-08-13 Thread Yu-Xi Lim
Benjamin wrote: I'm developing a mail client. Since GUI are usually improved with some icons, I'm looking for some. Because I'm not a very gifted artist I'm searching for a library of GPL or public domain icons. Any suggestions? I frequently use the Crystal icon set.

Re: Car Air Conditioners

2007-08-13 Thread Neil Cerutti
On 2007-08-14, greg [EMAIL PROTECTED] wrote: Robert Coe wrote: It's hard to imagine anything more OT in this newsgroup It's on topic as long as the air conditioner can be programmed in Python. With the amount of electronics being used in cars these days, that's not entirely beyond the

Memory leak when creating lots of object

2007-08-13 Thread Godzilla
Hello, I have a program that create and pop an object off a queue, but it is experiencing some memory leakage. I have been unable to detect where the memory leakage occur. The strange thing is when i replace the object creation with a plain integer/string, the leak goes away... Here's the code I

Re: decorators - more than just syntactic sugar

2007-08-13 Thread Michele Simionato
On Aug 13, 7:46 pm, Alexander Schmolck [EMAIL PROTECTED] wrote: Michele Simionato [EMAIL PROTECTED] writes: Well, I argued may times that syntactic sugar is important (all Turing complete languages differs by syntactic sugar only) Although I agree that mere syntactic sugar matters, I think

Re: Binary, Hex, and Decimal string conversions

2007-08-13 Thread Dick Moores
At 07:35 AM 8/13/2007, Robert Dailey wrote: Just curious Dick, why are you making your own to_base method? Doesn't the source I provided in my earlier email give you all that you need? I was hoping my source might be useful to a few people, even though it's pretty trivial code. I didn't roll my

[ python-Bugs-1772890 ] Py Lib Ref, 3.6.1 String Methods startswith() typo

2007-08-13 Thread SourceForge.net
Bugs item #1772890, was opened at 2007-08-13 02:10 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1772890group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1772916 ] xmlrpclib crash when PyXML installed

2007-08-13 Thread SourceForge.net
Bugs item #1772916, was opened at 2007-08-13 18:15 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1772916group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1772890 ] Py Lib Ref, 3.6.1 String Methods startswith() typo

2007-08-13 Thread SourceForge.net
Bugs item #1772890, was opened at 2007-08-13 07:10 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1772890group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1772890 ] Py Lib Ref, 3.6.1 String Methods startswith() typo

2007-08-13 Thread SourceForge.net
Bugs item #1772890, was opened at 2007-08-13 07:10 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1772890group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1772916 ] xmlrpclib crash when PyXML installed

2007-08-13 Thread SourceForge.net
Bugs item #1772916, was opened at 2007-08-13 03:15 Message generated for change (Comment added) made by alanmcintyre You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1772916group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1770416 ] Decimal.__int__ overflows for large values

2007-08-13 Thread SourceForge.net
Bugs item #1770416, was opened at 2007-08-08 17:43 Message generated for change (Comment added) made by facundobatista You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1770416group_id=5470 Please note that this message will contain a full copy of the

[ python-Bugs-1770009 ] decimal.Decimal(trash) produces informationless exception

2007-08-13 Thread SourceForge.net
Bugs item #1770009, was opened at 2007-08-08 09:44 Message generated for change (Comment added) made by facundobatista You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1770009group_id=5470 Please note that this message will contain a full copy of the

[ python-Bugs-1772916 ] xmlrpclib crash when PyXML installed

2007-08-13 Thread SourceForge.net
Bugs item #1772916, was opened at 2007-08-13 18:15 Message generated for change (Comment added) made by ldeller You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1772916group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1772916 ] xmlrpclib crash when PyXML installed

2007-08-13 Thread SourceForge.net
Bugs item #1772916, was opened at 2007-08-13 03:15 Message generated for change (Comment added) made by alanmcintyre You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1772916group_id=5470 Please note that this message will contain a full copy of the comment

<    1   2