[ANNC] pybotwar-0.9 : now using pybox2d-2.3b0

2014-05-03 Thread Lee Harr
pybotwar is a fun and educational game where players write computer programs to control simulated robots. http://pybotwar.googlecode.com/ The focus of this release is updating to use the latest available pybox2d version: 2.3b0 pybotwar uses pybox2d for the physical simulation. It can be run in

Re: Function and turtle help

2014-03-07 Thread Lee Harr
> I am completely new to programming so thanks for any help! Not sure it will help, and hopefully I am not self-promoting too much, but this may be of interest to you: http://pynguin.googlecode.com/ http://code.google.com/p/pynguin/wiki/StartProgramming I am interested in feedback from new pro

Re: Using PyQT with QT Designer

2013-08-23 Thread Lee Harr
> That's the problem though. It is exactly how I want it in designer. It's > perfect as it is in designer when I preview it. Here is a screenshot of the > preview: http://i.imgur.com/ULRolq8.png That's not a preview. That's just the regular design view. (you can tell by the little dots in the back

Re: Has anyone gotten Pyglet to work

2013-07-29 Thread Lee Harr
> $ ./pyglet.py > Traceback (most recent call last): >    File "./pyglet.py", line 2, in >      import pyglet >    File "/home/collier/pyglet.py", line 3, in >      song = pyglet.media.load('./boot.ogg') > AttributeError: 'module' object has no attribute 'media' Name your program something othe

[ANNC] pynguin-0.15 python turtle graphics application

2013-06-13 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release ma

Re: [ANNC] pynguin-0.14 python turtle graphics application

2013-05-03 Thread Lee Harr
>>> Pynguin is a python-based turtle graphics application. >>> http://pynguin.googlecode.com/ >> I wonder why Pynguin does not get more traction in the teaching sector. >> Looks ideal for teaching kids. > I suggest that it's because Pynguin is not yet fully operational. > I don't know where to re

[ANNC] pynguin-0.14 python turtle graphics application

2013-04-13 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release ad

Re: pynguin-0.13 python turtle graphics application now uses python 3

2013-03-17 Thread Lee Harr
>> Pynguin is a python-based turtle graphics application. >>     It combines an editor, interactive interpreter, and >>     graphics display area. > > > What does pynguin have that the builtin python turtle does not? It is meant to be easier to get started with. You start the application and it

[ANNC] pynguin-0.13 python turtle graphics application now uses python 3

2013-03-16 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release p

Re: Ubuntu Python -dbg packages

2013-01-07 Thread Lee Harr
>> Ok, so now I tried python3.3-dbg but I don't think the pyqt >> modules are compiled for 3.3 and that may be preventing >> the import there. >> >> Those extension modules would need to be compiled for >> an exactly matching python interpreter, right? > > For Windows visual C compiler, that is tr

Re: Ubuntu Python -dbg packages

2013-01-06 Thread Lee Harr
> On 1/6/2013 8:42 AM, Lee Harr wrote: >> >> I am using: >> Ubuntu 12.10 >> Python 3.2.3 > > import has been considerably redone, and hopefully upgraded, in 3.3. Ok, so now I tried python3.3-dbg but I don't think the pyqt modules are compiled for 3.3 and t

Ubuntu Python -dbg packages

2013-01-06 Thread Lee Harr
I am using: Ubuntu 12.10 Python 3.2.3 Qt 4.8.2 PyQt 4.9.3 I also have the ubuntu -dbg packages: python3-dbg python3-pyqt4-dbg I don't understand why python3-dbg cannot import the PyQt4 modules... $ python3 Python 3.2.3 (default, Oct 19 2012, 19:53:57) [GCC 4.7.2] on linux2 Type "help", "

python wiki gone?

2013-01-05 Thread Lee Harr
Have I just happened across wiki.python.org at a bad time, or is the wiki gone? When I go to wiki.python.org I get redirected to http://wiki.python.org/moin/ which is 404 Not Found. -- http://mail.python.org/mailman/listinfo/python-list

