[EMAIL PROTECTED] wrote:
My problem is that I don't know how to create a graph_object that
remains persistent through time (it has to be the same graph_object for
One possibility is to have a remote procedure call server that stores
the graph running seperately from your wab application.
Your web
ionic wrote:
Ok sorry guys,
using the python gui, if i hit the 'enter' key python just executes what
ever ive typed. It doesnt take me to the next line.
try shift + enter
/Esben
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 21 Apr 2005 21:16:43 +0800, Dan
<[EMAIL PROTECTED]> wrote:
>I've having trouble coming to grip with Python strings.
>
>I need to send binary data over a socket. I'm taking the data from a
>database. When I extract it, non-printable characters come out as a
>backslash followed by a three
Here is an example of the input list:
[101, 66, 75, 107, 108, 101, 106, 98, 111, 88, 119, 93, 115, 95, 114,
95, 118, 109, 85, 75, 88, 97, 53, 78, 98, 91, 115, 77, 107, 153, 108,
101]
Here is the code I am working on now:
>>> for num in alist:
... if adict.has_key(num):
... x = adic
I'm back...
Thanks to Michael Spencer and Steven Bethard for their excellent help.
It has taken me a few sessions of reading, and programming, and I've
had to pick up the exploded fragments of my skull from time to time.
But I now have succeeded in making deepcopy work for a simple class
that I wr
SUMMARY
===
For the past few weeks, a self-professed
internet evangelist has posted several times
to several news groups to claim several
points as facts. It would appear that these
assertions do not stand up to close
examination, logic and reason, and stand in
direct contradiction to the expl
Steve,
thanks for the input. That is actually what I am trying to do, but I
don't know the syntax for this in python. For example here is a list I
want to work with as input:
[101, 66, 75, 107, 108, 101, 106, 98, 111, 88, 119, 93, 115, 95, 114,
95, 118, 109, 85, 75, 88, 97, 53, 78, 98, 91, 115, 77
Terry Reedy <[EMAIL PROTECTED]> wrote:
> Depending upon you particular application, 'completeness' may be a
> more relevant concern than 'performance'. I believe the original
> Python regex engine did not have all the Perl extensions, some of them
> decidedly 'non regular'. It was replace by the
[EMAIL PROTECTED] wrote:
I'm back...
[wondering why copy.deepcopy barfs on array instances]
http://www.python.org/doc/2.3.3/lib/module-copy.html
deepcopy:
...
This version does not copy types like module, class, function, method, stack
trace, stack frame, file, socket, window, *array*, or any sim
On Thu, 21 Apr 2005 21:34:03 +0100, "ionic" <[EMAIL PROTECTED]> wrote:
Open a text editor and write your code. Save the file with a .py
extension, i.e., myprogram.py. From the command line type 'python
myfile.py'
Dan
>
>Ok sorry guys,
>
>using the python gui, if i hit the 'enter' key python ju
Actually,
I think I got it now. Here is what I did:
>>> for num in alist:
... if adict.has_key(num):
... x = adict.get(num)
... x = x + 1
... adict.update({num:x})
... else:
... adict.update({num:1})
...
>>> adict
{128: 2, 129: 2, 132: 1, 15
hawkesed said unto the world upon 2005-04-21 20:28:
Actually,
I think I got it now. Here is what I did:
for num in alist:
... if adict.has_key(num):
... x = adict.get(num)
... x = x + 1
... adict.update({num:x})
... else:
... adict.updat
On Thu, 21 Apr 2005 10:09:59 -0400, Peter Hansen <[EMAIL PROTECTED]>
wrote:
Thanks, that's exactly what I wanted. Easy when you know how.
Dan
>Dan wrote:
>> I've having trouble coming to grip with Python strings.
>>
>> I need to send binary data over a socket. I'm taking the data from a
>> da
hawkesed wrote:
Actually,
I think I got it now. Here is what I did:
for num in alist:
... if adict.has_key(num):
... x = adict.get(num)
... x = x + 1
... adict.update({num:x})
A simpler way to do this last line is
adict[num] = x
... else:
...
On Thu, 21 Apr 2005 10:09:59 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote:
>Dan wrote:
>> I've having trouble coming to grip with Python strings.
>>
>> I need to send binary data over a socket. I'm taking the data from a
>> database. When I extract it, non-printable characters come out as a
>>
Antoon Pardon wrote:
This is nonsens. table[i] = j, just associates value j with key i.
That is the same independend from whether the keys can start from
0 or some other value.
Also, everyone, please keep in mind that you always have
the option of using a *dictionary*, in which case your
indices ca
Python is now enter 2.4 era. It is greate, and I want to upgrade too.
However, everytime upgrading to a new version is a great pain. For
every version, we start to re-install what have been in our past
python.
Re-install all packages sometimes require searching for a new version
of binary which i
Roy Smith wrote:
What would actually be cool is if Python were to support the normal math
notation for open or closed intervals.
>
foo = bar (1, 2)
foo = bar (1, 2]
foo = bar [1, 2)
foo = bar [1, 2]
That would certainly solve this particular problem, but the cost to the
rest of the language synta
[EMAIL PROTECTED] wrote:
I disagree. Programming languages should not needlessly surprise
people, and a newbie to Python probably expects that x[1:3] =
[x[1],x[2],x[3]].
But said newbie's expectations will differ considerably
depending on which other language he's coming from. So
he's almost always
In article <[EMAIL PROTECTED]>,
Greg Ewing <[EMAIL PROTECTED]> wrote:
> Roy Smith wrote:
>
> > What would actually be cool is if Python were to support the normal math
> > notation for open or closed intervals.
> >
> > foo = bar (1, 2)
> > foo = bar (1, 2]
> > foo = bar [1, 2)
> > foo = bar [1
Dan Bishop wrote:
> Antoon Pardon wrote:
> > Like users have a choice in how long they make a list, they
> > should have a choice where the indexes start. (And that
> > shouldn't be limited to 0 and 1).
>
> Suppose you could. Then what should
>
> ([3, 1, 4] indexbase 0) + ([1, 5, 9] indexbase
[EMAIL PROTECTED] writes:
> > Suppose you could. Then what should
> > ([3, 1, 4] indexbase 0) + ([1, 5, 9] indexbase 4)
> > equal?
> If + means add, the result would be ([4,6,13] indexbase 0) .
That's counterintuitive. I'd expect c = a + b to result in c[i] =
a[i]+b[i] for all elements. So, fo
Greg Ewing <[EMAIL PROTECTED]> wrote:
> Also, everyone, please keep in mind that you always have
> the option of using a *dictionary*, in which case your
> indices can start wherever you want.
>
> You can't slice them, true, but you can't have everything. :-)
Of course you can slice them, you jus
Thanks for the input. I was just looking for some feedback about which
was better and faster, if an answer exists. However, I am not choosing
Perl or Python b/c of it's RegEx engine as someone mentioned. The
question was just because I was curious, sorry if I misled you to think
I was choosing w
Michael Spencer wrote:
http://www.python.org/doc/2.3.3/lib/module-copy.html
deepcopy:
...
This version does not copy types like module, class, function, method,
stack trace, stack frame, file, socket, window, *array*, or any similar
types.
...
On reflection, I realize that this says that the arr
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Ahh, ok. Now I understand. I think you could probably search the
python-dev archives and see why the decision was made as it was. For
pretty
> On Thu, 21 Apr 2005 09:59:54 -0500, Larry Bates
> <[EMAIL PROTECTED]> wrote:
>
>>2) Or if you not you could see if the argument has next and
>>__iter__ methods (more general solution)
>>
>>if hasattr(arg, 'next') and not hasattr(arg, '__iter__'):
>># perform work on iterable
The 'not' is a
[EMAIL PROTECTED] (Bengt Richter) writes:
> I would try right-clicking the shortcut icon and selecting
> properties, then select the shortcut tab and edit the target string
> with s/python/pythonw/ and then click ok.
>
> Then try double clicking the shortcut icon again. If that does it,
> you're
I am trying to prevent a user from resizing a frame beyond its
"natural" size as given by winfo_reqwidth and winfo_reqheight, without
any success. Can anyone make any suggestions, based on my code below?
Thanks!
from Tkinter import *
class Table(Frame):
def __init__(self, master,
I'm working on a module that will manipulate large blobs. I'm using a C
dll to allocate big blocks of memory, using PyMem_Malloc, which is
working quite well up until I try to manipulate a blob that exhausts
Python's heap. I'm guessing that to increase the heapsize, I'm going to
have to recom
James Stroud <[EMAIL PROTECTED]> writes:
> Is it relevant that Python can produce compiled expressions? I don't think
> that there is such a thing with Perl.
The problem in python here is that it needs to always recompile the
regexp. I would like to have a way to write a regexp as a constant and
On Thu, 21 Apr 2005 15:37:03 -0600, Steven Bethard <[EMAIL PROTECTED]> wrote:
>I have a list of strings that looks something like:
> ['O', 'B_X', 'B_Y', 'I_Y', 'O', 'B_X', 'I_X', 'B_X']
>I need to group the strings into runs (lists) using the following rules
>based on the string prefix:
>
"Gary" <[EMAIL PROTECTED]> writes:
[ py.test ad follows :) ]
> def test_SomeTest(...):
> ...
> self.AssertAllFilesExist(fileList)
>
> or
>
> def test_SomeTest(...):
> ...
> [ self.AssertFileExists(f) for f in fileList ]
I prefer the latter, because t
Roy Smith <[EMAIL PROTECTED]> writes:
> Greg Ewing <[EMAIL PROTECTED]> wrote:
>> Also, everyone, please keep in mind that you always have
>> the option of using a *dictionary*, in which case your
>> indices can start wherever you want.
>>
>> You can't slice them, true, but you can't have everythi
Miki Tebeka <[EMAIL PROTECTED]> writes:
> Hello jozo,
>
>> I have to work on python lexical definition in Lex. I spent lots of my
>> time to find regular expresions written for Lex of Python language but
>> nothing.
>> Can somebody help me?
> http://www.antlr.org/grammar/list (search for Python)
>
Grant Edwards <[EMAIL PROTECTED]> writes:
> On 2005-04-21, Roy Smith <[EMAIL PROTECTED]> wrote:
>> Grant Edwards <[EMAIL PROTECTED]> wrote:
>>>Sure, but what about the case where his program is on paper
>>>tape and all he has for an editor is an ice pick?
>>
>> Can't you emulate that in emacs wit
Tim Stone wrote:
I'm working on a module that will manipulate large blobs. I'm using a C
dll to allocate big blocks of memory, using PyMem_Malloc, which is
working quite well up until I try to manipulate a blob that exhausts
Python's heap.
how large is that?
I'm guessing that to increase the he
Dear All,
In Php If I send a command to system function
then It will return 1 on success and 0 on failure. So
based upon that value I can to further work.
But In Python If I send a command to system
function then It will return 0 only for both
conditions(success and failure). So What
Hello evryone
I am a newbie to python. I have a makefile which i can compile in
UNIX/LINUX, But i
I am planning to write a python script which actually does what my
MAKEFILE does. The make file is
#Makefile and some scripts to give output
#numbers
#Change till sign #END
var1:=564-574
a1 =
Willem Ligtenberg <[EMAIL PROTECTED]> wrote:
> On Sun, 17 Apr 2005 02:16:04 +, William Park wrote:
> > Care to post more details?
>
> The XML file I need to parse contains information about genes.
> So the first element is a gene and then there are a lot sub-elements with
> sub-elements. I onl
I have a web app that has been running just fine for several months under
Python 2.2.2.
We are preparing to upgrade the server to run Python 2.4.1.
However, part of my web app is throwing an error on this code (that has
previously worked without exception):
>>> time.strftime("%Y-%m-%d", (Y, M,
Op 2005-04-21, Dan Bishop schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>> Op 2005-04-21, Steve Holden schreef <[EMAIL PROTECTED]>:
>> > [EMAIL PROTECTED] wrote:
> ...
>> >> Along the same lines, I think the REQUIREMENT that x[0] rather
> than
>> >> x[1] be the first element of list x is a mi
praba kar <[EMAIL PROTECTED]> writes:
> Dear All,
>
> In Php If I send a command to system function
> then It will return 1 on success and 0 on failure. So
> based upon that value I can to further work.
>
> But In Python If I send a command to system
> function then It will return 0 onl
praba kar wrote:
Dear All,
In Php If I send a command to system function
then It will return 1 on success and 0 on failure. So
based upon that value I can to further work.
But In Python If I send a command to system
function then It will return 0 only for both
conditions(success and fail
201 - 244 of 244 matches
Mail list logo