Re: Importing a file (not a module).

2009-02-09 Thread Hendrik van Rooyen
"Luis Zarrabeitia" wrote: >Is there any way to "import" a .py file that is not on sys.path? >I'd like to 'import' a file that resides somewhere on my filesystem without >having to add it's directory to sys.path. At first, I thought that something like > >my_module = __import__("path/to/file") > >

Re: Simple question - stock market simulation

2009-02-09 Thread Hendrik van Rooyen
"cptn.spoon" wrote: On Feb 9, 3:58 pm, Paul Rubin wrote: >Thanks Paul! I thought this might be the case. So how would I get the >StockMarket class instance to contain many Stock class instances and >then be able to iterate through them? I'm guessing the basic struc

Local python web server problem

2009-02-09 Thread Farsheed Ashouri
Hi everyone. I have started to develop a web base software for renderfarm managing. I run the cherrypy hello world! example and when I visit 127.0.0.1:8080 on firefox, a nice "Hello World" appears. I am on ubuntu and my ip in local network is 192.168.100.18 but when I visit 192.168.100.18, there is

Re: Python binaries with VC++ 8.0?

2009-02-09 Thread Mark Hammond
On 9/02/2009 5:51 PM, Greg Ewing wrote: Is there anywhere I can download a set of Python binaries, of any version, that have been built with Visual C++ 8.0? IIRC, no. Python skipped that version of MSVC. I believe Python 2.5 builds easily with vc8 project files in svn though. I'm trying t

Small socket problem

2009-02-09 Thread John O'Hagan
Hi, I'm using the socket module (python 2.5) like this (where 'options' refers to an optparse object) to connect to the Fluidsynth program: host = "localhost" port = 9800 fluid = socket(AF_INET, SOCK_STREAM) try: fluid.connect((hos

RE: How to copy an instance without its cStringIO.StringO item ?

2009-02-09 Thread Barak, Ron
Hi John, Thanks for the suggestion. What I do now in preparation for pickling is: for_pickle_log_stream = LogStream(sac_log_file) for key in log_stream.__dict__: if key != "input_file": for_pickle_log_stream.__dict__[key] = log_stream.

Re: Python Module: nift

2009-02-09 Thread bearophileHUGS
Steven D'Aprano: > There's less code, fewer bugs and lines. Less applies to continuous > quantities, like weight and "amount of code", and fewer applies to > countable quantities. Thank you, I'll try to improve my use of the language. > Within reason, naturally. There's a reason why we write: >

Variable + String Format

2009-02-09 Thread Joel Ross
Hi all, I have this piece of code: # wordList = "/tmp/Wordlist" file = open(wordList, 'r+b') def readLines(): for line in file.read(): if not line: break print line + '.com ' re

Re: Variable + String Format

2009-02-09 Thread Chris Rebert
On Tue, Feb 10, 2009 at 2:03 AM, Joel Ross wrote: > Hi all, > > I have this piece of code: > # > > wordList = "/tmp/Wordlist" > file = open(wordList, 'r+b') Why are you opening the file in binary mode? It's content is text!

Re: How to copy an instance without its cStringIO.StringO item ?

2009-02-09 Thread John Machin
On 9/02/2009 8:51 PM, Barak, Ron wrote: Hi John, Thanks for the suggestion. What I do now in preparation for pickling is: for_pickle_log_stream = LogStream(sac_log_file) for key in log_stream.__dict__: if key != "input_file": for_

Re: Variable + String Format

2009-02-09 Thread John Machin
On Feb 9, 9:13 pm, Chris Rebert wrote: > On Tue, Feb 10, 2009 at 2:03 AM, Joel Ross wrote: > > Hi all, > > > I have this piece of code: > > # > > > wordList = "/tmp/Wordlist" > > file = open(wordList, 'r+b') > > Why are you o

Re: Tkinter w.pack()?

2009-02-09 Thread Pete Forman
"W. eWatson" writes: > MRAB wrote: >> W. eWatson wrote: > ... >>> I thought some months ago, I found Google commands that would >>> operate in the browser link window. Guess not. >>> >>> BTW, isn't there an O'Reilly book on Google hacks of this sort? >>> Where else does one find out about thes

Which core am I running on?