Re: QThread.terminate in Python 3

2012-09-28 Thread Lee Harr
>> I understand that use of QThread.terminate is discouraged, >> but it has worked well previously and I would like to continue >> this use if possible. >> >       And now you've encountered the reason it is discouraged. Ok. Point taken. What I hear you saying is that once I use .terminate anyth

QThread.terminate in Python 3

2012-09-23 Thread Lee Harr
Hi; I have asked this on the PyQt list, but have not seen any response yet. Hoping someone will be able to test this on their system to see if they see the same problem. The problem I am seeing is that terminating a QThread running certain code will freeze the program, requiring it to be kill'd.

[ANNC] pybotwar-0.8

2012-08-15 Thread Lee Harr
pybotwar is a fun and educational game where players write computer programs to control simulated robots. http://pybotwar.googlecode.com/ The focus of this release is making all functionality available from the PyQt interface and making PyQt the default interface. pybotwar uses pybox2d for the

[ANNC] vbot-0.3

2012-06-17 Thread Lee Harr
vBot is a visual programming game.     Use a small set of command tiles to build a program.     The program must control the vBot and make it activate     every target using the limited command set. It is meant to be an easy environment for introducing     some programming concepts to beginning p

RE: Need Windows user / developer to help with Pynguin

2011-10-30 Thread Lee Harr
>>> Py2exe >> >> I considered that, but I agree that licensing issues would make it >> problematic. > > What licensing issues concern you? The py2exe license shouldn't be a > problem and py2exe or something like it is good advice. I think PyQt 4 would be the biggest issue. It is GPL 2 / 3. I th

Re: Need Windows user / developer to help with Pynguin

2011-10-29 Thread Lee Harr
Thanks to all those who tested and replied! > For Windows users who want to just run Pyguin (not modify or tinker > with the source code), it would be best to bundle Pynguin up with > Py2exe I considered that, but I agree that licensing issues would make it problematic. > the Python installer

Re: Need Windows user / developer to help with Pynguin

2011-10-28 Thread Lee Harr
>> I started a wiki page >> here:  >> >> http://code.google.com/p/pynguin/wiki/InstallingPynguinOnWindows >> >> but I can't even test if

Need Windows user / developer to help with Pynguin

2011-10-27 Thread Lee Harr
I develop the free python-based turtle graphics application pynguin. http://pynguin.googlecode.com/ Lately I have been getting a lot of positive comments from people who use the program, but I am also getting a lot of feedback from people on Windows (mostly beginners) who are having trouble get

[ANNC] pynguin-0.12 (fixes problems running on Windows)

2011-09-21 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release f

Re: os independent rename

2011-09-17 Thread Lee Harr
> shutil.move works for me, at least in Python 2.7. The docstring> doesn't > seem to match the code Thanks for checking that. Looks like there is a closed report about the misleading docs:http://bugs.python.org/issue12577 Closed a couple of months ago, but the docs have not madeit to the web ye

os independent rename

2011-09-17 Thread Lee Harr
I just got a bug report the heart of which is the difference between unix and windows in using os.rename (ie, "On Windows, if dst already exists, OSError will be raised") Hmm, I thought, maybe I'm supposed to use shutil here. That is the "high-level" operations. Unfortunately, shutil.move says i

[ANNC] pynguin-0.11 python turtle graphics application

2011-08-10 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

RE: parsing function parameters

2011-08-03 Thread Lee Harr
Needed to make one change... for functions with no default args: def pdict(f):     parameter_defaults = {}     defaults = f.func_defaults     if defaults is not None:     defaultcount = len(defaults)     else:     defaultcount = 0     argcount = f.func_code.co_argcount     for i in xrang

RE: parsing function parameters

