Hi everyone. I'm new to SWIG, and I'm trying to wrap a C library for
Python.
I have a function that is declared similarly to this:
double *foo(int x);
The function returns a pointer to an array of 7 double values. I want
to return a 7-tuple to Python. I've been trying variations of the
follow
Hi, I am posting a couple of requirements in my organization. Any one
interested can reply me directly.
Maestro Software Developer
We are seeking experienced software professionals to design and develop new
components as well as to enhance and maintain Maestro, a best-of-breed
computational chem
Grant Edwards wrote:
> On 2006-02-13, John Salerno <[EMAIL PROTECTED]> wrote:
>
> > I know it comes from the suffix -tuple, which makes me think
> > it's pronounced as 'toople', but I've seen (at m-w.com) that
> > the first pronunciation option is 'tuhple', so I wasn't sure.
> > Maybe it's both, bu
Bengt Richter wrote:
> Perhaps newbies should be advised that
>
> [x for x in l1 if x in set(l2)]
But the resulting list is a representative of bag not a set ( contains
multiple occurrences of elements ):
>>> [x for x in [3, 3] if s in Set([3])]
[3,3]
Same with Raymonds solution:
>>> filt
Kay Schluehr wrote:
> For those people who use google groups to access comp.lang.python may
> enjoy now looking at contentess shiny yellow stars - shining brighter
> than anything else on the site. The only pattern I've found are one or
> two shiny yellow stars for many newbie postings. According
On 2/12/06, Felipe Almeida Lessa <[EMAIL PROTECTED]> wrote:
> Em Dom, 2006-02-12 às 23:15 -0500, Steve Holden escreveu:
> > Given that Python 2.4 doesn't even perform simple constant folding for
> > arithmetic expressions
> > [snip]
>
> May I ask why doesn't it perform such optimization? Is there a
John Salerno wrote:
> Yes, silly question, but it keeps me up at night. :)
>
> I know it comes from the suffix -tuple, which makes me think it's
> pronounced as 'toople', but I've seen (at m-w.com) that the first
> pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both, but
> whi
PA wrote:
> On Feb 13, 2006, at 06:44, [EMAIL PROTECTED] wrote:
>
> > And if we use market penetration as measure, Perl seems to be easier
> > for people ?
>
> Perl: Shell scripts/awk/sed are not enough like programming languages.
>
> Python: Perl is a kludge.
>
> "What Languages Fix"
> http://www
On Feb 13, 2006, at 06:44, [EMAIL PROTECTED] wrote:
> And if we use market penetration as measure, Perl seems to be easier
> for people ?
Perl: Shell scripts/awk/sed are not enough like programming languages.
Python: Perl is a kludge.
"What Languages Fix"
http://www.paulgraham.com/fix.html
Ch
For those people who use google groups to access comp.lang.python may
enjoy now looking at contentess shiny yellow stars - shining brighter
than anything else on the site. The only pattern I've found are one or
two shiny yellow stars for many newbie postings. According to the
staring semantics the
For me (I am newbie as well) was following link very useful:
http://benyoonline.com/pqr/PQR2.4.html
Good luck with Python
Petr Jakes
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Is it true that that "Python 3000" is dead ?
Honestly I think that e.g. changing 5/2 to be 2.5 (instead of 2) would
just break to much code :-(
On the otherhand I'm using Python as "Matlab replacement" and would
generally like 5/2 ==2.5
So, I was contemplating to default all my modules/script
Hi,
I have a series of images (either from numarray or from PIL)
After googling if read something about pyMedia...
Can I create an AVI movie from my images with that ? How about
quicktime ?
Thanks,
Sebastian Haase
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> [EMAIL PROTECTED] wrote:
>
> > I can speak the same about Python if I view it from a prototype based
> > perspective, where one get them for free in Lua but need to implement
> > them in Python.
>
> Sure. And if you need prototypes, then all else being
> equal that would b
Steven D'Aprano wrote:
> [EMAIL PROTECTED] wrote:
>
>
>>I can speak the same about Python if I view it from a prototype based
>>perspective, where one get them for free in Lua but need to implement
>>them in Python.
>
>
> Sure. And if you need prototypes, then all else being
> equal that would
[EMAIL PROTECTED] wrote:
> I can speak the same about Python if I view it from a prototype based
> perspective, where one get them for free in Lua but need to implement
> them in Python.
Sure. And if you need prototypes, then all else being
equal that would be a disadvantage of Python compared
Felipe Almeida Lessa wrote:
> Em Dom, 2006-02-12 às 23:51 -0500, Steve Holden escreveu:
>
>>The basic answer is that so far no developer has felt it worthwhile to
>>expend time on adding these optimizations.
>
>
> I always thought these small optimizations could lead Python to be
> faster overa
Delaney, Timothy (Tim) wrote:
> Adding such optimisations to Python may improve it's benchmark scores,
Blegh! Time to give myself a good kicking!
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Em Dom, 2006-02-12 às 23:51 -0500, Steve Holden escreveu:
> The basic answer is that so far no developer has felt it worthwhile to
> expend time on adding these optimizations.
I always thought these small optimizations could lead Python to be
faster overall. I remember about this every time I see
Steve Holden wrote:
> The basic answer is that so far no developer has felt it worthwhile to
> expend time on adding these optimizations.
Mainly because it's rare to find such constructs in anything except
contrived examples ... Nearly every time you use a literal, it's being
added to (subtracted
LittlePython wrote:
> I am very new to python. I have been studying it for only a month or so. I
> have been using vbscript for about 2-3 yrs and only recently been using it
> rather heavily the past 9 months or so. I am new very new to oop. My main
> use will be administrative scripting into the
John Salerno wrote:
> Yes, silly question, but it keeps me up at night. :)
>
> I know it comes from the suffix -tuple, which makes me think it's
> pronounced as 'toople', but I've seen (at m-w.com) that the first
> pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both, but
> whic
Felipe Almeida Lessa wrote:
> Em Dom, 2006-02-12 às 23:15 -0500, Steve Holden escreveu:
>
>>Given that Python 2.4 doesn't even perform simple constant folding for
>>arithmetic expressions
>>[snip]
>
>
> May I ask why doesn't it perform such optimization? Is there any special
> difficulties in d
Em Dom, 2006-02-12 às 23:15 -0500, Steve Holden escreveu:
> Given that Python 2.4 doesn't even perform simple constant folding for
> arithmetic expressions
> [snip]
May I ask why doesn't it perform such optimization? Is there any special
difficulties in doing so with the Python compiler?
Also, I
On 2006-02-13, John Salerno <[EMAIL PROTECTED]> wrote:
> I know it comes from the suffix -tuple, which makes me think
> it's pronounced as 'toople', but I've seen (at m-w.com) that
> the first pronunciation option is 'tuhple', so I wasn't sure.
> Maybe it's both, but which is most prevalent?
In m
John Salerno wrote:
> Yes, silly question, but it keeps me up at night. :)
>
Silly you!
> I know it comes from the suffix -tuple, which makes me think it's
> pronounced as 'toople', but I've seen (at m-w.com) that the first
> pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both,
Alex Martelli wrote:
> Bengt Richter <[EMAIL PROTECTED]> wrote:
>...
>
>>>Personally, I'd always use (depending on guesses regarding lengths of
>>>lists) [x for x in l1 if x in l2] or the setified equivalent, of course.
>>>
>>
>>Perhaps newbies should be advised that
>>
>>[x for x in l1 if
LittlePython wrote:
> I am very new to python. I have been studying it for only a month or so. I
> have been using vbscript for about 2-3 yrs and only recently been using it
> rather heavily the past 9 months or so. I am new very new to oop. My main
> use will be administrative scripting into the w
Diez B. Roggisch wrote:
>>This is the code section of my server class (I cut this from a Python
>>example):
>>def establishConnection(self):
>>self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>self.socket.connect((self.host, self.port))
>>Do I have to use explici
Yes, silly question, but it keeps me up at night. :)
I know it comes from the suffix -tuple, which makes me think it's
pronounced as 'toople', but I've seen (at m-w.com) that the first
pronunciation option is 'tuhple', so I wasn't sure. Maybe it's both, but
which is most prevalent?
Thanks! No
mwt <[EMAIL PROTECTED]> wrote:
...
> import urllib
>
> def download_file(filename, URL):
> f = urllib.urlretrieve(URL, filename, reporthook=my_report_hook)
If you wanted to DO anything with the results, you'd probably want to
assign to
f, m = ...
not just f. This way, f is the filenam
So, I just put this little chunk to the test, which does give you
feedback about what's going on with a file download. Interesting that
with urlretrieve, you don't do all the file opening and closing stuff.
Works fine:
--
import urllib
def download_file(filename, URL):
f = ur
mwt <[EMAIL PROTECTED]> wrote:
> Thanks for the explanation. That is exactly what I'm looking for. In a
> way, it's kind of neat that urlopen just *does* it, no questions asked,
> but I'd like to just know the basics, which is what it sounds like
> urlretrieve covers. Excellent. Now, let's see wha
Steve Holden <[EMAIL PROTECTED]> wrote:
> Bram Cohen will be a keynoter at this year's PyCon, and has asked that
> the presentation be in the form of an interview.
>
> I'd like the questions to be representative of as broad a cross-section
> of the Python community as possible. If you have a ques
"Cameron Laird" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>,
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> .
> .
> .
>>on the web for each language. By comparison, even Forth gives 13 million
>>plus hits, and who uses Forth?
> .
> .
> .
> The prog
>It isn't written in C, but get your hands on wget. It
>is probably already on your Linux distro, but if not,
>check it out here:
>http://www.gnu.org/software/wget/wget.html
Thanks. I'm checking it out.
--
http://mail.python.org/mailman/listinfo/python-list
Em Dom, 2006-02-12 às 20:10 -0500, Steve Holden escreveu:
> I'd like the questions to be representative of as broad a cross-section
> of the Python community as possible. If you have a question you'd like
> to hear Bram answer please let me know and I'll try to include them.
Something I think lo
Kent Johnson wrote:
> LittlePython wrote:
> > Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
> > would like to call this instead of print (to the screen) . I would like
> > to write a simple script that is not an event drive gui but calls input
> > boxes, message boxes, or m
Steven D'Aprano wrote:
> > Programming in Lua
> > Object-Oriented Programming
> > http://www.lua.org/pil/16.html
>
> Did you actually bother to read the page you linked to? It describes how
> you can emulate object-like behaviour for Lua tables. The following page
> is even more explicit: "Lua doe
Thanks for the explanation. That is exactly what I'm looking for. In a
way, it's kind of neat that urlopen just *does* it, no questions asked,
but I'd like to just know the basics, which is what it sounds like
urlretrieve covers. Excellent. Now, let's see what I can whip up with
that.
-- just bou
mwt wrote:
> Pardon my ignorance here, but could you give me an example of what
> would constitute file that is unreasonably or dangerously large? I'm
> running python on a ubuntu box with about a gig of ram.
1GB of RAM plus (say) 2GB of virtual memory = 3GB in total.
Your OS and other running p
Hi:
Bram Cohen will be a keynoter at this year's PyCon, and has asked that
the presentation be in the form of an interview.
I'd like the questions to be representative of as broad a cross-section
of the Python community as possible. If you have a question you'd like
to hear Bram answer please
That is exactly what I was look for .. thx
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> LittlePython wrote:
> > Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
> > would like to call this instead of print (to the screen) . I would like
> > to
Hi,
If you target Windows, you may try ctypes http://starship.python.net/crew/theller/ctypes/:
>>> from ctypes import *>>> windll.user32.MessageBoxA(None, "MessageBox Text", "MessageBox Caption", 0)1>>>
or win32api http://starship.python.net/crew/mhammond/win32/:
>>> import win32api>>> win3
LittlePython wrote:
> Is there an equivalent to a msgbox() or wscript.echo (via wcsript) . I
> would like to call this instead of print (to the screen) . I would like
> to write a simple script that is not an event drive gui but calls input
> boxes, message boxes, or maybe even a file open brows
Is there an equivalent to a msgbox() or
wscript.echo (via wcsript) . I would like to call this instead of print (to the
screen) . I would like to write a simple script that is not an event drive gui
but calls input boxes, message boxes, or maybe even a file open browser box as
well?
--
htt
Kevin Walzer <[EMAIL PROTECTED]> writes:
[...]
> Commercial Qt is a little out of my price range.
Commercial *PyQt* (including a license for Qt for use only with PyQt)
is $400 (USD) per developer (plus an extra $300/year if you want
upgrades). That's compared to Qt license for use *with C++* vary
Yes I did
I was trying to do something like (pseudo code)
write:
get files in path
for each filename get size, type
create dic called filename assign size:xx,type:y
pickle to file
read:
open pickled file
read dict name and contents (hoping unpickling file gives me the dict
name as it was saved,
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Sun, 12 Feb 2006 05:11:02 -0800, MKoool wrote:
[...]
> I may be mistaken, and if so I will welcome the correction, but Python
> does not return memory to the operating system until it terminates.
>
> Objects return memory to Python when they are gar
> How big is the file you are reading in? If it is (say) 400 MB, then it is
> hardly surprising that you will be using 500MB of RAM. If the file is 25K,
> that's another story.
Actually, I am downloading the matrix data from a file on a server on
the net using urllib2, and then I am running severa
rh0dium <[EMAIL PROTECTED]> wrote:
...
> Why doesn't this work as expected.. I expect that the the lines within
> the sections will get modified - permanently. It is modifying them
> during the first section but they never get saved to the new values..
> Can anyone help me and even better expl
Hi all,
Why doesn't this work as expected.. I expect that the the lines within
the sections will get modified - permanently. It is modifying them
during the first section but they never get saved to the new values..
Can anyone help me and even better explain why it's not working..
for
"mwt" wrote:
> Arrgghh... Is there any way to edit posts on this thing?
are you aware that you're posting to a usenet newsgroup?
> The os.system("clear") doesn't work at all in a module.
works for me (as long as I'm running the code on a platform that
has a clear command). in what way does it
Edward K. Ream wrote:
> Hi,
>
>
>
> I've spent a pleasant hour or so trying to bring up a top-level Tk menu at
> the same spot as it would appear if I had actually clicked the menu. That
> is, I want to bring up a menu from the keyboard.
>
>
>
> The problem is computing the x and y args to
Em Dom, 2006-02-12 às 22:11 +, HappyHippy escreveu:
> More of a minor niggle than anything but how would I remove the
> aforementioned space?
>
> eg.
> strName = 'World'
> print 'Hello', strName, ', how are you today?'
>
> comes out as "Hello World , how are you today?"
strname = 'World'
pr
HappyHippy <[EMAIL PROTECTED]> wrote:
> More of a minor niggle than anything but how would I remove the
> aforementioned space?
>
> eg.
> strName = 'World'
> print 'Hello', strName, ', how are you today?'
>
> comes out as "Hello World , how are you today?"
>
> Have googled, and worked my way t
"HappyHippy" wrote:
> More of a minor niggle than anything but how would I remove the
> aforementioned space?
>
> eg.
> strName = 'World'
> print 'Hello', strName, ', how are you today?'
>
> comes out as "Hello World , how are you today?"
>
> Have googled, and worked my way through the first 7 cha
Jorgen Grahn wrote:
> On 11 Feb 2006 11:44:29 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote:
> >
> > Indeed. Thanks for reminding me about mailcap/metamail - I used them in
>
> And thanks for mentioning the real name of that mechanism!
Happy memories! ;-)
[...]
> > import mailcap
>
> I guess I sh
More of a minor niggle than anything but how would I remove the
aforementioned space?
eg.
strName = 'World'
print 'Hello', strName, ', how are you today?'
comes out as "Hello World , how are you today?"
Have googled, and worked my way through the first 7 chapters of Byte of
Python, but to no a
Tony Nelson wrote:
> Minor typo: "too"
Thanks, fixed.
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Jorgen Grahn wrote:
> I was thinking mostly about /proc, /sys and related file systems. I have a
> feeling parts of them they change quite frequently under Linux, and of
> course under other Unices they may look completely different, or be absent.
>
> Like Mr Laird said elsewhere, the best thing m
Thomas Heller wrote:
> I wonder if anyone is actually using freeze on Windows, with scripts
> that use, say, pywin32 and wxPython.
Interesting question. I've never done so myself (only on Linux and
Solaris), and given the relatively small interest in having a static
Python library on Windows, I g
mwt <[EMAIL PROTECTED]> wrote:
...
> The process is pretty opaque, however. This downloads and writes the
> file with no feedback whatsoever. You don't see how many bytes you've
> downloaded already, etc. Especially the "g = f.read()" step just sits
> there while downloading a large file, presen
Hi again,
I've tried a the Sane interface from PIL and I get the following
error, when I run the demo_pil.py from the Sane directory.
SANE version: (16777231, 1, 0, 15)
Available devices= [('v4l:/dev/video0', 'Noname', 'Logitech QuickCam
Pardon my ignorance here, but could you give me an example of what
would constitute file that is unreasonably or dangerously large? I'm
running python on a ubuntu box with about a gig of ram.
Also, do you know of any online examples of the kind of robust,
real-world code you're describing?
Thank
Steven D'Aprano schrieb:
> On Sun, 12 Feb 2006 17:08:02 +, Cameron Laird wrote:
>
>
>>In article <[EMAIL PROTECTED]>,
>>Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>>
>>>on the web for each language. By comparison, even Forth gives 13 million
>>>plus hits, and who uses Forth?
13m hits for fo
On 11 Feb 2006 11:44:29 -0800, Paul Boddie <[EMAIL PROTECTED]> wrote:
> Jorgen Grahn wrote:
...
>> On my machines, there is One Correct Way of doing these things, and that's
>> to look in the MIME support/configuration files (~/.mailcap, and so on),
>> first for the user, then system-wide. Somethin
"dfaber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I have Logitech webcam and I need to grab images on Fedora Core 4 (not
> my favorite distro). Are there any python modules available for doing
> this? Any hints or suggestions would be welcome.
If is one of their ball c
Martin v. Löwis wrote:
> Kevin Walzer wrote:
>> The apps I've seen created by py2exe aren't single-file at all, the
>> install folder is full of files besides the main program. I'm
>> looking for a solution that stuffs all libraries, scripts, and the
>> Python runtime into one file.
Usually the
Byte wrote:
>How would I do this: Write a program that simply outputs a ramdom (in
>this case) name of (for this example) a Linux distibution. Heres the
>code ive tryed:
>
>from random import uniform
>from time import sleep
>
>x = 2
>while x < 5:
>x = uniform(1, 5)
>if x >= 1 <= 1.999: p
MKoool wrote:
> I have an application with one function called "compute", which given a
> filename, goes through that file and performs various statistical
> analyses. It uses arrays extensively and loops alot. it prints the
> results of it's statistical significance tests to standard out. Sinc
Thank you for your help. I will look around for v4l modules too.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 12 Feb 2006 01:04:14 +0100, Martin v. Löwis <[EMAIL PROTECTED]> wrote:
> Jorgen Grahn wrote:
>> There might still be a problem for people doing things like this: netstat
>> might use unstable or non-public APIs to find the things it lists. This is
>> fine because it's typically your OS vend
Steven Bethard <[EMAIL PROTECTED]> wrote:
> Jan Niklas Fingerle wrote:
> > Steven Bethard <[EMAIL PROTECTED]> wrote:
> >> Personally, I'd call the lack of the super calls in threading.Thread and
> >> Base bugs.
> >
> > It can't be a bug since it wasn't a bug before super was introduced and
> >
"dfaber" <[EMAIL PROTECTED]> wrote:
> It is a Win32 Python Extension. I am looking for something that work
> on Linux.
here's one:
http://antonym.org/libfg
(for more alternatives, google for "python webcam linux" or some
variation thereof)
--
http://mail.python.org/mailman/listinfo/p
It is a Win32 Python Extension. I am looking for something that work
on Linux.
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
Version 0.3 of `svnmock`, a package for testing Python applications
that use Subversion's Python bindings, has been released. `svnmock`
emulates the entire suite of Python bindings, allowing developers to
ensure that their application is calling the expected API functions
with the expec
Bruno Desthuilliers wrote:
> [EMAIL PROTECTED] a écrit :
> > Problem:
> >
> > You have a list of unknown length,
>
> This doesn't exist in Python:
>len(alist)
>
> > such as this: list > [X,X,X,O,O,O,O]. You want to extract all and only the
> > X's.
>
> braindead solution - relying on zeros b
Tony Nelson <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Jan Niklas Fingerle <[EMAIL PROTECTED]> wrote:
>
> > ...Super is a good tool to use, when dealing with
> > diamond shape inheritance. In any other case I would use the direct
> > calls to the base classes. In fact, i've ye
In article <[EMAIL PROTECTED]>,
dfaber wrote:
> I have Logitech webcam and I need to grab images on Fedora Core 4 (not
>my favorite distro). Are there any python modules available for doing
>this? Any hints or suggestions would be welcome.
You can try this :
http://videocapture.s
[EMAIL PROTECTED] wrote:
> My abuser has been using the medical device to harass me the last 4-5
> years. I have no idea what type of a device is being used on me. I
> believe the device is only available to licensed pharmacist(s). I am
> not very familiar with the intend usage of the device.
Can
> while x < 5:
> x = uniform(1, 5)
> if x >= 1 <= 1.999: print 'SuSE'
> ...
> It dosnt work: only keep printing SuSE. Please help,
Try this:
x = 27.6
if x >= 1 <= 1.999: print 'SuSE'
It prints 'SuSE' because the test is written incorrectly. You want:
if 1 <= x <= 1.999: p
Great stuff, thanks:
-- /usr/bin/byte
--
http://mail.python.org/mailman/listinfo/python-list
Byte wrote:
> How would I do this: Write a program that simply outputs a ramdom (in
> this case) name of (for this example) a Linux distibution. Heres the
> code ive tryed:
>
> from random import uniform
> from time import sleep
>
> x = 2
> while x < 5:
> x = uniform(1, 5)
> if x >= 1 <=
After failing on a yield/iterator-continuation problem in Python (see
below) I tried the Ruby (1.8.2) language first time on that construct:
The example tries to convert a block callback interface
(Net::FTP.retrbinary) into a read()-like iterator function in order to
virtualize the existing FTP cla
"mwt" <[EMAIL PROTECTED]> writes:
> f = urllib.urlopen("http://www.python.org/blah/blah.zip";)
> g = f.read() # ...
> So my question is, what is a good way to go about coding this kind of
> basic feedback? Also, since my testing has only *worked* with this
> code, I'm curious if it will throw a
This code works fine to download files from the web and write them to
the local drive:
import urllib
f = urllib.urlopen("http://www.python.org/blah/blah.zip";)
g = f.read()
file = open("blah.zip", "wb")
file.write(g)
file.close()
The process is pretty opaque, however. This downloads and writes t
As Peter later pointed out, that is a licencing issue rather than a
tool issue. After browsing through the PyInstaller documentation, I
came across a curious snippet.
"On Windows, this provides support for doing in-process COM servers. It
is not generalized. However, embedders can follow the same
In article <[EMAIL PROTECTED]>,
"Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
...
> Discussion
> ==
>
> Why not size_t
> --
>
> An initial attempt to implement this feature tried to use
> size_t. It quickly turned out that this cannot work: Python
> uses negative indices in m
How would I do this: Write a program that simply outputs a ramdom (in
this case) name of (for this example) a Linux distibution. Heres the
code ive tryed:
from random import uniform
from time import sleep
x = 2
while x < 5:
x = uniform(1, 5)
if x >= 1 <= 1.999: print 'SuSE'
elif x >=
malv:
>Is there any way for making Python return memory no longer needed to
>the OS? Cases may arise where you indeed need a big memory block
>temporarily without being able to split it up into smaller chunks.
That's not really necessary. On any decent OS it's just unused address
space, that doesn
Bengt Richter <[EMAIL PROTECTED]> wrote:
...
> >Personally, I'd always use (depending on guesses regarding lengths of
> >lists) [x for x in l1 if x in l2] or the setified equivalent, of course.
> >
> Perhaps newbies should be advised that
>
> [x for x in l1 if x in set(l2)]
>
> is not a (w
Hi,
I have Logitech webcam and I need to grab images on Fedora Core 4 (not
my favorite distro). Are there any python modules available for doing
this? Any hints or suggestions would be welcome.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 11 Feb 2006 10:24:04 -0800, [EMAIL PROTECTED] (Alex Martelli) wrote:
>Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> ...
>> The intersection step is unnecessary, so the answer can be simplified a
>> bit:
>>
>> >>> filter(set(l2).__contains__, l1)
>> [5, 3]
>> >>> filter(set(l1).__contai
That's why Microsoft is bringing IronPython on board to have something
more decent available with .NET
--
http://mail.python.org/mailman/listinfo/python-list
Hi Steven,
Is there any way for making Python return memory no longer needed to
the OS? Cases may arise where you indeed need a big memory block
temporarily without being able to split it up into smaller chunks.
Thank you.
malv
Steven D'Aprano wrote:
> Objects return memory to Python when they a
On Sat, 11 Feb 2006 15:40:49 -0500, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>
>"Steve Holden" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>> Clearly it would be a good idea to remove whatever problem is causing
>> the error,
>
>The problem (see my post of the com_backpatch code)
Now that I know the root cause of the problem, I can write around it as
suggested by Steve Holden and Terry Reedy, (and others). In fact, it
has helped me in a way as I am thinking not in terms of the easiest
solution, (read; the first one that comes to mind), but more effcient
and cleaner ways t
> Read his post again. He didn't ask a specific question at all, and he
> certainly didn't mention execution speed.
agreed
> He asked a vague, meaningless question about whether Python was "slow
> compared to C".
No, that is both wrong and gratuitously harsh. He had heard vague
meaningless com
Hi,
I see. Thank you for your help!
Regards,
hongzheng
Fredrik Lundh wrote:
> [EMAIL PROTECTED] wrote
>
> > I may misunderstood it. I will think about it carefully.
> >
> > By the way, does python has a interface, just like iconv in libc for
> > C/C++? Or, how can I convert a string from a e
1 - 100 of 167 matches
Mail list logo