On Jun 5, 7:58 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote:
> Hi, When I do a small program like
>
> from subprocess import Popen
> popen = Popen(["ping", "google.com"])
> from time import sleep
> sleep(100)
>
> start it and kill it, the ping process lives on.
> Is there a way to ensure that
On Jun 6, 3:38 pm, "Eric Brunel" <[EMAIL PROTECTED]> wrote:
> My only advice would then be to avoid using the standard functions to
> create dialog boxes, and to create them yourself. For example:
> --
> from Tkinter import *
[snip]
> app.roo
On Jun 7, 8:39 am, dmitrey <[EMAIL PROTECTED]> wrote:
> Hi all,
> I guess this question was asked many times before, but I don't know
> keywords for web search.
>
> Thank you in advance, D.
import os
d1 = os.path.dirname(__file__)
d2 = os.path.dirname(os.__file__)
print d1
print d2
--
http://m
We'd like to strengthen and raise the visibility of Python usergroups and
foster the creation of new ones, by sharing the valuable experiences of those
leaders around the community who make it happen.
[1] One step is to make others more aware of what is already happening,
perhaps in their own
On 05/06/2007 21.32, [EMAIL PROTECTED] wrote:
> We encountered a situation today where it appeared that a
> Boost.Python-provided class didn't participate in Python's cyclic garbage
> collection. The wrapped C++ instance held a reference to a method in the
> Python object which referenced the Boo
"Eric S. Johansson" <[EMAIL PROTECTED]> wrote:
> (currently beating my head against flash memory and grub problems). So if you
> come up with a solution, feel free to e-mail me directly or if you have any
> other questions, also, feel free to send me mail. Might not know the answer
but
> at lea
Hi,
Can someone help me leave the murky c++ world and enter shiny pythonland?
I have a problem with importing and global variables, here's my code:
##server.py
#socket connections
from socketManager import*
network = CNetworkManager()
network.Listen()
> Try passing the cursor and not the connection -
Unfortunately this provided the same InterfaceError. It was one of the
first options we had tried in correcting the situation. Is there any way to
check on the status of a database connection (like an isOpen() method)? It
appeared as though the
I needed a thread which will run in background , collect some information
from other hosts and save info in database periodically.
While gtk thread will show the collected information from database.
It works but gtk response is too slow. Can anyone help or give any link of
such a sample applicati
Thanks
--
Marco Aloisio
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I have two integers and I want to divide one by another, and want to
get an integer result which is the higher side whenever the result is
a fraction.
3/2 => 1 # Usual behavior
some_func(3, 2) => 2 # Wanted
Any easier solution other than int(math.ceil(float(3)/2))
-
Suresh
--
http
On Jun 6, 11:21 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
>
> > I'm using ftplib to transfer large files to remote sites. The process
> > seems to work perfectly with small files, but when the file gets to
> > large ~20GB I begin getting errors t
Hi,
I'm fetching some files over HTTPS from Python and I want to verify the
server certificate. (Not just the name etc provided in certificate.)
How can I get access to this information?
urllib2 doesn't seem to provide it. Even a raw SSL socket only appears
to provide access to the CN, OU etc i
[EMAIL PROTECTED] wrote:
> Hello all,
> I have two integers and I want to divide one by another, and want to
> get an integer result which is the higher side whenever the result is
> a fraction.
> 3/2 => 1 # Usual behavior
> some_func(3, 2) => 2 # Wanted
>
> Any easier solution other than int(m
Hi Simon,
> When run, I come unstuck here:
>
> self.clientSocket, self.clientAddress = network.accept()
>
> I get a nameError on 'network', yet it is one in the global namespace,
> defined in server.py before CServerThread.Listen() is called.
You have imported everything from socketMa
Hello,
Simon Pickles wrote:
> Can someone help me leave the murky c++ world and enter shiny pythonland?
Welcome!
> I have a problem with importing and global variables, here's my code:
>
> [...]
>
> When run, I come unstuck here:
>
>self.clientSocket, self.clientAddress = network.
Simon Pickles wrote:
> from socket import *
Bad idea, can make conflicts in namespace.
> import threading
There's absolutely no need to use threads for a server that accepts
multiple connections :)
> class CNetworkManager():
Note that you create an "old style" class. For new style classes,
i
On Jun 7, 2:15 pm, Hamish Moffatt <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hello all,
> > I have two integers and I want to divide one by another, and want to
> > get an integer result which is the higher side whenever the result is
> > a fraction.
> > 3/2 => 1 # Usual behavior
>
On Thu, 07 Jun 2007 09:04:24 +0200, <[EMAIL PROTECTED]> wrote:
[snip]
> I can't believe there isn't an easier way to make a kiosk application
> without titlebar.
That's not the problem: there *is* an easy way, and you found it:
overrideredirect(1). But now you're trying to mix windows ignored by
James Stroud wrote:
> If I run it again on 10 (or 1000) the set is basically homogenous
> but now of different values (terribly confusing):
>
> set([12048175104.1, 12048175104.15, 12048175104.46,
> 12048175103.94, 12048175104.23, 12048175103.81,
> 12048175103.98, 12048
Hi!
Where can I ask it?
I want to ask that developers change the Python's Zip lib in the next
versions.
The Zip lib not have a callback procedure. When I zip something, I don't
know, what is the actual position of the processing, and how many bytes
remaining.
It is simply rewriteable, but when
Steve Holden wrote:
> The first post comes from Ian Bicking:
>
> http://onyourdesktop.blogspot.com/
>
"Linux was a remote possibility: just why is it so bad as a laptop OS?"
I'm a diehard os x man myself, but I spent about 1.5 days setting up
ubuntu feisty on an Acer Travel Mate TM2480-2779 ($4
On Jun 5, 4:29 pm, abhiee <[EMAIL PROTECTED]> wrote:
> Hello , I have just begun learning python...and I'm loving it...Just
> wanted to ask you that how much time would it take me to learn python
> completely and which languages should i learn alongwith python to be a
> good professional programmer
Hi James
Mathematica says that the determinant of the integer version of this
matrix is 2774532096, which is another vote for the answer you have.
Mathematica says that the determinant of the 24-digit real version of
your matrix is 2.774532096*10^9, which looks very similar to me.
I'd go with Nu
Hi,
I have a string "distances = [[1,1,1,1],[2,2,2,2]]". I want to create a
variable called distances whose value is the list [[1,1,1,1],[2,2,2,2]]. How can
I go about that? I know I can use setattr, but how do I create the list from the
string?
Regards,
Simon
--
http://mail.python.org/mailman/
On Jun 7, 3:34 am, simon kagwe <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a string "distances = [[1,1,1,1],[2,2,2,2]]". I want to create a
> variable called distances whose value is the list [[1,1,1,1],[2,2,2,2]]. How
> can
> I go about that? I know I can use setattr, but how do I create the list
> exec("distances = [[1,1,1,1],[2,2,2,2]]")
Wow! So simple!
Thanks a lot. :-)
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 7, 12:01 pm, "Eric Brunel" <[EMAIL PROTECTED]> wrote:
> BTW, what are you trying to do here? Will your application run on a
> "normal" desktop computer? Or will it run on special devices such as
> vending machines or similar?
You got it: it's a special device.
> in the second case, you sho
Please see the follow code, I can not catch the exception " IOError"
raised from shutil.copyfile() , why?
try:
if (DEST_TYPE & TYPE_FTP):
fn = oname
ftpc.UploadFile(f, fn)
else:
On Jun 7, 10:18 am, Gerard Flanagan <[EMAIL PROTECTED]> wrote:
> On Jun 7, 8:39 am, dmitrey <[EMAIL PROTECTED]> wrote:
Thank you.
And what is the simplest way (without split/join, if exist) to obtain
name of directory parent to directory my_directory_name?
Thx, D.
>
> > Hi all,
> > I guess this q
Hi,
I m trying to implement an object which contains lazy" variables. My
idea is to alter the getattr and the setattr methods. However I keep
on getting a recursion error.
My idea is that the lazy variable can be stored in a variety of
places, Database, PyTables etc. The lazy variable is a large
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 3/2 => 1 # Usual behavior
> some_func(3, 2) => 2 # Wanted
def some_func(a, b):
return -(-a/b)
And people complain about Python's behaviour regarding division of
negative integers.
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
On 6/7/07, Nathan Harmston <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I m trying to implement an object which contains lazy" variables. My
> idea is to alter the getattr and the setattr methods. However I keep
> on getting a recursion error.
Simplifying radically, you are doing:
def __setattr__(sel
On Jun 7, 6:06 am, simon kagwe <[EMAIL PROTECTED]> wrote:
> > exec("distances = [[1,1,1,1],[2,2,2,2]]")
To be clear, exec is *not* a function; it's a statement. That means it
can't be used in lambda functions, for example.
> Wow! So simple!
but dodgy, as it'll execute any python code.
> Thanks
simon kagwe wrote:
> Hi,
>
> I have a string "distances = [[1,1,1,1],[2,2,2,2]]". I want to create a
> variable called distances whose value is the list [[1,1,1,1],[2,2,2,2]]. How
> can
> I go about that?
s = "distances = [[1,1,1,1],[2,2,2,2]]"
exec(s)
- Josef
--
http://mail.python.org/mailm
Hi All,
I am trying to wrap a japanese text in Python, by the following code.
if len(message) > 54:
message = message.decode("UTF8")
strlist = textwrap.wrap(message,54)
After this I am wirting it to you a CAD Software window. While
displaying in this window some Japanese characters at the
Sorry ... one minor detail lacking. I'm saddled with Python 2.3.4
Jason
-Original Message-
From: [EMAIL PROTECTED] on behalf of Basilisk96
Sent: Wed 6/6/2007 6:49 PM
To: python-list@python.org
Subject: Re: creating lists based on parsed items
> If you are using Python 2.5, use a defaul
On Jun 7, 1:19 pm, dmitrey <[EMAIL PROTECTED]> wrote:
> On Jun 7, 10:18 am, Gerard Flanagan <[EMAIL PROTECTED]> wrote:> On Jun 7,
> 8:39 am, dmitrey <[EMAIL PROTECTED]> wrote:
>
> Thank you.
> And what is the simplest way (without split/join, if exist) to obtain
> name of directory parent to direc
On 7 Jun, 12:09, James Stroud <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
> > The first post comes from Ian Bicking:
>
> >http://onyourdesktop.blogspot.com/
>
> "Linux was a remote possibility: just why is it so bad as a laptop OS?"
There are no mysteries about Linux vs. laptop hardware, alth
On Thu, 07 Jun 2007 11:06:54 +, simon kagwe wrote:
>> exec("distances = [[1,1,1,1],[2,2,2,2]]")
> Wow! So simple!
>
> Thanks a lot. :-)
Yes, and when you embed this in your web-application, using data gathered
from a web-form, the black-hat hackers will thank you for the security
hole too.
Sorry for the repeat post...I'm not sure if my first post (on May
30th) went through or
not.
I've been trying to write a PAM module using ctypes. In the
conversation
function (my_conv in the script below), you're passed in a
pam_response**
pointer. You're supposed to allocate an array of pam_res
Ah, sorry, pre-mature sending. Stupid keyboard accelerators :(
To finish the sentence I was trying to write:
On Thu, 07 Jun 2007 22:39:41 +1000, Steven D'Aprano wrote:
> I wish even more that Python would come with a built-in "make a list from a
> list representation" function, but that at least
Is there a resource somewhere on the net that can be used to quickly
and effectively show Python's strengths to non-Python programmers?
Small examples that will make them go "Wow, that _is_ neat"?
--
http://mail.python.org/mailman/listinfo/python-list
--- "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Is there a resource somewhere on the net that can be
> used to quickly
> and effectively show Python's strengths to
> non-Python programmers?
> Small examples that will make them go "Wow, that
> _is_ neat"?
>
15 small programs here:
http://w
Hi,
I am facing a problem in starting IDLE. The hourglass appears for a
while and then goes off. When i tried opening it after switching of the
firewall, it still din help. If some other program is accessing the port can
anyone tell me how to assign the port to python. Thanks .
--
http://mail
Thanks ... Seems just like perl's list-in-a-hash (I've read some of the
archives and no, I'm not seeking to incite a perl-vs-python flame war). I
thought of doing this initially (and would have done via Perl), but didn't
quite have a grip on associative arrays in python yet. Thanks for the input
Hello,
I need a program that will traverse a directory tree to ensure that
there
are unix-style line endings on every file in that tree that is a text
file.
To tell text files from others I want to use the unix "file" command
(Python's "mimetypes" is not so good for me). But I am stuck on
somethi
I have the following Python program:
import win32com.client
print 'Huh?' # Actually, it says something profain.
Running this program with 2.5.1 causes another Python script in
the same directory to be loaded and run (specifically the import
causes it), and a .pyc file is created from that list.
[EMAIL PROTECTED] wrote:
> On Jun 7, 2:15 pm, Hamish Moffatt <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> Hello all,
>>> I have two integers and I want to divide one by another, and want to
>>> get an integer result which is the higher side whenever the result is
>>> a fraction.
>>>
Neil Cerutti wrote:
> I have the following Python program:
>
> import win32com.client
> print 'Huh?' # Actually, it says something profain.
>
>
> Running this program with 2.5.1 causes another Python script in
> the same directory to be loaded and run (specifically the import
> causes it), and a
Hi All,
I'm trying to download a remote file through FTP. Here's the script:
###
#!/usr/bin/env python
import ftplib
import os
import time
ddir="C:\\ftp"
os.chdir(ddir)
f=ftplib.FTP("10.2.2.1", "user", "user123")
f.cwd("/home/protocol/c
Den Thu, 07 Jun 2007 07:00:53 + skrev reed:
> On Jun 5, 7:58 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote:
>> Hi, When I do a small program like
>>
>> from subprocess import Popen
>> popen = Popen(["ping", "google.com"]) from time import sleep
>> sleep(100)
>>
>> start it and kill it, the
I'm experimenting a bit with Pyrex and like it pretty well so far.
While converting a module from Python to Pyrex I noticed it complains
about the use of the += and -= assignment operators. The fix is
obviously pretty trivial. I didn't notice any mention in the Pyrex
docs as a difference between
Hello everyone,
I am wondering if there is a way to use custom drawing in Tkinter.
I've been using it for few months, and all I know about custom drawing
is to draw directly on a Canvas with such methods as "create_line",
"create_rectangle", etc.
Now, the problem, is that I have already plenty of
Hello,
I have a somewhat nested dict that I want to pickle, but it (sometimes)
contains some
no-no's (specifically, in this case, functions). I know I can't pickle them,
but I
would like to be able to pickle the rest of the dict. Is there a good way to
be able
to walk through a dict, and tak
Steve Howell schrieb:
> --- "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>
>> Is there a resource somewhere on the net that can be
>> used to quickly
>> and effectively show Python's strengths to
>> non-Python programmers?
>> Small examples that will make them go "Wow, that
>> _is_ neat"?
>>
>
just wondering are there any snippets out there where you can convert
a url to an image using python
I have be trying to use
webbrowser.open("www.mypage.com")
with printscreen but I have no means of finding out when the page url
is fully loaded
any tips
tks
M
--
http://mail.python.org/mailma
I have created a script using python that will batch process data
files every hour
The script is running on Solaris. Python version 2.3.3
t=open(filename,'rb')
data=t.read()
#processing data...
t.close()
The script is working fine on the day of execution.
It is able to process the data files ver
"人言落日是天涯,望极天涯不见家" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Please see the follow code, I can not catch the exception " IOError"
raised from shutil.copyfile() , why?
try:
if (DEST_TYPE & TYPE_FTP):
fn = oname
In article <[EMAIL PROTECTED]>,
alexteo21 <[EMAIL PROTECTED]> wrote:
> The script is working fine on the day of execution.
> It is able to process the data files very hour. However, the
> processing fail one day later i.e. the date increment by 1.
>
> Traceback (most recent call last):
> File
> Huh the only thing I can find on InterfaceError is "Errors related to
> the database interface and not the database itself." You might be able
> to get some info from connection.info() . . .
Yeah, I wish there was more documentation about this type of error. The
only thing info() tells me is th
> ... I noticed it complains
> about the use of the += and -= assignment operators. The fix is
> obviously pretty trivial. I didn't notice any mention in the Pyrex
> docs as a difference between Python and Pyrex though. Was I mistaken?
Never mind. I missed the bit where it said they haven't ye
On Jun 7, 8:17 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> I have the following Python program:
>
> Running this program with 2.5.1 causes another Python script in
> the same directory to be loaded . . . 'new.py'
A good habit for naming your scripts: If you have a script and you
want to name it
Hamish Moffatt <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote:
> def div_ceil(a, b):
>> ... if a%b:
>> ... return ((a/b)+1)
>> ... else:
>> ... return (a/b)
>
>Yes, although it's not as short or as fast (probably as my version):
>
>def div_ceil(a, b):
> return
On 5 jun, 06:15, Charles Sanders <[EMAIL PROTECTED]>
wrote:
> luis wrote:
> > I'm using ctypes to call afortrandllfrom python. I have no problems
> > passing integer and double arryas, but I have an error with str arrys.
> > For example:
>
> [snip]
>
> I do not know about MicrosoftFortrancompilers
BartlebyScrivener wrote:
> On Jun 7, 8:17 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> A good habit for naming your scripts: If you have a script and you
> want to name it text.py, or list.py or new.py or old.py or some common
> name that might be found in the thousand and one other modul
On 10 Mag, 16:52, Alexander Schliep <[EMAIL PROTECTED]> wrote:
> andrea <[EMAIL PROTECTED]> writes:
> > On 9 Mag, 09:10, Alexander Schliep <[EMAIL PROTECTED]> wrote:
> >> Check outhttp://gato.sf.net(LGPLlicense). It does exactly what you
> >> want to do and there is a binary for MacOS X. Algorithms
Xavier Bérard wrote:
>
> Now, the problem, is that I have already plenty of widgets on my
> screen. I just want to draw over them, which is a bit difficult in my
> comprehension of things.
>
What are you trying to achieve by "drawing over" widgets?
--
Kevin Walzer
Code by Kevin
http://www.code
[EMAIL PROTECTED] wrote:
> Why would storbinary throw an exception even when the file transfer
> was successful? Why would the exception not be thrown until after the
> file was sent? Shouldn't ftplib return something like (104,
> "Connection reset by peer") instead of throwing an error? Is my
On Jun 7, 1:59 am, "Simon Pickles" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can someone help me leave the murky c++ world and enter shiny pythonland?
>
> I have a problem with importing and global variables, here's my code:
[snip!]
> When run, I come unstuck here:
>
> self.clientSocket, sel
On 6 7 , 10 53 , "Mark T" <[EMAIL PROTECTED]> wrote:
> " " <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
>
>
>
>
> > Please see the follow code, I can not catch the exception " IOError"
> > raised from shutil.copyfile() , why?
> >try:
> >
Hi folks,
I've seen the following issue come up in multiple posts to this
mailing list:
I have a python program that spawns a child process with popen or
popen2 or popen3 or popen2.popen2 etc.
the child process is interactive: it asks for input then spits out
some output, asks for more input then
I would like to write some code that would randomly select a function from a
list of functions and call it. I was looking in the globals names space and
randomly selecting items that were of type function.. but I didn't see a
way of actually running the function.
Any pointers?
--
David Bear
-- l
On 6/7/07, Joe <[EMAIL PROTECTED]> wrote:
> > Huh the only thing I can find on InterfaceError is "Errors related to
> > the database interface and not the database itself." You might be able
> > to get some info from connection.info() . . .
>
> Yeah, I wish there was more documentation about this t
#1 If any one familiar with godaddy hosting. They have apparently have
a hosing server i.e.(scripts, html files etc.), and a server for
databases. How can I import from my script, with a csv. if the db is
on a different server than the script server.
#2 I would like to update and insert with the
In <[EMAIL PROTECTED]>, David Bear wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of actually runnin
How are you making the list of functions? Something like this:
[code]
fs = []
for k,f in globals():
if callable(f):
fs.append(f)
[/code]
Then to call a random one (assuming they all take no parameters):
[code]
import random
random.choice(fs)()
[/code]
Or maybe you only have the name
David Bear said unto the world upon 06/07/2007 11:56 AM:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of a
On 2007-06-07, Robin Becker <[EMAIL PROTECTED]> wrote:
> BartlebyScrivener wrote:
>> On Jun 7, 8:17 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
>> A good habit for naming your scripts: If you have a script and you
>> want to name it text.py, or list.py or new.py or old.py or some common
On Jun 7, 10:56 am, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function..
Careful!!! You don't want t
hi all,
which way is the simplest for now to obtain the memory amount eaten by
call to Python 'myfunc' function?
Thx, D
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 7, 3:33 pm, alexteo21 <[EMAIL PROTECTED]> wrote:
> I have created a script using python that will batch process data
> files every hour
> The script is running on Solaris. Python version 2.3.3
>
> t=open(filename,'rb')
> data=t.read()
> #processing data...
> t.close()
Try the following app
On 7 jun, 11:56, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of act
dmoore <[EMAIL PROTECTED]> wrote:
> I've seen the following issue come up in multiple posts to this
> mailing list:
>
> I have a python program that spawns a child process with popen or
> popen2 or popen3 or popen2.popen2 etc.
> the child process is interactive: it asks for input then spits o
On 7, 19:56, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of act
Good evening!
say, please, as in *.xls to insert an unscreened picture?
example: image.py
but a picture in OpenOficce is not represented :(
OS - windows XP, debian etch
pyExcelerator 0.6.3a-1
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
__rev_id__ =
On Jun 7, 10:09 am, "Joe" <[EMAIL PROTECTED]> wrote:
>
> And, yes, printing the error message returns absolutely nothing. The tuple
> following InterfaceError is both the error code and message. Unfortunately,
> it will only give me (0, '') which isn't much help.
>
I'm on Google groups and can't
On 7, 19:56, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of act
In article <[EMAIL PROTECTED]>,
vishnu <[EMAIL PROTECTED]> wrote:
>Hi there,
>
>I am embedding python 2.5 on embedded system running on RTOS where I
>had strict memory constraints.
>As python is a huge malloc intensive application, I observed huge
>memory fragmentation in my system which is leadin
In article <[EMAIL PROTECTED]>,
Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
>
>"Stef Mientki" <[EMAIL PROTECTED]> wrote:
>
>> I use Python as a replacement for MatLab,
>> and intend to use it as replacement for Delphi, AutoIt, PHP, VB.
>> And I'ld love to use it as a replacement for micro contro
"Dan Bishop" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| If you don't need the list to be sorted until you're done building it,
| you can just use:
|
| lst = sorted(set(lst))
?? looks same as
lst.sort()
--
http://mail.python.org/mailman/listinfo/python-list
"Sion Arrowsmith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
| > 3/2 => 1 # Usual behavior
| > some_func(3, 2) => 2 # Wanted
|
| def some_func(a, b):
|return -(-a/b)
|
| And people complain about Python's behaviour regarding divi
En Tue, 05 Jun 2007 14:22:48 -0300, Todd Hopfinger <[EMAIL PROTECTED]>
escribió:
> I am using TLS Lite and J2ME SecureConnection for the purposes of
> encrypting
> traffic to/from a Java Midlet client and a multithreaded Python server.
> However, I encounter a TLSAbruptCloseError. I have tried
Try the following:
import logging
t=open(filename,'rb')
try:
data=t.read()
#processing data...
except:
logging.exception("Failed to process %r", filename)
finally:
t.close()
--
http://mail.python.org/mailman/listinfo/python-list
"durumdara" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi!
|
| Where can I ask it?
|
| I want to ask that developers change the Python's Zip lib in the next
| versions.
On the sourceforge tracker,
http://sourceforge.net/tracker/?group_id=5470
there is a Feature Request cate
durumdara wrote:
> Hi!
>
> Where can I ask it?
>
> I want to ask that developers change the Python's Zip lib in the next
> versions.
> The Zip lib not have a callback procedure. When I zip something, I don't
> know, what is the actual position of the processing, and how many bytes
> remaining.
>
Try the following (Python 2.5.x):
import logging
t=open(filename,'rb')
try:
data=t.read()
#processing data...
except:
logging.exception("Failed to process %r", filename)
finally:
t.close()
For earlier versions of Python, you will need to nest the try blocks:
import logging
t=op
Jim <[EMAIL PROTECTED]> writes:
> Hello,
>
> I need a program that will traverse a directory tree to ensure that
> there
> are unix-style line endings on every file in that tree that is a text
> file.
> To tell text files from others I want to use the unix "file" command
> (Python's "mimetypes" is
"dmoore" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| alternatives in the standard python distro) Is there some place I can
| submit this as a feature request? (Python dev?)
http://sourceforge.net/tracker/?group_id=5470
But don't hold your breath for a volunteer to respond. Di
On 2007-06-07, Stebanoid <[EMAIL PROTECTED]> wrote:
> if you have a list of functions you can try this:
>
> import random
> import math
> m[int(math.floor(len(m)*random.random()))]() # seems like Lisp
Or rather m[random.randint(0, len(m))]()
--
Neil Cerutti
Caution: Cape does not enable user to
1 - 100 of 147 matches
Mail list logo