2011-08-03 Thread Lee Harr
>> I am trying to get some information about a function >> before (and without) calling it. > how about def pdict(f):     parameter_defaults = {}     defaults = f.func_defaults     defaultcount = len(defaults)     argcount = f.func_code.co_argcount     for i in xrange(f.func_code.co_argco

parsing function parameters

2011-08-03 Thread Lee Harr
I am trying to get some information about a function before (and without) calling it. Here is what I have so far. I chose to go with a regular expression, so now I have 2 problems :o) def pdict(f, pstr):     '''given a function object and a string with the function parameters,     return a dic

Re: turtles slowing down

2011-07-21 Thread Lee Harr
>  there > was a steady slowing down of turtles as time goes The problem is that when the turtle "draws" it does not just put marks on the canvas, it actually creates new canvas items. Canvas items aren't just pixels on the canvas, they are full-fledged objects which (if you wanted to) you could

Re: Python threading/multiprocessing issue.

2011-07-15 Thread Lee Harr
> I'm working on a tool that runs a number of process is separate thread. > I've, up to this point, been using threading.Thread, but from what I > read multiprocess will allow multiple processors to be used >  From the python docs on multiprocessing. > leverage multiple processors on a giv

[ANNC] pynguin-0.10 python turtle graphics application

2011-06-25 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

force --install-layout=deb on systems where that makes sense?

2011-04-19 Thread Lee Harr
Is there a way to make distutils use --install-layout=deb but only on systems where that makes sense? I just noticed that if someone installs without that switch, my app will not be able to find its data files, because sys.prefix = /usr  but the installation is actually in to /usr/local I suppo

[ANNC] TZMud 0.9 : A Python MUD server

2010-10-17 Thread Lee Harr
TZMud is a Python MUD server. http://tzmud.googlecode.com/ A MUD is a text-based virtual environment accessed via telnet, or with a specialised MUD client. TZMud development is still in early stages, focusing on API and server stability. TZMud uses several high-quality Python libraries to facil

pyqt on portable python?

2010-09-23 Thread Lee Harr
Is it possible / easy to use PyQt with portable python? I've done some googling and found one message that said this is coming in the next version, but I can't find anything on portablepython.com that mentions it. Has anyone done this before? Have any better information on how to set it up, or

Re: segfault with small pyqt script

2010-08-12 Thread Lee Harr
> I'm desperate. I'm having a real application, which fails rather often > when finishing it. I'm not sure, whether any serious problem could be > hidden behind it > > The script is a pyqt script, which segfaults most of the time on my > ubuntu 10.4 linux 64 bit and I'm having trouble to understan

[ANNC] pynguin-0.9 (python turtle graphics application)

2010-07-15 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release h

[ANNC] pynguin-0.8 python turtle graphics application

2010-06-08 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

[ANNC] pynguin-0.7 (python turtle graphics application)

2010-04-11 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

Re: C-style static variables in Python?

2010-04-05 Thread Lee Harr
> Another approach would be to stuff the static values in the function's > __dict__. That's how I did it when I wanted something similar. I created this decorator: def static(**kw):     '''     Used to create a decorator function that will add an     attribute to a function and initialize it.

[ANNC] pynguin-0.4 (python turtle graphics application)

2010-03-14 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

Some PyCon videos won't play

2010-03-13 Thread Lee Harr
I am having a great time watching videos from PyCon. Thanks to everyone who presented, and to those who did such a great job putting the videos up at: http://pycon.blip.tv/ My trouble is that, although most of the videos play perfectly, there are a few that refuse to play at all. Like: Python 10

[ANNC] pynguin-0.2 (python turtle graphics application)

2010-03-07 Thread Lee Harr
Pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This release c

[ANNC] pynguin-0.1 (python-based turtle graphics application)

2010-02-28 Thread Lee Harr
pynguin is a python-based turtle graphics application.     It combines an editor, interactive interpreter, and     graphics display area. It is meant to be an easy environment for introducing     some programming concepts to beginning programmers. http://pynguin.googlecode.com/ This is the in

Re: some turtle questions

