> SGVsbG8uIENvdWxkIHlvdSBoZWxwIG1lLi4uSSBuZWVkIHRvIGNyZWF0ZSBhcHBsaWNhdGlvbiB3
> aXRoIHVyd2lkIG9yIGN1cnNlcwpzdXBwb3J0LiBIYXZlIHlvdSBnb3QgYSBwcmV0dHkgc2ltcGxl
> IGV4YW1wbGUgd2l0aCBpdD8KCgotLSAKUG96ZHJhd2lhbSBMZXN6ZWsgTWm2Ck5vdGhpbmcgaXMg
> c2VjdXJlLCBwYXJhbm9pYSBpcyB5b3VyIGZyaWVuZC4K
>>> s =
>>>
>> 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...
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
> 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
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):
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
>> 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
> 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
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
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
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
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
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
> 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
>> 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
> 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
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
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
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
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
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
> 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.
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
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
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
> 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
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
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
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
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
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
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
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
101 - 133 of 133 matches
Mail list logo