2009-02-09 Thread psaff...@googlemail.com
Is there some way I can get at this information at run-time? I'd like to use it to tag diagnostic output dumped during runs using Parallel Python. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Local python web server problem

2009-02-09 Thread Gerhard Häring
Farsheed Ashouri wrote: > Hi everyone. I have started to develop a web base software for > renderfarm managing. > I run the cherrypy hello world! example and when I visit > 127.0.0.1:8080 > on firefox, a nice "Hello World" appears. I am on ubuntu and my ip in > local network is 192.168.100.18 > but

Re: Which core am I running on?

2009-02-09 Thread Gerhard Häring
psaff...@googlemail.com wrote: > Is there some way I can get at this information at run-time? I'd like > to use it to tag diagnostic output dumped during runs using Parallel > Python. Looks like I have answered a similar question once, btw. ;-) http://objectmix.com/python/631346-parallel-python.h

Re: Which core am I running on?

2009-02-09 Thread Gerhard Häring
psaff...@googlemail.com wrote: > Is there some way I can get at this information at run-time? I'd like > to use it to tag diagnostic output dumped during runs using Parallel > Python. There should be a way, but not with the Python standard library. It's also platform-specific. What are you using?

Re: Which core am I running on?

2009-02-09 Thread psaff...@googlemail.com
On 9 Feb, 12:24, Gerhard Häring wrote: > Looks like I have answered a similar question once, btw. ;-) > Ah, yes - thanks. I did Google for it, but obviously didn't have the right search term. Cheers, Peter -- http://mail.python.org/mailman/listinfo/python-list

Too many open files

2009-02-09 Thread psaff...@googlemail.com
I'm building a pipeline involving a number of shell tools. In each case, I create a temporary file using tempfile.mkstmp() and invoke a command ("cmd < /tmp/tmpfile") on it using subprocess.Popen. At the end of each section, I call close() on the file handles and use os.remove() to delete them. Ev

convert the ip packet to and from RS-232 packet

2009-02-09 Thread Li Han
Hi, I need to use radio to connect two local ip network, each local network has a server computer which connects to a radio with RS-232 interface. I need to write a program to convert the local ip packet into RS-232 packet, so the radio can send packetes to the remote radio. I don't want to reinve

wxPython vs Glade?

2009-02-09 Thread Michael Pobega
I'm looking for opinions on the best toolkit for a beginner to use with wxPython. It doesn't necessarily need to be the most efficient toolkit, but something I can use for basic programs (a Twitter client, Wordpress blogging client, etc) just to learn Python. wxWidgets seems nice because it's port

Re: Too many open files

2009-02-09 Thread Ulrich Eckhardt
psaff...@googlemail.com wrote: > I'm building a pipeline involving a number of shell tools. In each > case, I create a temporary file using tempfile.mkstmp() and invoke a > command ("cmd < /tmp/tmpfile") on it using subprocess.Popen. > > At the end of each section, I call close() on the file handl

Re: convert the ip packet to and from RS-232 packet

2009-02-09 Thread Steve Holden
Li Han wrote: > Hi, I need to use radio to connect two local ip network, each local > network has a server computer which connects to a radio with RS-232 > interface. I need to write a program to convert the local ip packet > into RS-232 packet, so the radio can send packetes to the remote > radio

Re: wxPython vs Glade?

