On Thu, Feb 26, 2009 at 10:26 PM, odeits wrote:
> On Feb 26, 3:05 am, Clarendon wrote:
>> Hi. This must be a simple command but I just can't find it in the
>> Phthon manual. How do I delete all items with a certain condition from
>> a list? For instance:
>>
>> L=['a', 'b', 'c', 'a']
>>
>> I want
On Feb 26, 3:05 am, Clarendon wrote:
> Hi. This must be a simple command but I just can't find it in the
> Phthon manual. How do I delete all items with a certain condition from
> a list? For instance:
>
> L=['a', 'b', 'c', 'a']
>
> I want to delete all 'a's from the list.
> But if L.remove('a') o
On 27 Feb, 01:40, Steve Holden wrote:
> Chris Rebert wrote:
> > On Thu, Feb 26, 2009 at 2:23 PM, Gary Schells wrote:
> >> Hello,
> >> Python newbie here. I am working with Python and geoprocessing in ArcGIS.
> >> I'm taking a training course online and the exercise I'm working on makes
> >> ment
On Feb 26, 9:15 pm, Chris Rebert wrote:
> On Thu, Feb 26, 2009 at 8:49 PM, Benjamin Peterson
> wrote:
> > Shanmuga Rajan gmail.com> writes:
>
> >> f any one suggests better solution then i will be very happy.Advance thanks
> > for any help.Shan
>
> > Use a set.
>
> To expand on that a bit:
>
>
Hello Group,
I've spwaned a process using os.spwanl. As part of this process, I spwan one
more process, using subprocess.Popen.
After I close the the process spwaned using os.spwanl, the child process
started by it using subprocess.Popen, doesn't get closed.
Is there any way to do this in python 2
On Feb 26, 11:14 pm, "Paddy O'Loughlin"
wrote:
> Try this as an outline:
> script1.py
> from subprocess import Popen
>
> if __name__ == '__main__':
> scriptname = "script2.py"
>
> Popen("python %s" % scriptname, shell=True)
>
> print "I'm done"
>
> script2.py
> fr
On Thu, Feb 26, 2009 at 8:49 PM, Benjamin Peterson wrote:
> Shanmuga Rajan gmail.com> writes:
>
>> f any one suggests better solution then i will be very happy.Advance thanks
> for any help.Shan
>
> Use a set.
To expand on that a bit:
counted_recs = set(rec[0] for rec in some_fun())
#or in Pyth
On Thu, Feb 26, 2009 at 8:39 PM, Anjanesh Lekshminarayanan
wrote:
>> How do we know that from the what the OP posted?
> Its CGI alright.
> spaces = form.has_key('spaces') and form.getvalue('spaces') == '1'
>
> But I just dont see how
> spaces = (form.has_key('spaces') ? form.getvalue('spaces') ==
[Paul Rubin]
> Ehh, I guess I'm not surprised at the slowdown and extra complexity
> from the second dict. Oh well. If the module really turns out to be
> really used a lot, another (messy) approach would be to write a C
> extension that uses a doubly linked list some day.
That seems like an ide
Shanmuga Rajan gmail.com> writes:
> f any one suggests better solution then i will be very happy.Advance thanks
for any help.Shan
Use a set.
--
http://mail.python.org/mailman/listinfo/python-list
MRAB wrote:
Here's my solution (I haven't bothered with making it efficient, BTW):
import operator
def solve(n):
best_len = n
best_expr = ""
for x in range(1, n - 2):
for y in range(x, n):
for op, name in operator_list:
# Does this pair with this
> How do we know that from the what the OP posted?
Its CGI alright.
spaces = form.has_key('spaces') and form.getvalue('spaces') == '1'
But I just dont see how
spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ?
True: False : False)
is complicated in anyway. Its not that hard to read
On 2009-02-27, Paul Rubin wrote:
> But the == 1 comparison will always fail, since getvalue returns a string.
How do we know that from the what the OP posted?
--
Grant
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I have a list of Records with some details.(more than 15 million records)
with duplication
I need to iterate through every record and need to eliminate duplicate
records.
Currently i am using a script like this.
counted_recs = [ ]
x = some_fun() # will return a generator, this generator
Hi all,
I created a poll "what do you miss in OpenOpt framework", could you
take participation?
http://www.doodle.com/participation.html?pollId=a78g5mk9sf7dnrbe
Let me remember for those ones who is not familiar with OpenOpt - it's
a free Python-written numerical optimization framework:
http://o
Another problem with this assignment... I have to list all the ships
mentioned in the database. All the ships may not appear in the Ships
relations... I said the following in algebraic expression
SELECT name(Ships UNION (SELECT ship (Outcome UNION(SELECT class
(Classes)))
Would that work?
--
http
On Feb 27, 8:40 am, Chris Rebert wrote:
> On Thu, Feb 26, 2009 at 2:23 PM, Gary Schells wrote:
> > I am using version 2.5 and have not been able to locate PythonWin. The
> > download just includes Idle for the environment. Can anyone point me in the
> > right direction to download the PythonWin
> (1) what is produced on Anjanesh's machine
>>> sys.getdefaultencoding()
'utf-8'
> (2) it looks like a small snippet from a Python source file!
Its a file containing just JSON data - but has some unicode characters
as well as it has data from the web.
> Anjanesh, Is it a .py file
Its a .json fil
Chris Rebert writes:
> spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1)
spaces = form.has_key('spaces') and form.getvalue('spaces') == 1
or even (this is about the cgi module, I think)
spaces = form.getvalue('spaces', None) == 1
But the == 1 comparison will always fail,
On 2009-02-27, Anjanesh Lekshminarayanan wrote:
> How do I achieve something like this using python ?
> spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ? True :
> False : False)
if form.has_key('spaces'):
spaces = form.getvalue('spaces') == 1
else:
spaces = Fal
On Thu, Feb 26, 2009 at 7:11 PM, Anjanesh Lekshminarayanan
wrote:
> How do I achieve something like this using python ?
> spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ? True
> : False : False)
>
> spaces = True if form.getvalue('spaces') == 1 if
> form.has_key('spaces') else Fal
Anjanesh Lekshminarayanan wrote:
> How do I achieve something like this using python ?
> spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ? True
> : False : False)
>
> spaces = True if form.getvalue('spaces') == 1 if
> form.has_key('spaces') else False else False
If you've got any
How do I achieve something like this using python ?
spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ? True
: False : False)
spaces = True if form.getvalue('spaces') == 1 if
form.has_key('spaces') else False else False
--
Anjanesh Lekshmnarayanan
--
http://mail.python.org/mailman/l
Hi,
I want to factor (red, green and blue at the same time) an image using
wx but without any GUI display or windows but it keeps crashing and if I
set the checks to ignore it, it doesn't produce the images at all.
It looks like this:
import wx
img = wx.Image("star.jpg",wx.BITMAP_TYPE_BMP)
fac
Use 1 and 2 and treat them as equivalent to boolean true and false.
--
http://mail.python.org/mailman/listinfo/python-list
Brett Hedges:
> My question is how do I go to a previous line in the file? xreadlines has a
> file.next() statement that gives the next line, and I need a statement that
> gives me the previous line.<
In modern versions of Python you usually don't need xreadlines,
because files are iterable.
If
On Thu, Feb 26, 2009 at 4:32 PM, Brett Hedges wrote:
>
> Hi,
>
> I am using both xreadlines and files iterators for a script that I need to
> finish. I am iterating over the entire file but stopping to use xreadlines to
> grab certain lines as strings to process them.
>
> My question is how do I
Chris Rebert wrote:
> On Thu, Feb 26, 2009 at 2:23 PM, Gary Schells wrote:
>> Hello,
>> Python newbie here. I am working with Python and geoprocessing in ArcGIS.
>> I'm taking a training course online and the exercise I'm working on makes
>> mention of using PythonWin instead of Idle.
>>
>> I am
On Thu, Feb 26, 2009 at 4:37 PM, Gabriel Genellina
wrote:
> En Thu, 26 Feb 2009 22:18:18 -0200, Chris Rebert
> escribió:
>>
>> On Thu, Feb 26, 2009 at 4:08 PM, Peter Billam
>> wrote:
>>>
>>> On 2009-02-26, Clarendon wrote:
Hi. This must be a simple command but I just can't find it in
Hi,
I am using both xreadlines and files iterators for a script that I need to
finish. I am iterating over the entire file but stopping to use xreadlines to
grab certain lines as strings to process them.
My question is how do I go to a previous line in the file? xreadlines has a
file.next() s
Jesse Aldridge wrote:
> I have one module called foo.py
> -
> class Foo:
> foo = None
>
> def get_foo():
> return Foo.foo
>
> if __name__ == "__main__":
> import bar
> Foo.foo = "foo"
> bar.go()
> -
> And another one called bar.py
>
En Thu, 26 Feb 2009 22:18:18 -0200, Chris Rebert
escribió:
On Thu, Feb 26, 2009 at 4:08 PM, Peter Billam
wrote:
On 2009-02-26, Clarendon wrote:
Hi. This must be a simple command but I just can't find it in the
Phthon manual. How do I delete all items with a certain condition from
a list? F
Peter Billam wrote:
> On 2009-02-26, Clarendon wrote:
>> Hi. This must be a simple command but I just can't find it in the
>> Phthon manual. How do I delete all items with a certain condition from
>> a list? For instance: > L=['a', 'b', 'c', 'a']
>> I want to delete all 'a's from the list. > But
On 2009-02-27, Chris Rebert wrote:
> On Thu, Feb 26, 2009 at 4:08 PM, Peter Billam wrote:
>> On 2009-02-26, Clarendon wrote:
>>> How do you delete all 'a's?
>>
>> L2 = list(set(L))
>> works for me...
>
> A. That doesn't by itself remove all the 'a's, although it does
> remove all but 1 'a'
> B.
En Thu, 26 Feb 2009 22:08:26 -0200, Peter Billam
escribió:
On 2009-02-26, Clarendon wrote:
Hi. This must be a simple command but I just can't find it in the
Phthon manual. How do I delete all items with a certain condition from
a list? For instance: > L=['a', 'b', 'c', 'a']
I want to delete
On Feb 26, 1:59 am, Tassilo Horn wrote:
> Xah Lee writes:
>
> Hi Xah,
>
> > is the suggestion of using modern standard shortcut set of X C V for
> > Cut, Copy, Paste, of which Linux uses, means it is turning emacs to a
> > fancy Notepad clone?
>
> The functionality stays the same, but IMO it woul
On Thu, Feb 26, 2009 at 4:08 PM, Peter Billam wrote:
> On 2009-02-26, Clarendon wrote:
>> Hi. This must be a simple command but I just can't find it in the
>> Phthon manual. How do I delete all items with a certain condition from
>> a list? For instance: > L=['a', 'b', 'c', 'a']
>> I want to dele
Trip Technician wrote:
anyone interested in looking at the following problem.
we are trying to express numbers as minimal expressions using only the
digits one two and three, with conventional arithmetic. so for
instance
33 = 2^(3+2)+1 = 3^3+(3*2)
are both minimal, using 4 digits but
33 = ((3
On Thu, 26 Feb 2009 23:10:20 -, Jonathan Gardner
wrote:
[snip]
For each iteration, you take each surviving walker and spawn a new
walker that takes a step in each possible direction. Then you check if
any of those walkers found the value you are looking for. If so,
you've found the answe
On 2009-02-26, Clarendon wrote:
> Hi. This must be a simple command but I just can't find it in the
> Phthon manual. How do I delete all items with a certain condition from
> a list? For instance: > L=['a', 'b', 'c', 'a']
> I want to delete all 'a's from the list. > But if L.remove('a')
> only de
Raymond Hettinger writes:
> > What about using a second dictionary
> My first attempt used exactly that approach and it works fine
> though it does complicate the code quite a bit and slows down
> all of the common operations by a constant factor.
Ehh, I guess I'm not surprised at the slowdown a
On Thu, 2009-02-26 at 13:48 -0800, Jesse Aldridge wrote:
> I have one module called foo.py
> -
> class Foo:
> foo = None
>
> def get_foo():
> return Foo.foo
>
> if __name__ == "__main__":
> import bar
> Foo.foo = "foo"
> bar.go()
> -
> A
> > What about using a second dictionary (indexed by the incrementing
> > counter) instead of a list to record the insertion order? Then you
> > have O(1) deletion, and traversal takes an O(n log n) sorting
> > operation.
> My first attempt used exactly that approach and it works fine
> though it
[Paul Rubin]
> What about using a second dictionary (indexed by the incrementing
> counter) instead of a list to record the insertion order? Then you
> have O(1) deletion, and traversal takes an O(n log n) sorting
> operation.
My first attempt used exactly that approach and it works fine
though i
Raymond Hettinger writes:
> I don't see any fast/clean way. It's possible to tracking pending
> deletions and do them all at once but that's a bit messy and slow.
What about using a second dictionary (indexed by the incrementing
counter) instead of a list to record the insertion order? Then you
On Feb 20, 6:31 am, Trip Technician wrote:
> anyone interested in looking at the following problem.
>
> we are trying to express numbers as minimal expressions using only the
> digits one two and three, with conventional arithmetic. so for
> instance
>
> 33 = 2^(3+2)+1 = 3^3+(3*2)
>
> are both min
[Hrvoje Niksic]
> It seems that __delitem__ of an existing key is O(n), whereas it's
> amortized constant time for dicts. (__setitem__ is constant time for
> both.) Is there a way to avoid this?
I don't see any fast/clean way. It's possible to tracking pending
deletions
and do them all at once
On Feb 26, 3:29 pm, m...@pixar.com wrote:
> I have some strings that look like function calls, e.g.
>
> "junkpkg.f1"
> "junkpkg.f1()"
> "junkpkg.f1('aaa')"
> "junkpkg.f1('aaa','bbb')"
> "junkpkg.f1('aaa','bbb','ccc')"
> "junkpkg.f1('aaa','with,comma')
[Benjamin Peterson]
> Why not just inherit from collections.MutableMapping?
It makes the recipe shorter to inherit some methods from dict. Also,
subclassing from dict gives a speedup for __getitem__(), __len__(),
and get().
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 26 Feb 2009 23:32:13 +0100, jkv wrote:
Jean-Paul Calderone wrote:
sys.stdout.write('Password: ');
#IAC DO ECHO sys.stdout.write('\xFF\xFB\x01')
password = raw_input()
If the client sends 'qwerty\r\n' everything is fine and the password get
stored in the variable. But som
On Feb 27, 8:48 am, Jesse Aldridge wrote:
> I have one module called foo.py
> -
> class Foo:
> foo = None
>
> def get_foo():
> return Foo.foo
>
> if __name__ == "__main__":
> import bar
> Foo.foo = "foo"
> bar.go()
> -
> And another one c
On Thu, Feb 26, 2009 at 2:23 PM, Gary Schells wrote:
>
> Hello,
> Python newbie here. I am working with Python and geoprocessing in ArcGIS.
> I'm taking a training course online and the exercise I'm working on makes
> mention of using PythonWin instead of Idle.
>
> I am using version 2.5 and have
On Feb 26, 3:50 am, Shawn Milochik wrote:
> On Wed, Feb 25, 2009 at 11:38 AM, Marco Mariani wrote:
>
> > Yes it's in Python alright, but it's not Pythonese yet. You could try
> > avoiding the getter/setter stuff, and camelCase method naming, things like
> > that, for a start.
>
> > --
> >http://m
Jean-Paul Calderone wrote:
sys.stdout.write('Password: ');
#IAC DO ECHO sys.stdout.write('\xFF\xFB\x01')
password = raw_input()
If the client sends 'qwerty\r\n' everything is fine and the password
get stored in the variable. But sometimes, depending on how broken
the telnet clien
Hello,
Python newbie here. I am working with Python and geoprocessing in
ArcGIS. I'm taking a training course online and the exercise I'm
working on makes mention of using PythonWin instead of Idle.
I am using version 2.5 and have not been able to locate PythonWin. The
download just includ
I'm pretty sure that Foo is getting replaced once you import Foo, why not
pass the Foo() object to bar's go? I'm sure there are other ways, but yes,
circular imports are indeed evil.
On Thu, Feb 26, 2009 at 5:13 PM, Chris Rebert wrote:
> On Thu, Feb 26, 2009 at 1:48 PM, Jesse Aldridge
> wrote:
On Thu, Feb 26, 2009 at 1:48 PM, Jesse Aldridge wrote:
> I have one module called foo.py
> -
> class Foo:
> foo = None
>
> def get_foo():
> return Foo.foo
>
> if __name__ == "__main__":
> import bar
> Foo.foo = "foo"
> bar.go()
> -
> And anoth
On Feb 27, 8:29 am, m...@pixar.com wrote:
> I have some strings that look like function calls, e.g.
>
> "junkpkg.f1"
> "junkpkg.f1()"
> "junkpkg.f1('aaa')"
> "junkpkg.f1('aaa','bbb')"
> "junkpkg.f1('aaa','bbb','ccc')"
> "junkpkg.f1('aaa','with,comma')
I have one module called foo.py
-
class Foo:
foo = None
def get_foo():
return Foo.foo
if __name__ == "__main__":
import bar
Foo.foo = "foo"
bar.go()
-
And another one called bar.py
-
import foo
def go():
assert f
Robert Kern wrote:
> On 2009-02-26 15:29, m...@pixar.com wrote:
> Use the compiler module to generate an AST and walk it. That's the real
> way. For me, that would also be the quick way because I am familiar with
> the API, but it may take you a little bit of time to get used to it.
ah, that's
Raymond Hettinger writes:
> Here's a proposed implementation for Py2.7 and Py3.1:
>
> http://code.activestate.com/recipes/576669/
Several methods like __contains__() and __getitem__() are not
overridden, so their performance is just as fast as a regular
dictionary.
Methods l
On 2009-02-26 15:29, m...@pixar.com wrote:
I have some strings that look like function calls, e.g.
"junkpkg.f1"
"junkpkg.f1()"
"junkpkg.f1('aaa')"
"junkpkg.f1('aaa','bbb')"
"junkpkg.f1('aaa','bbb','ccc')"
"junkpkg.f1('aaa','with,comma')"
and I nee
On Thu, 2009-02-26 at 21:39 +, Tim Wintle wrote:
> On Thu, 2009-02-26 at 21:29 +, m...@pixar.com wrote:
> > "junkpkg.f1", ['aaa','with,comma']
oops - missed this one, ignore my last reply.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2009-02-26 at 21:29 +, m...@pixar.com wrote:
> I have some strings that look like function calls, e.g.
>
> "junkpkg.f1"
> "junkpkg.f1()"
> "junkpkg.f1('aaa')"
> "junkpkg.f1('aaa','bbb')"
> "junkpkg.f1('aaa','bbb','ccc')"
> "junkpkg.f1('aaa','with,comma')"
>
> and I need to split them
I have some strings that look like function calls, e.g.
"junkpkg.f1"
"junkpkg.f1()"
"junkpkg.f1('aaa')"
"junkpkg.f1('aaa','bbb')"
"junkpkg.f1('aaa','bbb','ccc')"
"junkpkg.f1('aaa','with,comma')"
and I need to split them into the function name and li
On Thu, 26 Feb 2009 12:27:26 -0800 (PST), Giampaolo Rodola'
wrote:
Hi,
I'm working on a Python module called psutil [1] for reading process
information in a cross-platform way.
I'm having a problem with psutil test suite.
Almost all the test cases we implemented so far look like this:
def test
En Thu, 26 Feb 2009 16:17:42 -0200, Maxim Khitrov
escribió:
I'm looking for a function in the standard library or pywin32 package
that will block until a certain condition is met or it is interrupted
by Ctrl-C. For example, time.sleep() would have been perfect for my
needs if thread.interrupt
Ben wrote:
> On Feb 24, 11:31?am, Nick Craig-Wood wrote:
> > So do you want to embed python into your code?
> >
> > I'm still not clear what you are trying to achieve with python, though
> > I have a better idea what SLAG is now!
>
> Actually no, I want to EXTEND python using the lower levels
Terry Reedy wrote:
> Steve Holden wrote:
>> Terry Reedy wrote:
>>> Gabriel Genellina wrote:
>>>
> L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define __ne__
>>> In Py3, all classes inherit .__ne__ from 'object'.
>>>
>> Isn't that inherited method just an id
Hi,
I'm working on a Python module called psutil [1] for reading process
information in a cross-platform way.
I'm having a problem with psutil test suite.
Almost all the test cases we implemented so far look like this:
def test_foo(self):
test_process = subprocess.Popen(sys.executable, stdout=
Steve Holden wrote:
Terry Reedy wrote:
Gabriel Genellina wrote:
L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define __ne__
In Py3, all classes inherit .__ne__ from 'object'.
Isn't that inherited method just an identity comparison?
Yes. And so is, by defau
On Thu, Feb 26, 2009 at 12:19 PM, Muddy Coder wrote:
> Hi Folks,
>
> cgi module can easily acquire the all fields of data input from client
> side, through a form. Then, a simple line of code:
>
> form_dict = cgi.FieldStorage()
>
> grabs all data into a dictionary form_dict. The rest becomes a pie
Hi Folks,
cgi module can easily acquire the all fields of data input from client
side, through a form. Then, a simple line of code:
form_dict = cgi.FieldStorage()
grabs all data into a dictionary form_dict. The rest becomes a piece
of cake by querying the form_dict. Nice!
However, it is done in
On Thu, 26 Feb 2009 11:46:24 +0100, jkv wrote:
Hi,
Are there any way to change the EOL character for sys.stdin.readline() and
raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will use
\r\000 as E
Terry Reedy wrote:
jkv wrote:
Hi,
Are there any way to change the EOL character for
sys.stdin.readline() and raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will
use \r\000 as EOL.
Example fro
What is it about with statements that makes you want to so frequently embed
them in try/except statements?
Skip
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
> Gabriel Genellina wrote:
>
>>
>>> L = filter('a'.__ne__,L)
>>
>> And this is probably the fastest. But not all types define __ne__
>
> In Py3, all classes inherit .__ne__ from 'object'.
>
Isn't that inherited method just an identity comparison?
However in this particular c
Terry Reedy wrote:
> Steve Holden wrote:
>> David Niergarth wrote:
[...]
>>> I'm not sure what deleting a slice accomplishes (del x[:]); the
>>> behavior is the same whether I do del x or del x[:]. Any ideas?
>>>
>> del x removes the name x from the current namespace, garbage collecting
>> the obje
Gabriel Genellina wrote:
L = filter('a'.__ne__,L)
And this is probably the fastest. But not all types define __ne__
In Py3, all classes inherit .__ne__ from 'object'.
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
David Niergarth wrote:
Tim Peters showed a way to demonstrate the fix in
http://mail.python.org/pipermail/python-dev/2006-March/061991.html
For simpler fun, run this silly little program, and look at memory
consumption at the prompts:
"""
x = []
for i in xrange(100):
Greetings,
I'm looking for a function in the standard library or pywin32 package
that will block until a certain condition is met or it is interrupted
by Ctrl-C. For example, time.sleep() would have been perfect for my
needs if thread.interrupt_main() could interrupt the call from another
thread i
Try this as an outline:
script1.py
from subprocess import Popen
if __name__ == '__main__':
scriptname = "script2.py"
Popen("python %s" % scriptname, shell=True)
print "I'm done"
script2.py
from time import sleep
if __name__ == '__main__':
while (True):
jkv wrote:
Hi,
Are there any way to change the EOL character for sys.stdin.readline()
and raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will use
\r\000 as EOL.
Example from my code:
sys.s
Raymond Hettinger rcn.com> writes:
>
> Here's a proposed implementation for Py2.7 and Py3.1:
>
> http://code.activestate.com/recipes/576669/
>
> Would like you guys to kick the tires, exercise it a bit, and let me
> know what you think. The recipe runs under 2.6 and 3.0 without
> modifica
I have embedded Python in a shared library. This works fine in Windows (dll),
but I get the following error is Ubuntu when I try to load modules:
/usr/lib/python2.5/lib-dynload/time.so: error: symbol lookup
error: undefined symbol: PyExc_ValueError
I found many postings on this issue on the int
En Thu, 26 Feb 2009 13:32:27 -0200, venutaurus...@gmail.com
escribió:
On Feb 26, 7:47 pm, Tim Wintle wrote:
On Thu, 2009-02-26 at 06:00 -0800, venutaurus...@gmail.com wrote:
> Thanks for the reply,
> Being a newbie to python, I am finding it difficult to
> understand the logic ev
David Niergarth wrote:
> Tim Peters showed a way to demonstrate the fix in
>
> http://mail.python.org/pipermail/python-dev/2006-March/061991.html
>
>> For simpler fun, run this silly little program, and look at memory
>> consumption at the prompts:
>>
>> """
>> x = []
>> for i in xrange(100):
On Thursday 26 February 2009 11:10:15 am Tim Golden wrote:
> Have a look at DrProject[1], a Trac-alike which handles
> multiple projects. (Not used it myself).
>
> [1] https://www.drproject.org/
I've used DrProject a bit (my gf is one of the developers). If you like trac,
chances are that you wil
jkv wrote:
Hi,
Are there any way to change the EOL character for sys.stdin.readline()
and raw_input()?
My problem is that i cannot rely on that the clients connection to my
application will end all lines with \n or \r\n. Sometimes they will use
\r\000 as EOL.
Example from my code:
sys.s
Thomas Guettler wrote:
Hi,
this is a bit off topic.
In our company we have several SVN repositories.
According to [1] Trac by default only handles one
repository.
Of course Trac links like changeset [1234] would not work anymore.
You would need [repro/1234] or something like this.
I think ma
>>
>> from functools import partial
>> from operator import ne
>> L = filter(partial(ne, 'a'), L)
>>
I learned about functools.partial only recently (on this list). functools is
implemented in C, not Python, so I couldn't answer this question for myself:
Is functools.partial completely
>>
>> > L = filter('a'.__ne__,L)
>>
>> And this is probably the fastest. But not all types define
>> __ne__ so a
>> more generic answer would be:
>>
>> from functools import partial
>> from operator import ne
>> L = filter(partial(ne, 'a'), L)
>>
And don't forget this "traditio
The regular expression syntax is basically exactly the same. The main
difference is that a regex can't just be written into a statement as
part of the syntax; you have to create a regular expression object and
use its methods.
So, instead of:
new_thing =~ s/pattern/replacement/
it's:
myPat
On Feb 26, 7:47 pm, Tim Wintle wrote:
> On Thu, 2009-02-26 at 06:00 -0800, venutaurus...@gmail.com wrote:
> > Thanks for the reply,
> > Being a newbie to python, I am finding it difficult to
> > understand the logic even after thorough reading of comments. Is there
> > any simpler way w
On 2009-02-25 13:25, Helmut Jarausch wrote:
> Helmut Jarausch wrote:
>> Hi,
>>
>> I've just tried to write a simple example using PyCrypto's
>> AES (CBC mode)
>>
>> #!/usr/bin/python
>> from Crypto.Cipher import AES
>>
>> PWD='abcdefghijklmnop'
>> Initial16bytes='0123456789ABCDEF'
>>
>> crypt = AES
En Thu, 26 Feb 2009 11:00:30 -0200, Boris Borcic
escribió:
Chris Rebert wrote:
On Thu, Feb 26, 2009 at 3:05 AM, Clarendon wrote:
...
L=['a', 'b', 'c', 'a']
I want to delete all 'a's from the list.
But if L.remove('a') only deletes the first 'a'.
How do you delete all 'a's?
There are s
Hi,
this is a bit off topic.
In our company we have several SVN repositories.
According to [1] Trac by default only handles one
repository.
Of course Trac links like changeset [1234] would not work anymore.
You would need [repro/1234] or something like this.
I think many (python) programmer ha
You flatter me sir (or madam? can't tell from your name...), but I wouldn't
presume to so lofty a title among this crowd. I'd save that for the likes
of Alan Gauld and Kent Johnson, who are much more prolific and informative
contributors to this list than I.
-- Paul
-Original Message-
Tim Peters showed a way to demonstrate the fix in
http://mail.python.org/pipermail/python-dev/2006-March/061991.html
> For simpler fun, run this silly little program, and look at memory
> consumption at the prompts:
>
> """
> x = []
> for i in xrange(100):
>x.append([])
> raw_input("full
On Thu, 2009-02-26 at 06:00 -0800, venutaurus...@gmail.com wrote:
> Thanks for the reply,
>Being a newbie to python, I am finding it difficult to
> understand the logic even after thorough reading of comments. Is there
> any simpler way where I can just run a python script from the main
1 - 100 of 147 matches
Mail list logo