2008/4/10, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Am I the only one that thinks this would be useful? :)
>
> I'd really like to be able to use python 3.0's print statement in
> 2.x. Is this at least being considered as an option for 2.6? It
> seems like it would be helpful with transitionin
On Apr 10, 9:22 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I have an array, and I would like to get the indice value.
>
> a = array([13,14,15,16])
>
> I would like something like a.getindice(15)
>
> If I want 15 it would return 2
>>> a = array('i', [13,14,15,16])
>>> a.index(15)
2
--
ht
Chris Stewart wrote:
> I've always had an interest in Python and would like to dabble in
> it further. I've worked on a few very small command line programs
> but nothing of any complexity. I'd like to build a really simple
> GUI app that will work across Mac, Windows, and Linux. How
> painful
On 9 apr 2008, at 03.01, [EMAIL PROTECTED] wrote:
> okay, I'm having this one problem with a text adventure game. It's
> kind of hard to explain, but I'll do my best.
> [code]
>
> def prompt_kitchen():
>global gold
Python is not a suitable language for Text Adventure Development.
You
Hi, I have a little python webservice that I created, and in one of
the methods I need to store some binary data that was "posted"... I
want to do something like this, but it doesn't work.
username = form.get("username", "")
message = form.get("message", "")
attachment = form.get("attachment", Non
Your import statement is wrong. Try:
from Mysqldb import Mysqldb
in your session.py
On Thu, Apr 10, 2008 at 1:08 PM, Arun ragini <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have create a class file named Mysqldb.py
>
> class Mysqldb:
> def __init__(self, name):
> #this where i
Thomas Dimson wrote:
> On Apr 10, 8:11 am, "sven _" <[EMAIL PROTECTED]> wrote:
>> My goal is to have stdout and stderr written to a logging handler.
>> This code does not work:
>>
>> # START
>> import logging, subprocess
>> ch = logging.StreamHandler()
>> ch.setLevel(logging.DEBUG)
>> subp
Is there any function that allows reading a stream of floats through the Telnet
Object? There doesn't seem to be a way to control reading from the socket
accept read_until() and that requires a string.
-M
_
Use video conversation
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mike Driscoll wrote:
> On Apr 10, 12:05 pm, Michel Bouwmans <[EMAIL PROTECTED]> wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>>
>>
>> Paul Rubin wrote:
>> > Chris Stewart <[EMAIL PROTECTED]> writes:
>> >> I've always had an interest i
hello,
under windows I tried to make a shortcut to a py -file, to run a program.
So making a shortcut like this works perfect:
D:\PyLab_Works.py
But the problem is that I need to give some commandline parameters to
the py-file,
and
D:\PyLab_Works.py btc_test
But the parameter doesn't seem
Vinay Sajip wrote:
> On Apr 10, 1:11 pm, "sven _" <[EMAIL PROTECTED]> wrote:
>> My goal is to have stdout and stderr written to a logginghandler.
>
> Thomas was almost right, but not quite - you can't call info on a
> Handler instance, only on a Logger instance. The following script:
Yes, but
This is a contrived pseudocode example which has been broken out of a
larger problem, so it may seem like a strange thing to want to do,
but...
I have a group of objects which inherit (single) from a common base
class like so:
---
class Root(object):
@classmethod
def CumulativeSco
On Apr 9, 6:54 pm, Chris Stewart <[EMAIL PROTECTED]> wrote:
> I've always had an interest in Python and would like to dabble in it
> further. I've worked on a few very small command line programs but
> nothing of any complexity. I'd like to build a really simple GUI app
> that will work across Ma
Larry Bates schrieb:
> paul wrote:
>> Maryam Saeedi schrieb:
>>> Hi,
>>>
>>> I was wondering if you know how can I run a python code once every five
>>> minutes for a period of time either using python or some other program
>>> like
>>> a bash script.
>> See the sched module in the standard librar
Hi,
Did you try packages dedicated to graphs, like NetworkX ?
Matthieu
2008/4/10, Sanhita Mallick <[EMAIL PROTECTED]>:
>
> Hi.
>
> I am a newbie to Python. I am trying to implement a
> Python code for graph manipulation. My graphs are
> about 200-500 nodes big. Excepting for the short basic
> gr
Daniel Fetchinson wrote:
> I'm sorry to disappoint you but this project has already been completed:
>
> http://www.python.org/dev/peps/pep-0008/
Daniel, PEP 8 is anything but complete. How much of the following
simple question can you answer from there:
Given that you can name things with Upper
paul wrote:
> Maryam Saeedi schrieb:
>> Hi,
>>
>> I was wondering if you know how can I run a python code once every five
>> minutes for a period of time either using python or some other program
>> like
>> a bash script.
>
> See the sched module in the standard library or here:
> http://pypi.pyt
Hi Matthieu.
I have looked at that, and other similar ones all of
which are based on Graphviz. My problem is that I
myself am creating some large graphs,contrary to an
already created network, say, a social network of
python-list or my-space, downloaded from somewhere as
indicated in some of the
On Thu, Apr 10, 2008 at 3:52 PM, <[EMAIL PROTECTED]> wrote:
> Daniel, PEP 8 is anything but complete. How much of the following
> simple question can you answer from there:
>
> Given that you can name things with UpperAndLower, lowerAndUpper,
> lower_and_underscore, etc., what is the conventio
"Jose" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| On Apr 9, 10:36 pm, Benjamin <[EMAIL PROTECTED]> wrote:
| > On Apr 9, 5:33 pm, Jose <[EMAIL PROTECTED]> wrote:
| >
| > > I have a module named math.py in a package with some class
| > > definitions. I am trying to import the st
On Apr 10, 7:47 pm, Nathan Duran <[EMAIL PROTECTED]> wrote:
> This is a contrived pseudocode example which has been broken out of a
> larger problem, so it may seem like a strange thing to want to do,
> but...
>
> I have a group of objects which inherit (single) from a common base
> class lik
On Apr 10, 2:03 pm, Stef Mientki <[EMAIL PROTECTED]> wrote:
> hello,
>
> under windows I tried to make a shortcut to a py -file, to run a program.
> So making a shortcut like this works perfect:
> D:\PyLab_Works.py
>
> But the problem is that I need to give some commandline parameters to
> the py
On Apr 10, 2:33 am, Jose <[EMAIL PROTECTED]> wrote:
> I have a module named math.py in a package with some class
> definitions. I am trying to import the standard python math module
> inside of math.py but It seems to be importing itself. Is there any
> way around this problem without renaming my
On Apr 11, 12:31 am, Ivan Illarionov <[EMAIL PROTECTED]>
wrote:
> On Apr 10, 2:33 am, Jose <[EMAIL PROTECTED]> wrote:
>
> > I have a module named math.py in a package with some class
> > definitions. I am trying to import the standard python math module
> > inside of math.py but It seems to be imp
On Apr 10, 3:05 pm, svensven <[EMAIL PROTECTED]> wrote:
> Vinay Sajip wrote:
>
> > On Apr 10, 1:11 pm, "sven _" <[EMAIL PROTECTED]> wrote:
> >> My goal is to have stdout and stderr written to a logginghandler.
> >
> > Thomas was almost right, but not quite - you can't call info on a
> > Handle
Terry Reedy <[EMAIL PROTECTED]> wrote:
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | Terry Reedy <[EMAIL PROTECTED]> wrote:
> | >
> | > <[EMAIL PROTECTED]> wrote in message
> | > news:[EMAIL PROTECTED]
> | > | I'm not sure if I have even phrased that right but anyway
>
> > I'm sorry to disappoint you but this project has already been completed:
> >
> > http://www.python.org/dev/peps/pep-0008/
>
> Daniel, PEP 8 is anything but complete. How much of the following
> simple question can you answer from there:
>
> Given that you can name things with UpperAndLower, low
Sanhita Mallick>where can I find more in depth info about how to
express graphs in python, and how to use them in a code?<
You can look here:
https://networkx.lanl.gov/wiki
My version:
http://sourceforge.net/projects/pynetwork/
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-l
Paul Anton Letnes wrote:
> Brian and Diez:
>
> First of all, thanks for the advice.
>
> Brian:
>
> I have installed NumPy and SciPy, but I can't seem to find a wavelet
> transform there.
Well, you will definitely want to use numpy arrays instead of lists or the
standard library's arrays to c
On Apr 10, 2008, at 1:25 PM, [EMAIL PROTECTED] wrote:
> won't question why you want to do this...
> Here is a solution base on a metaclass, but it feels wrong.
> class MetaScore(type):
>def __new__(meta, name, bases, attrs):
>attrs.setdefault('score', score)
>return type.__ne
On Apr 10, 10:22 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> I have an array, and I would like to get the indice value.
>
> a = array([13,14,15,16])
>
> I would like something like a.getindice(15)
>
> If I want 15 it would return 2
a.index(15)
--
http://mail.python.org/mailman/listinfo/p
[EMAIL PROTECTED] wrote:
> I have an array, and I would like to get the indice value.
>
> a = array([13,14,15,16])
>
> I would like something like a.getindice(15)
>
> If I want 15 it would return 2
You will want to ask numpy questions on the numpy mailing list. If you don't
mention that you ar
I am trying to use ctypes to call dll functions. One of the functions
requires argument "struct IDispatch* ". I do have a PyIDispatch object
in python. How can I convert this "PyIDispatch object" to "struct
IDispatch* "?
Thanks in advance.
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 10 Apr 2008 15:58:44 -0300, Marlin Rowley
<[EMAIL PROTECTED]> escribió:
> Is there any function that allows reading a stream of floats through the
> Telnet Object? There doesn't seem to be a way to control reading from
> the socket accept read_until() and that requires a string.
Th
En Thu, 10 Apr 2008 16:03:28 -0300, Stef Mientki <[EMAIL PROTECTED]>
escribió:
> under windows I tried to make a shortcut to a py -file, to run a program.
> So making a shortcut like this works perfect:
> D:\PyLab_Works.py
>
> But the problem is that I need to give some commandline parameters
Terry Reedy wrote:
> "Jose" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | On Apr 9, 10:36 pm, Benjamin <[EMAIL PROTECTED]> wrote:
> | > On Apr 9, 5:33 pm, Jose <[EMAIL PROTECTED]> wrote:
> | >
> | > > I have a module named math.py in a package with some class
> | > > definition
En Thu, 10 Apr 2008 08:59:35 -0300, Paul Anton Letnes
<[EMAIL PROTECTED]> escribió:
> Could you include some code around line 39 in demo.py?
>
> Also, you could try to comment out the stuff before that point, and
> see if the demo runs that far.
And please include the error type and message too
Michel Bouwmans wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Mike Driscoll wrote:
>
>> On Apr 10, 12:05 pm, Michel Bouwmans <[EMAIL PROTECTED]> wrote:
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>>
>>>
>>>
>>> Paul Rubin wrote:
Chris Stewart <[EMAIL PROTECTED]> wri
Victor Subervi wrote:
> Well, what I did was this:
>
> content = col_fields[0][14].tostring()
> pic = "tmp" + str(i) + ".jpg"
> img = open(pic, "w")
> img.write(content)
> print '' % pic
> img.close()
> where I am incrementin
Hey guys,
In Python, is it possible to add classes to a module at run-time?
Say I have a module foo and a module bar. Foo has class A and B, and
bar has class C. I want to add class C to foo so I can access it as
foo.C, but i want to do it without modifying foo's source.
Is this at all pos
I've used EVDEV.py successfully as a keystroke logger on Linux
machines.
How should EVDEV.py be modified to function as an ASCII character
logger? That is, to record upper and lower case letters, lower case
"5" and upper case "%" characters, etc.
Shift and Caps Lock key press events are recorde
[EMAIL PROTECTED] wrote:
> In Python, is it possible to add classes to a module at run-time?
>
> Say I have a module foo and a module bar. Foo has class A and B, and
> bar has class C. I want to add class C to foo so I can access it as
> foo.C, but i want to do it without modifying foo's source.
[EMAIL PROTECTED] wrote:
> In Python, is it possible to add classes to a module at run-time?
>
> Say I have a module foo and a module bar. Foo has class A and B, and
>bar has class C. I want to add class C to foo so I can access it as
>foo.C, but i want to do it without modifying foo's source.
>
On Apr 10, 2:20 pm, Tommy Nordgren <[EMAIL PROTECTED]> wrote:
> On 9 apr 2008, at 03.01, [EMAIL PROTECTED] wrote:
>
> > okay, I'm having this one problem with a text adventure game. It's
> > kind of hard to explain, but I'll do my best.
> > [code]
>
> > def prompt_kitchen():
> >global gold
>
>
En Thu, 10 Apr 2008 14:04:43 -0300, Victor Subervi
<[EMAIL PROTECTED]> escribió:
> Well, what I did was this:
>
> content = col_fields[0][14].tostring()
> pic = "tmp" + str(i) + ".jpg"
> img = open(pic, "w")
> img.write(content)
> print
Hello:
My OS is Linux, I compile my dynamic link libraries , and
want to call the function of my dynamic library through python!
How can I realize the function? Please give me some advices! Thanks
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 10 Apr 2008 15:43:23 -0300, <[EMAIL PROTECTED]> escribió:
> Hi, I have a little python webservice that I created, and in one of
> the methods I need to store some binary data that was "posted"... I
> want to do something like this, but it doesn't work.
>
> username = form.get("username", "
On Apr 10, 9:21 pm, "郭勇军" <[EMAIL PROTECTED]> wrote:
> Hello:
> My OS is Linux, I compile my dynamic link libraries , and
> want to call the function of my dynamic library through python!
> How can I realize the function? Please give me some advices! Thanks
You have several opt
On Apr 9, 8:12 pm, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
> On 2008-04-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Apr 8, 5:45 pm, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
> > Ok following these instructions one gets
>
> > def find_all_paths(graph, start, end, path=[]):
> >
En Thu, 10 Apr 2008 20:01:43 -0300, Steve Holden <[EMAIL PROTECTED]>
escribió:
> Michel Bouwmans wrote:
>>
>> Mike Driscoll wrote:
>>> I see a lot of people recommend using pyQt, but they never mention the
>>> controversy that surrounds its licensing. There have been many posts
>>> on the subjec
On 2008-04-10, Paul Rubin wrote:
> Well, it's a trade-off, the person wanted a cross platform gui and the
> #1 hurdle for something like PyQt4 is getting it to work on each of
> the platforms you desire to run on.
Installing Pyqt on windows involves a couple "click to install" EXEs. On
Linux,
En Thu, 10 Apr 2008 16:52:11 -0300, <[EMAIL PROTECTED]> escribió:
> Daniel Fetchinson wrote:
>> I'm sorry to disappoint you but this project has already been completed:
>>
>> http://www.python.org/dev/peps/pep-0008/
>
> Daniel, PEP 8 is anything but complete. How much of the following
> simple ques
Daniel Fetchinson wrote:
> I'm sorry to disappoint you but this project has already been completed:
>
> http://www.python.org/dev/peps/pep-0008/
Good point.
It's probably time for CPython to enforce the rule that you can
indent with either tabs or spaces, but cannot mix them. Which
to u
En Thu, 10 Apr 2008 17:41:29 -0300, Ivan Illarionov
<[EMAIL PROTECTED]> escribió:
> On Apr 11, 12:31 am, Ivan Illarionov <[EMAIL PROTECTED]>
> wrote:
>> On Apr 10, 2:33 am, Jose <[EMAIL PROTECTED]> wrote:
>>
>> > I have a module named math.py in a package with some class
>> > definitions. I am t
En Thu, 10 Apr 2008 18:45:04 -0300, Huayang Xia <[EMAIL PROTECTED]>
escribió:
> I am trying to use ctypes to call dll functions. One of the functions
> requires argument "struct IDispatch* ". I do have a PyIDispatch object
> in python. How can I convert this "PyIDispatch object" to "struct
> IDi
How does (a/b) work when both 'a' and 'b' are pure integers ?
>> (9/2)
4
>> (-9/2)
-5
Why is it -5 ? I expect it to be -4 ? Because, in C/C++, 9/2 is 4 and
so negative of it, (-9/2) is -4.
What should I do to get C-like behavior ?
--
http://mail.python.org/mailman/listinfo/python-list
bdsatish wrote:
> How does (a/b) work when both 'a' and 'b' are pure integers ?
>
>>> (9/2)
> 4
>
>>> (-9/2)
> -5
>
> Why is it -5 ? I expect it to be -4 ? Because, in C/C++, 9/2 is 4 and
> so negative of it, (-9/2) is -4.
>
> What should I do to get C-like behavior ?
Use C?
regards
Steve
-
it rounds down. 4 is less than 4.5
and -5 is less than -4.5.
On Thu, 2008-04-10 at 21:28 -0700, bdsatish wrote:
> How does (a/b) work when both 'a' and 'b' are pure integers ?
>
> >> (9/2)
> 4
>
> >> (-9/2)
> -5
>
> Why is it -5 ? I expect it to be -4 ? Because, in C/C++, 9/2 is 4 and
> so n
On Apr 10, 9:28 pm, bdsatish <[EMAIL PROTECTED]> wrote:
> How does (a/b) work when both 'a' and 'b' are pure integers ?
Python defines the quotient and remainder from integer division so
that a = qb + r and 0<=r < abs(b). C/C++ lets the remainder be
negative.
>>> divmod(-9,2)
(-5, 1)
>>> divmod(9
En Thu, 10 Apr 2008 23:57:29 -0300, <[EMAIL PROTECTED]> escribió:
> i.e. you give, the graph, the start and end vertices as inputs and you
> get the output as a listing of all the paths. This is where I got to.
> It would be very nice if you could kindly hint on how to proceed
> further. Thank you
Hi,
I have tried Pydev as used in Python(x,y).
I tend to like it but I miss a couple of things..
When viewing the code, Line numbers can be added for reference.
This is a very good thing BUT if line numbers are useful in the monitor
screen view they would of course be desirable in a hard copy.
B
On Apr 10, 5:18 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Thu, 10 Apr 2008 05:45:41 -0300, ZeeGeek <[EMAIL PROTECTED]> escribió:
>
> > On Apr 10, 4:31 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
> >> En Wed, 09 Apr 2008 23:12:00 -0300, ZeeGeek <[EMAIL PROTECTED]>
> >> escri
Hi,
using pty.spawn() it seems that stderr output of the spawned process is
directed to stdout. Is there a way to keep stderr separate and only direct
stdin and stdout to the pty?
TIA,
w best regards,
Wilbert Berendsen
--
http://www.wilbertberendsen.nl/
"You must be the change you wish to see
101 - 163 of 163 matches
Mail list logo