2009-02-09 Thread Benjamin Kaplan
On Mon, Feb 9, 2009 at 8:23 AM, Michael Pobega wrote: > I'm looking for opinions on the best toolkit for a beginner to use with > wxPython. It doesn't necessarily need to be the most efficient toolkit, > but something I can use for basic programs (a Twitter client, Wordpress > blogging client, et

Re: wxPython vs Glade?

2009-02-09 Thread Steve Holden
Michael Pobega wrote: > I'm looking for opinions on the best toolkit for a beginner to use with > wxPython. It doesn't necessarily need to be the most efficient toolkit, > but something I can use for basic programs (a Twitter client, Wordpress > blogging client, etc) just to learn Python. > > wxWi

BeautifulSoup -converting unicode to numerical representaion

2009-02-09 Thread S.Selvam Siva
Hi all, I need to parse feeds and post the data to SOLR.I want the special characters(Unicode char) to be posted as numerical representation, For eg, *'* --> ’ (for which HTML equivalent is ’) I used BeautifulSoup,which seems to be allowing conversion from "&#;"( numeric values )to unicode ch

Re: convert the ip packet to and from RS-232 packet

2009-02-09 Thread Tino Wildenhain
Hi, Li Han wrote: Hi, I need to use radio to connect two local ip network, each local network has a server computer which connects to a radio with RS-232 interface. I need to write a program to convert the local ip packet into RS-232 packet, so the radio can send packetes to the remote radio. I

Re: Which core am I running on?

2009-02-09 Thread psaff...@googlemail.com
On 9 Feb, 12:24, Gerhard Häring wrote: > http://objectmix.com/python/631346-parallel-python.html > Hmm. In fact, this doesn't seem to work for pp. When I run the code below, it says everything is running on the one core. import pp import random import time from string import lowercase ncpus = 3

cannot install

2009-02-09 Thread Vladimír Župka
I have Mac OS X Leopard 10.5.6 and I downloaded and unpacked Python 3.0 into a folder (/Library/Frameworks/Python.framework) and ran commands: cd /Library/Frameworks/Python.framework/Python-3.0 python setup.py install and got the message reporting a syntax error: Macintosh:~ vzupka$ /bin/cs

thread. question

2009-02-09 Thread Tim Wintle
Hi, This is my first post here - google hasn't helped much but sorry if this has been asked before. I've been wondering about some of the technicalities of locks in python (2.4 and 2.5 mainly). I'm using the "old" thread module as (1) I prefer the methods and (2) It should be a tiny bit faster.

Re: Small socket problem

2009-02-09 Thread Gabriel Genellina
En Mon, 09 Feb 2009 07:43:36 -0200, John O'Hagan escribió: I'm using the socket module (python 2.5) like this (where 'options' refers to an optparse object) to connect to the Fluidsynth program: host = "localhost" port = 9800 fluid = socket(AF_INET, SOCK

Re: wxPython vs Glade?

2009-02-09 Thread Michael Pobega
On Mon, Feb 09, 2009 at 08:30:13AM -0500, Benjamin Kaplan wrote: > On Mon, Feb 9, 2009 at 8:23 AM, Michael Pobega wrote: > > > I'm looking for opinions on the best toolkit for a beginner to use with > > wxPython. It doesn't necessarily need to be the most efficient toolkit, > > but something I ca

Re: MacPython 2.5 IDLE font size

2009-02-09 Thread Scott David Daniels
I (Scott David Daniels) wrote: choha...@gmail.com wrote: Is there a way to adjust the default font size in IDLE, in MacPython 2.5? The default now is too tiny. I have to use this version of MacPython. As far as I searched, I can't find how I do this. If you can read what you have at all, try t

Re: Variable + String Format

2009-02-09 Thread Gabriel Genellina
En Tue, 10 Feb 2009 08:03:06 -0200, Joel Ross escribió: # wordList = "/tmp/Wordlist" file = open(wordList, 'r+b') def readLines(): for line in file.read(): if not line: break print lin

Re: Variable + String Format

2009-02-09 Thread Gabriel Genellina
En Tue, 10 Feb 2009 08:03:06 -0200, Joel Ross escribió: # wordList = "/tmp/Wordlist" file = open(wordList, 'r+b') def readLines(): for line in file.read(): if not line: break print lin

Py2app Py2exe and losing extensibility

2009-02-09 Thread member Basu
I'm currently working on a project that allows users to write their own Python modules as simple extensions (basically output formatters). I would like to do a cross-platform release and so I'm using PyQt and will be trying to convert it to native builds using Py2app and Py2xe. I don't want users t

Re: convert the ip packet to and from RS-232 packet

2009-02-09 Thread bobicanprogram
On Feb 9, 8:13 am, Li Han wrote: > Hi, I need to use radio to connect two local ip network, each local > network has a server computer which connects to a radio with RS-232 > interface. I need to write a program to convert the local ip packet > into RS-232 packet, so the radio can send packetes t

Re: thread. question

2009-02-09 Thread bieffe62
On Feb 9, 2:47 pm, Tim Wintle wrote: > Hi, > This is my first post here - google hasn't helped much but sorry if this > has been asked before. > > I've been wondering about some of the technicalities of locks in python > (2.4 and 2.5 mainly). > > I'm using the "old" thread module as (1) I prefer t

Re: thread. question

2009-02-09 Thread Christian Heimes
Tim Wintle schrieb: > Hi, > This is my first post here - google hasn't helped much but sorry if this > has been asked before. > > I've been wondering about some of the technicalities of locks in python > (2.4 and 2.5 mainly). > > I'm using the "old" thread module as (1) I prefer the methods and

Re: convert the ip packet to and from RS-232 packet

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 05:13:10 -0800 (PST), Li Han wrote: Hi, I need to use radio to connect two local ip network, each local network has a server computer which connects to a radio with RS-232 interface. I need to write a program to convert the local ip packet into RS-232 packet, so the radio can

version in setup.cfg

2009-02-09 Thread Jasiu
Hi guys, I have a question about setup.py and setup.cfg: I work in a company and we use Subversion to keep our stuff. We have a post-commit rule that does the following: whenever there is a commit to /tags/ directory, a binary package is built automatically. The tag's name is the new version of t

Re: Py2app Py2exe and losing extensibility

2009-02-09 Thread Gabriel Genellina
En Mon, 09 Feb 2009 12:43:46 -0200, member Basu escribió: I'm currently working on a project that allows users to write their own Python modules as simple extensions (basically output formatters). I would like to do a cross-platform release and so I'm using PyQt and will be trying to conv

Re: Small socket problem

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 09:43:36 +, John O'Hagan wrote: Hi, I'm using the socket module (python 2.5) like this (where 'options' refers to an optparse object) to connect to the Fluidsynth program: host = "localhost" port = 9800 fluid = socket(AF_INET, SOCK_STREAM

Re: thread. question

2009-02-09 Thread Tim Wintle
Thanks for both replies, On Mon, 2009-02-09 at 15:59 +0100, Christian Heimes wrote: > You shouldn't use the thread module directly. It's not meant to be used > by a user. Please stick to the threading module. You won't notice a > slowdown, trust me :) I'm aware that thread is being renamed to _thr

Re: thread. question

2009-02-09 Thread Jean-Paul Calderone
On Mon, 09 Feb 2009 15:34:02 +, Tim Wintle wrote: Thanks for both replies, On Mon, 2009-02-09 at 15:59 +0100, Christian Heimes wrote: You shouldn't use the thread module directly. It's not meant to be used by a user. Please stick to the threading module. You won't notice a slowdown, trust

Re: cannot install

2009-02-09 Thread Benjamin Kaplan
On Mon, Feb 9, 2009 at 9:05 AM, Vladimír Župka wrote: > I have Mac OS X Leopard 10.5.6 and I downloaded and unpacked Python 3.0 > into a folder (/Library/Frameworks/Python.framework) and ran commands: > > cd /Library/Frameworks/Python.framework/Python-3.0 > python setup.py install > > and got the

Network packets processor advice

2009-02-09 Thread Krzysztof Retel
Hi, I am wrting a network packet processor. The processor listens on a specific port for incomming UDP or TCP packets. When the packet arrives it has to parse it, store in DB and if this succeed it has to acknowledge the packet to the client. Now the problem is that I want to have a control over p

Re: Local python web server problem

2009-02-09 Thread Rob
> I run the cherrypy hello world! example and when I visit > 127.0.0.1:8080 > on firefox, a nice "Hello World" appears. I am on ubuntu and my ip in > local network is 192.168.100.18 > but when I visit 192.168.100.18, there is another page: "It Works!". > What is "It Works!"? and when I type 192.168

Re: easy_install

2009-02-09 Thread hall . jeff
I had it downloaded and sitting in the root c:\ but didn't get it to run because I didn't think about the \scripts folder not being in the Path. Problem solved and fixed. Thank you all for your help. On a side note, "easy_install MySQL-python" produced the following messages: Searching for MySQL-p

Re: Simple question - stock market simulation

2009-02-09 Thread Anthra Norell
cptn.spoon wrote: I'm trying to create an incredibly simple stock market simulator to be used in a childrens classroom and I'm wondering whether someone can point me in the right direction. I basically want to be able to have a stock struct as follows: StockName = "Test" StockPriceList = (12,13

Re: programming by evolution?

2009-02-09 Thread Xah Lee
Xah Lee wrote: > ... > if you want software engineering books, i suggest try some books that > are based on statistical survey, as opposed to some dignitary's > “opinion” or current fashion & trends that comes with a jargon. These > type of books are a dime a dozen, every year, they come and go. Th

Re: Calling into Python from a C thread

2009-02-09 Thread Aahz
[posted & e-mailed] In article , Philip Semanchuk wrote: > >I'm trying call Python from inside of a C thread that's running in a >Python extension I've written and I am not having much luck. My C >thread function consists of simply this, and I get a segmentation >fault from Python: Becaus

GAE read binary file into db.BlobProperty()

2009-02-09 Thread alex goretoy
How to read Binary file into GAE(Google App Engine) db.BlobProperty() datastore? -Alex Goretoy http://www.goretoy.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Flattening lists

2009-02-09 Thread ptn
On Feb 5, 2:07 pm, rdmur...@bitdance.com wrote: > Quoth J Kenneth King : > > > > > mk writes: > > > > Hello everybody, > > > > Any better solution than this? > > > > def flatten(x): > > >     res = [] > > >     for el in x: > > >         if isinstance(el,list): > > >             res.extend(flatten

Re: Threading / Queue management

2009-02-09 Thread Aahz
In article , Power Button wrote: > >I wonder if anyone can help with the following. I have written a >script which polls a server and if it finds and pending orders, it >instantiates an new object (foo) - in a new thread and processes some >data. In the new object (foo), there are also some long

Help needed to retrieve text from a text-file using RegEx

2009-02-09 Thread Oltmans
Here is the scenario: It's a command line program. I ask user for a input string. Based on that input string I retrieve text from a text file. My text file looks like following Text-file: - AbcManager=C:\source\code\Modules\Code-AbcManager\ AbcTest=C:\source\code\Modules\Code-AbcTest\

Re: global name 'sqrt' is not defined

2009-02-09 Thread Rob
> Any ideas? If I do something like "import math" in the subfunction, > then the error changes to "global name 'math' is not defined". Presumably ipython does an import so you need to import it yourself something like: from math import sqrt at the top of your source file. I don't know why mat

Re: Calling into Python from a C thread

2009-02-09 Thread Philip Semanchuk
On Feb 9, 2009, at 12:02 PM, Aahz wrote: [posted & e-mailed] In article , Philip Semanchuk wrote: I'm trying call Python from inside of a C thread that's running in a Python extension I've written and I am not having much luck. My C thread function consists of simply this, and I get a segm

Re: wxPython vs Glade?

2009-02-09 Thread Bruno Desthuilliers
Michael Pobega a écrit : I'm looking for opinions on the best toolkit for a beginner to use with wxPython. wxPython *is* a GUI toolkit (or, more exactly, a python binding for wxWidgets). wxWidgets seems nice because it's portable, but I'm not sure how many of my libraries are portable (a l

How to use buildout with a scripts directory?

2009-02-09 Thread Jon
Hello, I am trying to use buildout and am having trouble to figure out how to get it to install the scripts that come with a package. They are present inside the egg which is installed by buildout, but they don't end up in the bin directory. After running buildout my bin directory is empty, but I

Re: Help needed to retrieve text from a text-file using RegEx

2009-02-09 Thread Chris Rebert
On Mon, Feb 9, 2009 at 9:22 AM, Oltmans wrote: > Here is the scenario: > > It's a command line program. I ask user for a input string. Based on > that input string I retrieve text from a text file. My text file looks > like following > > Text-file: > - > AbcManager=C:\source\code\Modul

generator object or 'send' method?

2009-02-09 Thread Aaron Brady
Hello, I am writing a generator to return a sequence of numbers with some variation. The parameters of the variation can be changed by the caller, even after the generator is started. My question is, is it better to wrap the generator in an object, so that the parameters can be changed just by a

Putting asterisks around text

2009-02-09 Thread todp...@hotmail.com
I'm trying to write a program that puts asterisks around the input text using while loop. I can do this without using while loop, but how can you do that using while loop?Example:Enter a string: Hello world***Hello world***

Re: Help needed to retrieve text from a text-file using RegEx

2009-02-09 Thread Bruno Desthuilliers
Oltmans a écrit : Here is the scenario: It's a command line program. I ask user for a input string. Based on that input string I retrieve text from a text file. My text file looks like following Text-file: - AbcManager=C:\source\code\Modules\Code-AbcManager\ AbcTest=C:\source\code\M

Re: Putting asterisks around text

2009-02-09 Thread D'Arcy J.M. Cain
On Mon, 9 Feb 2009 10:09:26 -0800 "todp...@hotmail.com" wrote: > I'm trying to write a program that puts asterisks around the input text using > while loop. > I can do this without using while loop, but how can you do that using while > loop?Example:Enter a string: Hello world***Hello wo

Re: Putting asterisks around text

2009-02-09 Thread MRAB
D'Arcy J.M. Cain wrote: On Mon, 9 Feb 2009 10:09:26 -0800 "todp...@hotmail.com" wrote: I'm trying to write a program that puts asterisks around the input text using while loop. I can do this without using while loop, but how can you do that using while loop?Example:Enter a string: Hello world

Help needed to retrieve text from a text-file using RegEx

2009-02-09 Thread rdmurray
Oltmans wrote: > Here is the scenario: > > It's a command line program. I ask user for a input string. Based on > that input string I retrieve text from a text file. My text file looks > like following > > Text-file: > - > AbcManager=C:\source\code\Modules\Code-AbcManager\ > AbcTest=

Re: Help needed to retrieve text from a text-file using RegEx

2009-02-09 Thread Paul McGuire
On Feb 9, 11:22 am, Oltmans wrote: > Here is the scenario: > > It's a command line program. I ask user for a input string. Based on > that input string I retrieve text from a text file. My text file looks > like following > > Text-file: > - > AbcManager=C:\source\code\Modules\Code-AbcM

RE: Putting asterisks around text

2009-02-09 Thread todp...@hotmail.com
From: todp...@hotmail.comto: python-l...@python.orgsubject: Putting asterisks around textDate: Mon, 9 Feb 2009 10:09:26 -0800 I'm trying to write a program that puts asterisks around the input text using while loop.I can do this without using while loop, but how can you do that using while l

Re: Putting asterisks around text

2009-02-09 Thread Tim Rowe
2009/2/9 todp...@hotmail.com : > I'm not necessarily asking for an answer. A hint would be grateful as well. Great. Well, first you need to read: http://www.catb.org/~esr/faqs/smart-questions.html Especially the section on "Before you ask". Then you should be able to give us a question that sho

Re: Putting asterisks around text

2009-02-09 Thread Tim Chase
D'Arcy J.M. Cain wrote: On Mon, 9 Feb 2009 10:09:26 -0800 "todp...@hotmail.com" wrote: I'm trying to write a program that puts asterisks around the input text using while loop. I can do this without using while loop, but how can you do that using while loop? Example:Enter a string: Hello world*

Re: generator object or 'send' method?

2009-02-09 Thread Terry Reedy
Aaron Brady wrote: Hello, I am writing a generator to return a sequence of numbers with some variation. The parameters of the variation can be changed by the caller, even after the generator is started. My question is, is it better to wrap the generator in an object, so that the parameters can

Re: wxPython vs Glade?

2009-02-09 Thread Stef Mientki
Michael Pobega wrote: I'm looking for opinions on the best toolkit for a beginner to use with wxPython. It doesn't necessarily need to be the most efficient toolkit, but something I can use for basic programs (a Twitter client, Wordpress blogging client, etc) just to learn Python. wxWidgets seem

Re: Best 3d graphics kit for CAD program???

2009-02-09 Thread Stef Mientki
Gary Herron wrote: rantingrick wrote: I want to build a 3D CAD visualization program with Python. Now before you say this is not possible with Python here me out :) I know OpenGL is probably my best bet BUT i want something a little higher level than that. I am not ready for OpenGL yet. I woul

Re: Best 3d graphics kit for CAD program???

2009-02-09 Thread Stef Mientki
Gary Herron wrote: rantingrick wrote: I want to build a 3D CAD visualization program with Python. Now before you say this is not possible with Python here me out :) I know OpenGL is probably my best bet BUT i want something a little higher level than that. I am not ready for OpenGL yet. I woul

Re: Calling into Python from a C thread

2009-02-09 Thread Christian Heimes
Philip Semanchuk wrote: > I didn't know there *was* such a thing. Thanks for the tip! For those > who might be interested, the list is here: > http://mail.python.org/mailman/listinfo/capi-sig > > > FYI, I got my code working and it is in the latest release of posix_ipc: > http://semanchuk.com/phi

Re: wxPython vs Glade?

2009-02-09 Thread Mike Driscoll
On Feb 9, 7:23 am, Michael Pobega wrote: > I'm looking for opinions on the best toolkit for a beginner to use with > wxPython. It doesn't necessarily need to be the most efficient toolkit, > but something I can use for basic programs (a Twitter client, Wordpress > blogging client, etc) just to lea

Re: py2exe and distutils

2009-02-09 Thread Maxim Demenko
Gabriel Genellina schrieb: En Sat, 07 Feb 2009 18:39:19 -0200, Thomas Heller escribió: Maxim Demenko schrieb: Hi, i have installed Python 2.5.4 on WinXP, setuptools-0.6c9 and py2exe 0.6.9 Now i can't list installed modules, here is the stacktrace: [...] Any suggestion, how to fix this is

Re: version in setup.cfg

2009-02-09 Thread Diez B. Roggisch
Jasiu schrieb: Hi guys, I have a question about setup.py and setup.cfg: I work in a company and we use Subversion to keep our stuff. We have a post-commit rule that does the following: whenever there is a commit to /tags/ directory, a binary package is built automatically. The tag's name is the

Re: thread. question

2009-02-09 Thread Christian Heimes
Tim Wintle schrieb: > Thanks for both replies, > > On Mon, 2009-02-09 at 15:59 +0100, Christian Heimes wrote: >> You shouldn't use the thread module directly. It's not meant to be used >> by a user. Please stick to the threading module. You won't notice a >> slowdown, trust me :) > I'm aware that

Re: generator object or 'send' method?

2009-02-09 Thread andrew cooke
If I were experimenting with Python to see just how far I could push coroutines at the moment, I would use .send() and look at how I could factor things into a small library (containing, for example, your trap-and-response secondary generator). But if this was paid work, I would write a class wit

Re: Best 3d graphics kit for CAD program???

2009-02-09 Thread r
On Feb 9, 1:33 pm, Stef Mientki wrote: > Maya ? > Blender ? > I forgot: > pySoy > Intensity Thanks Stef, I actually got OpenGL to install(finally) and now i am thinking ? maybe? i should just go with OpenGL using the wxglcanvas. I have been also "messing" around with Bender but i think i want a

Re: Calling into Python from a C thread

2009-02-09 Thread Philip Semanchuk
On Feb 9, 2009, at 2:35 PM, Christian Heimes wrote: Philip Semanchuk wrote: I didn't know there *was* such a thing. Thanks for the tip! For those who might be interested, the list is here: http://mail.python.org/mailman/listinfo/capi-sig FYI, I got my code working and it is in the latest rel

compound regex

2009-02-09 Thread spir
Hello, (new here) Below an extension to standard module re. The point is to allow writing and testing sub-expressions individually, then nest them into a super-expression. More or less like using a parser generator -- but keeping regex grammar and power. I used the format {sub_expr_name}: as i

problem with import path on a python C extension

2009-02-09 Thread fredbasset1000
Hi All, I've written a simple Python extension module in C, but Python is having problems trying to locate it when I import it into an existing Python file. In my example, I wrote a C extension called "diomodule" which exists in the directory : /root/project/drivers/dio/ diomodule.c. It has comp

Re: Calling into Python from a C thread

2009-02-09 Thread Christian Heimes
Philip Semanchuk wrote: > Yes, that's accurate except for the word "forgot". To forget something > one must first know it. =) I found the threading API documentation > difficult to follow, but I suppose that what I'm doing is a little > unusual so if it is not well-documented territory, that's what

Python 3D CAD -- need collaborators, or just brave souls :)

2009-02-09 Thread rantingrick
Hello all, It has long been my dream to create an open source 3D CAD program and i am starting to crawl my way into the first steps. I now believe i am ready to start this endeavor and i am currently looking for fellow Python programmers (no matter what skill level) to get started brainstorming th

Re: problem with import path on a python C extension

2009-02-09 Thread Carsten Haese
fredbasset1...@gmail.com wrote: > [...] > So my question is why can't Python locate the new extension module > when I try to import it with "import project.drivers.dio.diomodule"? This import statement binds the module to the name "project.drivers.dio.diomodule". It does not bind anything to the na

Re: problem with import path on a python C extension

2009-02-09 Thread Carsten Haese
fredbasset1...@gmail.com wrote: > I can only get it to work if I copy the .so file to the directory > where daemon.py is and change the import to "import diomodule". And to supplement my previous reply, another solution is to make sure that /root/project/drivers/dio is in your PYTHONPATH. Then you

Re: Putting asterisks around text

2009-02-09 Thread Martin
Hi, 2009/2/9 todp...@hotmail.com : > I'm trying to write a program that puts asterisks around the input text > using while loop. > I can do this without using while loop, but how can you do that using while > loop? > > Example: > > Enter a string: Hello world > > ** > *Hello world* > *

Re: Best 3d graphics kit for CAD program???

2009-02-09 Thread TheSeeker
On Feb 9, 2:08 pm, r wrote: > On Feb 9, 1:33 pm, Stef Mientki wrote: > > > Maya ? > > Blender ? > > I forgot: > > pySoy > > Intensity > > Thanks Stef, > I actually got OpenGL to install(finally) and now i am thinking ? > maybe? i should just go with OpenGL using the wxglcanvas. I have been > also

Re: Simple question - stock market simulation

2009-02-09 Thread cptn.spoon
On Feb 10, 3:29 am, Anthra Norell wrote: > cptn.spoon wrote: > > I'm trying to create an incredibly simple stock market simulator to be > > used in a childrens classroom and I'm wondering whether someone can > > point me in the right direction. > > > I basically want to be able to have a stock str

Re: Simple question - stock market simulation

2009-02-09 Thread cptn.spoon
On Feb 9, 6:48 pm, "Hendrik van Rooyen" wrote: > "cptn.spoon" wrote: > > On Feb 9, 3:58 pm, Paul Rubin wrote: > > >Thanks Paul! I thought this might be the case. So how would I get the > >StockMarket class instance to contain many Stock class instances and > >then b

"Super()" confusion

2009-02-09 Thread Lionel
Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: class Parent: def __init__(self, filePath): . . Do some processing with "filePath"

Re: Simple question - stock market simulation

2009-02-09 Thread Robert Kern
On 2009-02-09 17:10, cptn.spoon wrote: On Feb 9, 6:48 pm, "Hendrik van Rooyen" wrote: "cptn.spoon" wrote: On Feb 9, 3:58 pm, Paul Rubin wrote: Thanks Paul! I thought this might be the case. So how would I get the StockMarket class instance to contain many Stoc

Re: "Super()" confusion

2009-02-09 Thread Robert Kern
On 2009-02-09 17:20, Lionel wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: class Parent: def __init__(self, filePath): . .

Re: "Super()" confusion

2009-02-09 Thread Scott David Daniels
Lionel wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: class Parent: def __init__(self, filePath):... class Child(Parent): def __init__(sel

Re: "Super()" confusion

2009-02-09 Thread Jean-Paul Calderone
On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel wrote: Hello. I've been scouring the web looking for something to clear up a little confusion about the use of "super()" but haven't found anything that really helps. Here's my simple example: [snip] "super(Child,self).__init__(filePath) TypeErro

Re: adodb has no attribute connect

2009-02-09 Thread Diez B. Roggisch
Rahul schrieb: Hello all, I have to access data from database using adodb so I did Import adodb Conn=adodb.NewADOConnection("odbc") Upto this it works properly but when I say It does not. It returns None, thus the following error you see. Conn.Connect("","","") It gives error as [Attribu

Re: wxPython vs Glade?

2009-02-09 Thread Michael Torrie
Michael Pobega wrote: > I'm looking for opinions on the best toolkit for a beginner to use with > wxPython. It doesn't necessarily need to be the most efficient toolkit, > but something I can use for basic programs (a Twitter client, Wordpress > blogging client, etc) just to learn Python. > > wxWi

Re: "Super()" confusion

2009-02-09 Thread Lionel
On Feb 9, 4:04 pm, Jean-Paul Calderone wrote: > On Mon, 9 Feb 2009 15:20:05 -0800 (PST), Lionel > wrote: > >Hello. I've been scouring the web looking for something to clear up a > >little confusion about the use of "super()" but haven't found anything > >that really helps. Here's my simple examp

  1   2   >