2010-01-27 Thread Lee Harr
> I am trying to think of things to do with the turtle module > 1) is there a way to determine the current screen pixel color? This would not use the included turtle module, but you could use the turtle module from the pygsear collection: http://www.nongnu.org/pygsear/ It requires pygame, but

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-13 Thread Lee Harr
>> When you first had this problem, was python3 installed from >> source, or was it from the Ubuntu repository? > Over a month ago I downloaded the tarball Python-3.1.1 from > the python website.  Then the Synaptic Package Manager did not > contain this ( latest ) version. There is already pytho

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-12 Thread Lee Harr
> And my original problem still there : fouled up keys in interactive > terminal. When you first had this problem, was python3 installed from source, or was it from the Ubuntu repository? (ie, did you install using apt-get or synaptic or did you just start out building from source?) I have pyt

[ANNC] pybotwar-0.7

2009-11-29 Thread Lee Harr
pybotwar is a fun and educational game where players write computer programs to control simulated robots. http://pybotwar.googlecode.com/ pybotwar uses pybox2d for the physical simulation. It can be run in text-only mode -- useful for longer tournaments -- or use pyqt or pygame for a graphical

[ANNC] acromania-0.5

2009-11-15 Thread Lee Harr
Acromania is a word game of acronyms. This program is a computer moderator for networked games of acromania. It can connect to a channel on IRC, or start a standalone server which can be accessed much like a MUD. http://acromania.googlecode.com/ Acromania uses Twisted and SQLite. Optionally, i

[ANNC] pybotwar-0.6

2009-09-08 Thread Lee Harr
pybotwar is a fun and educational game where players create computer programs to control simulated robots to compete in a battle arena. http://pybotwar.googlecode.com/ pybotwar uses pybox2d for the physical simulation, and uses either pygame and pygsear or PyQt4 for the visualization. pybotwar

[ANNC] pybotwar-0.5

2009-08-09 Thread Lee Harr
pybotwar is a fun and educational game where players create computer programs to control simulated robots to compete in a battle arena. http://pybotwar.googlecode.com/ pybotwar uses pybox2d for the physical simulation, and uses pygame and pygsear for the visualization. pybotwar is released und

[ANNC] pybotwar-0.4

2009-08-04 Thread Lee Harr
pybotwar is a fun and educational game where players create computer programs to control simulated robots to compete in a battle arena. http://pybotwar.googlecode.com/ pybotwar uses pybox2d for the physical simulation, and uses pygame and pygsear for the visualization. pybotwar is released und

[ANNC] pybotwar-0.3

2009-08-03 Thread Lee Harr
pybotwar is a fun and educational game where players create computer programs to control simulated robots to compete in a battle arena. http://pybotwar.googlecode.com/ pybotwar uses pybox2d for the physical simulation, and uses pygame and pygsear for the visualization. pybotwar is released und

[ANNC] acromania-0.4

2009-07-01 Thread Lee Harr
Acromania is a word game of acronyms. This program is a computer moderator for networked games of acromania. It can connect to a channel on IRC, or start a standalone server which can be accessed much like a MUD. http://acromania.googlecode.com/ Acromania uses Twisted and SQLite. Optionally, i

[ANN] TZMud 0.8

2009-01-04 Thread Lee Harr
TZMud is a Python MUD server. http://tzmud.googlecode.com/ A MUD is a text-based virtual environment accessed via telnet, or with a specialised MUD client. TZMud development is still in early stages, focusing on API and server stability. TZMud uses several high-quality Python libraries to facil

RE: error on windows with commands.getstatusoutput

2008-12-31 Thread Lee Harr
> Anyhow, I've replaced it with this: > > > from subprocess import Popen, PIPE, STDOUT > p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, > stderr=STDOUT, close_fds=True) > output, unused = p.communicate() > status = p.returncode > > > Does that look more

RE: error on windows with commands.getstatusoutput

2008-12-28 Thread Lee Harr
>> cmd = '%s -y %s -l %s' % (conf.twistd, conf.tztac, conf.twistdlog) >> status, output = commands.getstatusoutput(cmd) > The commands module is Unix only. See its documentation : > http://docs.python.org/library/commands.html Ah. Doh! I was going back and forth between all of the different wa

error on windows with commands.getstatusoutput

2008-12-28 Thread Lee Harr
My application is trying to start twistd in a cross-platform way. Unfortunately, it works fine on my linux system, but I do not have windows, and I am trying to debug this remotely on a system I never use :o( Anyhow, here is the error I am getting: cmd = '%s -y %s -l %s' % (conf.twistd, conf.t

[ANN] TZMud 0.7

2008-11-15 Thread Lee Harr
TZMud is a Python MUD server. http://tzmud.googlecode.com/ A MUD is a text-based virtual environment accessed via telnet, or with a specialised MUD client. TZMud development is still in early stages, focusing on API and server stability. TZMud uses several high-quality Python libraries to fa

decorator and API

2008-09-17 Thread Lee Harr
I have a class with certain methods from which I want to select one at random, with weighting. The way I have done it is this import random def weight(value): def set_weight(method): method.weight = value return method return set_weight class A(object): def a

ANN: TZMud-0.5, a Python MUD server

2008-08-25 Thread Lee Harr
TZMud is a Python MUD server. http://tzmud.googlecode.com/ A MUD is a text-based virtual environment accessed via telnet, or with a specialized MUD client. TZMud development is still in early stages, focusing on API and server stability. TZMud uses several high-quality Python libraries to facil

Pythonic way to add method alias in subclass

2007-12-15 Thread Lee Harr
I thought of several ways to add another name for a method in a subclass ... #alias.py class Foo(object): def nod(self): print "nodding" class Bar(Foo): def __init__(self): self.agree = self.nod class Bar2(Foo): agree = Foo.nod class Bar3(Foo): def agree(self):

Re: Modul (%) in python not like in C?

2007-09-09 Thread Lee Harr
>> Python will always yield a number x = m%n such that 0 <= x < n, but >> Turbo C will always yield a number such that if x = m%n -x = -m%n. That >> is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always >> differ by n (as used above). Maybe it is an order-of-operations thing...

Re: curses/urwid simple menu

2007-07-27 Thread Lee Harr
> SGVsbG8uIENvdWxkIHlvdSBoZWxwIG1lLi4uSSBuZWVkIHRvIGNyZWF0ZSBhcHBsaWNhdGlvbiB3 > aXRoIHVyd2lkIG9yIGN1cnNlcwpzdXBwb3J0LiBIYXZlIHlvdSBnb3QgYSBwcmV0dHkgc2ltcGxl > IGV4YW1wbGUgd2l0aCBpdD8KCgotLSAKUG96ZHJhd2lhbSBMZXN6ZWsgTWm2Ck5vdGhpbmcgaXMg > c2VjdXJlLCBwYXJhbm9pYSBpcyB5b3VyIGZyaWVuZC4K >>> s = >>>

Re: newbie question on def, passing param's help

2007-07-13 Thread Lee Harr
> I have a def that I have been using but I realized that sometimes I need a > LIST with > 5 or 6 brands instead of 4 so I want to put LIST outside of the def but I > can't wrap > my head around a way to get LIST outside the def while still passing the same > 4 > parameters in the function. I'

Re: Class decorators do not inherit properly

2007-07-13 Thread Lee Harr
>> I think the term "class decorator" is going to eventually >> mean something other than what you are doing here. I'd >> avoid the term for now. >> >> >> When you decorate a class method, >> the function you use >> needs to be defined before the method definition. > > FWIW, the term "class metho

Re: Class decorators do not inherit properly

2007-07-12 Thread Lee Harr
> Traceback (most recent call last): > File "/Users/chris/Projects/CMR/closed.py", line 132, in > class M0(MetropolisHastings): > File "/Users/chris/Projects/CMR/closed.py", line 173, in M0 > @_add_to_post > NameError: name '_add_to_post' is not defined > > yet, when I look at the dict

Re: How to create new files?

2007-07-12 Thread Lee Harr
> So far, I've found that unlike with the C++ version of fopen(), the > Python 'open()' call does not create the file for you when opened > using the mode 'w'. I get an exception saying that the file doesn't > exist. Works for me... :~$ mkdir foo :~$ cd foo :foo$ ls :foo$ python Python 2.4.4 (#2

Re: How can I import functions from another python file

2007-04-09 Thread Lee Harr
On 2007-04-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > i have 2 python files in *different directory* , how can I import > python functions from 1 python file to another? > > i get this error: > import task > ImportError: No module named task/ > The directory that module is in must b

Re: pdf to text

2007-01-25 Thread Lee Harr
> Perhaps I'm just using pdftotext wrong? Here's how I was using it: > > sout = os.popen('pdftotext "%s" - ' %f) If you are having trouble with popen (not unlikely) how about just writing to a temporary file and reading the text from there? I've used pdftotext several times in the past f

Re: Persistent variables in python

2006-12-26 Thread Lee Harr
> Found out a quite fun way to store persistent variables in functions in > python. > > Is this concidered bad coding practice since I guess persistent > variables in functions are not meant to be? I am using is in one of my recent projects. I was thinking of it sort of like "static" variables

Re: pexpect with apache

2006-10-18 Thread Lee Harr
> Well, first i don't think it is a good idea to have the python script > tu su to root, but for it to work, i think (Totally unsure about that) > www has to be in group wheel to be able to su. Maybe sudo can help here. -- http://mail.python.org/mailman/listinfo/python-list

creating many similar properties

2006-10-17 Thread Lee Harr
I understand how to create a property like this: class RC(object): def _set_pwm(self, v): self._pwm01 = v % 256 def _get_pwm(self): return self._pwm01 pwm01 = property(_get_pwm, _set_pwm) But what if I have a whole bunch of these pwm properties? I made this: class

Re: plpython and pickle

2006-08-18 Thread Lee Harr
On 2006-08-17, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > Hi all, sory if this is kind of [OT], but cannot find the answer for > this behaviour > Might try on a postgres mailing list. I'd say it is more on topic there... > You are now connected to database "sessions". > sessions=# s

Re: drawingarea problem

2006-08-17 Thread Lee Harr
On 2006-08-16, Rafa³ Janas <[EMAIL PROTECTED]> wrote: > Is somebody try to paint filled boxes in drawingarea? > I don't know how to paint line or someting like this. > Maybe somebody have tutorial or samples? Your question could use a few more details (like what you have tried, what "drawingarea"

Re: Pygame Help

2006-07-29 Thread Lee Harr
> I was curious how you would program the seperate > images to fall together and not break apart, because pygame and > livewires uses images as collision detection, so therefore you can't > make most of the shapes a single image because they will have > transparent spaces as part of the image, whic

Re: Cross-site scripting (XSS) defense

2006-06-16 Thread Lee Harr
On 2006-06-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there a module (or, better yet, sample code) that scrubs > user-entered text to remove cross-site scripting attacks, while also > allowing a small subset of HTML through? > > Contemplated application: a message board that allows peopl

Re: load module named "datetime" and change the directory of output file?

2006-02-01 Thread Lee Harr
> 1. How can I add a standard module named "datetime" in > Jython when the error happens :"Traceback (innermost > last): > File "C:\python\test.py", line 3, in ? > ImportError: no module named datetime " > The line 3 is writen: "from datetime import datetime, > tzinfor" > The datetime module wa

Re: import datetime

2006-02-01 Thread Lee Harr
>> I did look at the sys.path but the issue is that I dont see a module >> name datetime anywhere. Only datetime thing that is there is in include >> directory and it is datetime.h, which I think is for C interface. I >> have a python installed on my Windows desktop and it is working fine >> there.

Re: import datetime

2006-01-31 Thread Lee Harr
> I have just installed Python2.4.2 on our HP-UX system. But when I try > to import datetime modlue I get the following error > > ~~~ from datetime import datetime > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named datetime > ~

Re: using NamedTemporaryFile on windows

2005-12-29 Thread Lee Harr
On 2005-12-29, Peter Hansen <[EMAIL PROTECTED]> wrote: > Lee Harr wrote: >> Is there any other reason to use a named tempfile other than >> to be able to open it again? > As it says, if you *don't close* the file, you can open it again if you > are on a platfo

using NamedTemporaryFile on windows

2005-12-28 Thread Lee Harr
Is there any other reason to use a named tempfile other than to be able to open it again? I am trying to understand this section of the documentation regarding NamedTemporaryFile: """ Whether the name can be used to open the file a second time, while the named temporary file is still open, var

Re: Indentation/whitespace

2005-12-24 Thread Lee Harr
On 2005-12-23, Gary Herron <[EMAIL PROTECTED]> wrote: > You've got the visible/invisible aspect of things > *exactly* backwards. > The point on a line of text where things change > from white space to > non-white space is *highly* visible. The several > pixels that represent a > { or } are nearl

Re: Tabs bad (Was: ANN: Dao Language v.0.9.6-beta is release!)

2005-12-04 Thread Lee Harr
> No matter what setting, the order of the indents is kept. This is not > the case if tabs and spaces are intermixed, as some style guides > suggest. > I have never seen anyone suggest mixing tabs and spaces, and I have read a lot of tabs-vs-spaces flamewars in my time. Everyone agrees that mixi

Re: Is there a way to create a button in either pygame or livewires?

2005-11-19 Thread Lee Harr
> Is there a way to create a button in either pygame or livewires, that is > able to be clicked and when clicked sends a command to restart the program? > You could try something like this using pygsear (http://www.nongnu.org/pygsear/) The button can call either start() which just makes a new G

Re: Python, Linux, Desktop Environment

2005-11-16 Thread Lee Harr
On 2005-11-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So, I've written my first GUI app in python. I've turned it into a > binary .exe and .app that runs on Windows and Mac respectively, but on > my Linux box, where I wrote the thing, I still have to drop to the > command line and ./myscri

Re: odd behavior

2005-11-11 Thread Lee Harr
On 2005-11-11, Kristian Zoerhoff <[EMAIL PROTECTED]> wrote: > On 11 Nov 2005 11:34:47 -0800, Greg <[EMAIL PROTECTED]> wrote: >> Forgive me, and be kind, as I am just a newby learning this language >> out of M.L. Hetland's book. The following behavior of 2.4.1 seems very >> strange >> >>> x = ['aar

Re: Curses & Keypress

2005-11-11 Thread Lee Harr
On 2005-11-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Now that I have gotoxy() down for moving the cursor around, I want that > to be a result of keypresses (namely from the numpad -- 7 = NorthWest, > 8 = North, 9 = NE, etc...). I have little clue how to do this. After > searching google,

Re: 3-dimensional plot in Python?

2005-11-11 Thread Lee Harr
On 2005-11-11, questions? <[EMAIL PROTECTED]> wrote: > I want to make a 3d plot. x is a vector(discrete), y is also a > vector(discrete), for each pairwise x,y I have a value z(x,y)(it is not > a function, just discrete values for each pair of x,y) > > I want to show them on a two dimensional plot

Re: ? Pythoncard

2005-10-28 Thread Lee Harr
On 2005-10-28, LenS <[EMAIL PROTECTED]> wrote: > Never mind I figured out my on stupid mistake > How about posting a very simple explanation of what you did wrong and how you fixed it, instead of leaving the next person who has this problem with a dead end? Thanks. -- http://mail.python.org/ma

Re: simple question: $1, $2 in py ?

2005-09-05 Thread Lee Harr
On 2005-09-05, es_uomikim <[EMAIL PROTECTED]> wrote: > Hi, > > I have one small simple question, that I didn't found answer in > google's. It's kind of begginers question because I'm a one. ; ) > > I wanned to ask how to use scripts with vars on input like this: > > $ echo "something" | ./my_scrip

Re: command line path

2005-09-05 Thread Lee Harr
On 2005-09-05, mclaugb <[EMAIL PROTECTED]> wrote: > I am trying to pass the name of several files to a python script as command > line arguments. When i type in > > > python ImportFiles_test.py C:\Program Files\National Instruments\LabVIEW > 7.1\project\calibration\FREQUENCY_ > 13.CSV > > The fo

Re: inheriting from datetime

2005-08-01 Thread Lee Harr
On 2005-08-01, Rob Conner <[EMAIL PROTECTED]> wrote: > So this is simple, why can't I run the following code? I've tried many > variances of this, but simply cannot inherit from datetime or > datetime.datetime. I get this on line 3. > TypeError: function takes at most 2 arguments (3 given) > >

Re: Query - Pexpect

2005-07-22 Thread Lee Harr
On 2005-07-22, Girish <[EMAIL PROTECTED]> wrote: > Hi , > > I wanna do some automation work using "pexpect". > I have an application which must be invoked from the command line in > linux environment,it consists of buttons,textboxes etc can i access > those widgets using "pexpect",say i wanna enter

Re: Ann: The first PyWeek Python Game Programming Competition

2005-07-08 Thread Lee Harr
> See the competition timetable (including competition dates in various > timezones), rules, sign-up (commencing 6th August) at: > > http://www.mechanicalcat.net/tech/PyWeek > Sounds like fun. One thing. From the website ... > Clip Art > note: > more links welcome How about: http://www.open

Re: Boss wants me to program

2005-06-28 Thread Lee Harr
> make something that will work for him, am I correct? The other > alternative is to install console mode linux on it and hope that the > ncurses library can be used by python. The system could be as low as a > 486 dx2 66 with maybe 16 megs of ram. Well, I just thought I'd give you > people more in

Re: pyqt, windows xp and systray applications.. possible?

2005-06-28 Thread Lee Harr
On 2005-06-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi, > > I've been searching long, and found some information, but still not > enough for me to actually make it happen. so, I ask here. > > is it possible, in windows, to make PyQT application hide itself into > systray area? > > I read,

Re: Favorite non-python language trick?

2005-06-25 Thread Lee Harr
>> Higher-order functions like map, filter and reduce. As of Python 3000, >> they're non-python tricks. Sigh - i guess it's time for me to get to know >> list comprehensions a bit better. >> Couldnt there just be a "functional" module ?... from functional import map, filter, reduce -- http://

Re: BaseHTTPServer and priviledge separation?

2005-06-25 Thread Lee Harr
> to use a port below 1000 on a Unix system one needs root priviledges. > But it's dangerous to execute all of a script under those priviledges. > Therefore I'd like to drop the root priviledges as soon as possible. > (How) is this possible? > Are you sure you don't just want to use twisted? http

Re: 1980's Home Computer-style Package.

2005-06-16 Thread Lee Harr
On 2005-06-16, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-06-16, Ralph Corderoy <[EMAIL PROTECTED]> wrote: > >>> Wild-ass guess, but you might try googling for "turtle python". >> >> OK, I've done that but it didn't help; it wasn't tied in with >> Turtle graphics, with which I'm familiar. >

Re: Show current ip on Linux

2005-06-13 Thread Lee Harr
On 2005-06-13, David Van Mosselbeen <[EMAIL PROTECTED]> wrote: > Hi, > Im a newbie in Python, and also in Fedora Core 3. (Yes, Linux is fine > man :-) > > My question is : How can i rwite a script that show my current ip. If i have > more than one network card, the script must then show all used ip

  1   2   >