Hello.
How can I run some Python script within C# program?
Thanks,
Zlatko
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2006-05-27, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
>
>>> I need to interpolate an irregularly spaced set of sampled
>>> points: Given a set of x,y,z points, I need to interpolate z
>>> values for a much finer x,y grid.
>> How many x,y,z points do you have?
>
> I'v
Gregory Petrosyan wrote:
> # Paul Rubin's version
> [EMAIL PROTECTED]:~$ python -mtimeit "import test2" "test2.primes(1000)"
> 100 loops, best of 3: 14.3 msec per loop
>
> # version from the Cookbook
> [EMAIL PROTECTED]:~$ python -mtimeit "import test1" "test1.primes(1000)"
> 1000 loops, best of 3
Hi,
I wanted to install python, numpy and matplotlib on Linux Ubuntu.
I installed python with the following commands
./configure --enable-unicode=ucs4
make
make install
and then I installed numpy running
python setup.py install
Finally I came to matplotlib, that for the installation requires the
c
Jeremy L. Moles>It's just an iterative way to say, "Okay, give me some
default behavior for everything, and I'll come back around later and
set the explicit handlers later."<
There's some correlation with the Null Object pattern:
http://www.cs.oberlin.edu/~jwalker/nullObjPattern/
Bye,
bearophile
Maybe that should be the default behaviour. Presumably the file has
been deleted by some other process?
--
http://mail.python.org/mailman/listinfo/python-list
On 27/05/2006 7:10 AM, Jeremy L. Moles wrote:
> On Sat, 2006-05-27 at 06:22 +1000, John Machin wrote:
>> On 27/05/2006 2:54 AM, Jeremy L. Moles wrote:
>>
>> ["chop" snipped]
>>
>>> Furthermore, what do people think about the idea of adding a truly
>>> empty, no-op global lambda somewhere in Python?
Hi everybody!
I use CMFBoard 2.2.1 as a discussion board on my website.
I want to open the forum to all users, anonymous and registred users!
But my problem is, that whenever an ano user posts a topic, the
overview doesn't display the message correctly. Instead of a table
containing topic-title, s
cesco wrote:
> Hi,
>
> I wanted to install python, numpy and matplotlib on Linux Ubuntu.
> I installed python with the following commands
> ./configure --enable-unicode=ucs4
> [snip]
> running build_ext
> building 'matplotlib.backends._ns_backend_agg' extension
> gcc options: '-pthread -fno-strict
from os import *
for cmd in ['adaware', 'spybot']:
system(cmd)
--
http://mail.python.org/mailman/listinfo/python-list
Jim Lewis wrote:
> Thanks but now another problem :-(
> Examples in books show importing a global so why does below give:
> AttributeError: 'module' object has no attribute 'globalvar'
>
> primes.pyx:
> from run import globalvar
> def prime(int kmax):
> result = [run.globalvar]
> ...
>
> run.py
Has anyone found a good link on exactly how to speed up code using
pyrex? I found various info but the focus is usually not on code
speedup.
--
http://mail.python.org/mailman/listinfo/python-list
maria a écrit :
> Hi everybody!
>
> I use CMFBoard 2.2.1 as a discussion board on my website.
> I want to open the forum to all users, anonymous and registred users!
> But my problem is, that whenever an ano user posts a topic, the
> overview doesn't display the message correctly. Instead of a ta
Cloudthunder wrote:
> In the example:
>
> class Boo:
> def __init__(self, parent):
> self.parent = parent
> print self.parent.testme
> def run():
> print "Yaho!"
>
> class Foo:
> testme = "I love you!"
> def __init__(self):
> test = Boo(self)
>
Edward Elliott wrote:
> [EMAIL PROTECTED] wrote:
>
>
>>Flash also behaves consistently cross-browser, cross/platform -- and
>>features cannot be disabled by the user.
>
>^^
> And that's a good thing? Maybe for Macromedia, not for us. This smells
> like
Jim Lewis schrieb:
> Has anyone found a good link on exactly how to speed up code using
> pyrex? I found various info but the focus is usually not on code
> speedup.
The code speedup comes through the usage of C by pyrex itself, and using
it to put a thin layer over C-functions available/coded fo
I'm not planning to write C functions. My understanding is that by
using cdefs in the python code one can gain substantial speed. I'm
trying to find a description of how to modify python code in more
detail so it runs fast under pyrex.
--
http://mail.python.org/mailman/listinfo/python-list
> Heiko Wundram <[EMAIL PROTECTED]> (HW) schreef:
>HW> from x import test as x
>HW> print x.one
>HW> print x.two
>HW> print x.three
Or replace test by x in x.py :=)
--
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
tatamata wrote:
> Hello.
>
> How can I run some Python script within C# program?
>
-
ProcessStartInfo startInfo;
Process process;
string directory;
string pyArgs;
You can gain substantial speed-ups in very certain cases, but the main
point of Pyrex is ease of wrapping, not of speeding-up.
Depending on what you're doing, rewriting in Pyrex or even in C, using
the Python/C API directly, might not gain you much.
--
http://mail.python.org/mailman/listinfo/pyt
> main point of Pyrex is ease of wrapping, not of speeding-up.
Supposedly the primes example is 50 times faster.
--
http://mail.python.org/mailman/listinfo/python-list
Jim Lewis napisal:
>>main point of Pyrex is ease of wrapping, not of speeding-up.
>
> Supposedly the primes example is 50 times faster.
How often you perform primes calculations in your programs? In my >10
years of professional career in writing business software I never had an
opportunity to do
Duncan Smith wrote:
> chris brat wrote:
>> Doesnt this do what the original poster is try accomplish?
>>
>
> Not what the OP asked for, no. Clearing a list implies that list1
> should still be bound to the same list (which might be important if
> there are other names bound to the same list). If
Hi all,
whwn working with xml connectvity to python, i have a
sash window, in which first window has a Tree Control
that has 'n' parent fields preceded by + sign and on
leftdown all the childs got from external xml file.
when the particular parent field is selected and
dragged, it must get posted
> I never had an opportunity to do any more sophisticated math than simple
> adding,
multiplying, subtracting and dividing.
Neither is the primes example doing anything more sophisticated than
basic arithmetic but it's 50 times faster.
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-05-27, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
> Not that you made a bad choice. I do wonder, how much of your
> difficulty was with the interface to the underlying fitpack
> routines.
I've no idea. I had never done anything with splines before,
so it's quite possible I just wasn'
On 2006-05-27, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> i can use the polling method to check for data on the serial port using
> pyserial...but i need to use the interrupt driven method .am workin
> on a windows platform
I don't think there is any way to so interrupt driven I/O un
Is it possible when using packages like PyInstaller to create an .exe for
distribution that parts of the package can bleed out and be left on a system
when the .exe is executed?
Thx
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your help, guys. I'm convinced it is a bug, not a
misunderstanding. I submitted it to the errata page at O'Reilly.
Regards,
Abraham
--
http://mail.python.org/mailman/listinfo/python-list
Jim Lewis \/\/|20+3:
> I'm not planning to write C functions. My understanding is that by
> using cdefs in the python code one can gain substantial speed. I'm
> trying to find a description of how to modify python code in more
> detail so it runs fast under pyrex.
I've used pyrex to speed up my co
Hi Jim,
It depends a lot on what you're doing. You will get speed up from Pyrex
or wrapping C code if you understand how does it work internally, and to
speed up you application via coding *only* Pyrex parts (I mean don't
using it for wrapping C but implementing in Pyrex), it limits a lot the
thanks.
"Gerard Flanagan" <[EMAIL PROTECTED]> je napisao u poruci interesnoj
grupi:[EMAIL PROTECTED]
> tatamata wrote:
>> Hello.
>>
>> How can I run some Python script within C# program?
>>
>
> -
>ProcessS
I'm working on a "TempFile" class that stores the data in memory until
it gets larger than a specified threshold (as per PEP 42). Whilst
trying to implement it, I've come across some strange behaviour. Can
anyone explain this?
The test case at the bottom starts a TempFile at size 50 and prints i
Just forwarding this in case anybody here can shed light on this --
urllib's support for SSL client certificates didn't work for me, and I'm
wondering if it works for anybody else...
John
-- Forwarded message --
Date: Sat, 27 May 2006 14:33:03 + (UTC)
From: John J Lee <[EMA
The problem is with that (which is what I'm doing already) is that one
app is in a window and one app is on the command line. Thus, you end up
with both apps running at the same time. Are there any modules that
have functions for checking when windows are opened or closed?
--
http://mail.python.o
I can't see the way how Xah Lee could be on topic in
comp.lang.java.programmer. He is not a programmer,
and does not write about neither programming nor
Java.
He should stick to philosophy and advocacy groups.
DG
--
http://mail.python.org/mailman/listinfo/python-list
Oops, spot the deliberate misteka ;-) should have been:
opener = urllib.FancyURLopener(key_file=KEY_FILE,
cert_file=CERT_FILE,
)
r = opener.open()
print r.read()
... which *does* work for me. Sorry for the noise everybody.
John
[EMAIL PROTECTED] said:
> Maybe that should be the default behaviour. Presumably the file has
> been deleted by some other process?
The use case is that a NamedTemporaryFile was used to securely create
and populate a file, which is then atomically (on posix) os.rename()d to
its final location.
I
[EMAIL PROTECTED] wrote:
> oops. lost my train of thought. I was gonna say, I wonder if some of
> these image manipulation routines are using multiple threads?
PIL doesn't use threading by itself, and I know of quite a few PIL-based
systems running on multi-processor hardware (not to mention mul
[EMAIL PROTECTED] a écrit :
> I'm working on a "TempFile" class that stores the data in memory until
> it gets larger than a specified threshold (as per PEP 42). Whilst
> trying to implement it, I've come across some strange behaviour. Can
> anyone explain this?
>
> The test case at the bottom s
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> So here's how to save the values from the iterators while iterating over
the
> groupby:
>
> >>> m = [(x,list(y)) for x,y in groupby([1, 1, 1, 2, 2, 3])]
> >>> m
> [(1, [1, 1, 1]), (2, [2, 2]), (3, [3])]
>
> -- Paul
>
>
Pl
Hi All
I can't find the "Python Way" of writing a datetime instance to a
string so that it can be easily parsed back again. time.strptime is
apparantly not supported on some platforms, and time.time <==>
datetime.utcfromtimestamp will cause problems come 2038. Unfortunately
there don't seem to b
How do I get contour lines drawn in just one color (e.g. black)?
Multicolored contour lines on top of a pm3d surface can be very
hard to look at...
--
Grant Edwards grante Yow! Is it 1974? What's
at for SUPPER? Can I
On 2006-05-27, Grant Edwards <[EMAIL PROTECTED]> wrote:
> How do I get contour lines drawn in just one color (e.g. black)?
>
> Multicolored contour lines on top of a pm3d surface can be very
> hard to look at...
Of course I found it right after I posted the question:
"unset clabel"
--
Grant Ed
I need a row of 127 bytes that I will use as a
circular buffer. Into the bytes (at unspecified times)
a mark (0http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list
Dr. Pastor schrieb:
> I need a row of 127 bytes that I will use as a
> circular buffer. Into the bytes (at unspecified times)
> a mark (0 After some time the "buffer" will contain the last 127 marks.
> (A pointer will point to the next byte to write to.)
> What would be the Pythonic way to do the a
We don't need any proprietary junk to make a nice-look website:
http://www.csszengarden.com
You can navigate in this site with any kind of browser, even graphical
or text-based, like lynx.
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-05-27, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2006-05-27, Grant Edwards <[EMAIL PROTECTED]> wrote:
>> How do I get contour lines drawn in just one color (e.g. black)?
>>
>> Multicolored contour lines on top of a pm3d surface can be very
>> hard to look at...
>
> Of course I found it
D H a écrit :
> Fredrik Lundh wrote:
>
>> vbgunz wrote:
>>
I have new a list , when it hava large number of values, I wonna to
delete all the values in it,how to do?
>>>
>>>
>>> something like this will probably help.
>>>
>>> x = [1,2,3,4,5,6,7,8,9]
>>> y = x
>>>
>>> list([x.pop() for z
LittlePython wrote:
> Is it possible when using packages like PyInstaller to create an .exe for
> distribution that parts of the package can bleed out and be left on a system
> when the .exe is executed?
>
> Thx
>
>
Look at innosetup.
--
James Stroud
UCLA-DOE Institute for Genomics and Proteo
John D Salt a écrit :
> <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
>
> [Snips]
>
>>Wrong. We live in a paradise of ideas and possibilities well beyond the
>>wildest dreams of only 20 years ago.
>
>
> What exciting new ideas exist in software that are both important and
> cannot be tr
John A. Bailo a écrit :
> John D Salt wrote:
>
>> <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
>>
>> [Snips]
>>
>>> Wrong. We live in a paradise of ideas and possibilities well beyond the
>>> wildest dreams of only 20 years ago.
>>
>>
>>
>> What exciting new ideas exist in software that ar
Paul Rubin a écrit :
> John D Salt writes:
>
>>What exciting new ideas exist in software that are both important and
>>cannot be traced back to 1986 or earlier?
>
>
> Automated spamming tools? ;-)
keyboard !
--
http://mail.python.org/mailman/listinfo/python-list
Diez B. Roggisch wrote:
> Dr. Pastor schrieb:
> > I need a row of 127 bytes that I will use as a
> > circular buffer. Into the bytes (at unspecified times)
> > a mark (0 > After some time the "buffer" will contain the last 127 marks.
> > (A pointer will point to the next byte to write to.)
> > What
Hi,
I'm searching for a POSIX 1003.2 compatible regular expression engine.
The Python binding "pregex" by Neal Becker may do the job, but I did
not manage to download it as the original link
ftp://ftp.ctd.comsat.com/pub/
seems dead.
Does any old-timer () have a copy of this package ?
Cheers,
SB
Dr. Pastor wrote:
> I need a row of 127 bytes that I will use as a
> circular buffer. Into the bytes (at unspecified times)
> a mark (0 After some time the "buffer" will contain the last 127 marks.
Sounds a lot like homework.
--
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Terry Reedy wrote:
>
>>
>> Are the dice identical or distinguishable (marked). In other words,
>> with 2
>> dice, is 1,2 the same as 2,1 or different? Note that in most dice
>> games,
>> such as craps, the dice are not distinguis
Thx for the tip.
I am referring more to the use of PyInstaller or py2exe. Packages that
create exe files that basically have your py script and a small py
interpreter all rolled up into one. This way py does not need to be
installed on a system to execute a py script. I am being advised that pytho
LittlePython wrote:
> Thx for the tip.
>
> I am referring more to the use of PyInstaller or py2exe. Packages that
> create exe files that basically have your py script and a small py
> interpreter all rolled up into one. This way py does not need to be
> installed on a system to execute a py scrip
Hello all,
I have released version 0.3.5 of my typecheck module, a Python module
providing run-time typechecking facilities for function parameters and
return values, as well as generator yield values.
The main workhorses of this module, the functions accepts, returns and yields,
are used as func
On 28/05/2006 3:37 AM, Brendan wrote:
> Hi All
>
> I can't find the "Python Way" of writing a datetime instance to a
> string so that it can be easily parsed back again. time.strptime is
> apparantly not supported on some platforms, and time.time <==>
> datetime.utcfromtimestamp will cause proble
That is very close to what I have being doing, however I was unable to
enclose a bmp or another file for that matter in the exe. I used both DATA
and BINARY key words with no luck. I checked what was in the package and
there were there. I guess for some reason it could not locate then when
executed
On 28/05/2006 12:10 AM, Gonzalo Monzón wrote:
[good advice snipped]
>
> Example A:
> This code is more than 80 times faster than a "easy" Python
> implementation. For every call, it does some bitwise operations and does
> an array lookup for every string character from argument. Its a lot
> f
I've read a few posts about how to have attributes that are "linked" at
run time. I've created a (simple) Python metaclass that accomplishes
this with some behind-the-scenes __init__ redirection. I'm posting the
code at the end in case anyone is interested.
Problem background:
Object a (an insta
Martin Wiechert wrote:
> Hi list,
>
> I've created a fresh build of Python 2.4.3 using the following configuration
>
> $ ./configure --with-pydebug --prefix=/usr/local/debug --enable-shared
> --with-fpectl --with-signal-module
>
> What did I do wrong?
Try with just: ./configure --with-pydebug --p
Hi John,
John Machin escribió:
>On 28/05/2006 12:10 AM, Gonzalo Monzón wrote:
>
>[good advice snipped]
>
>
>
>>Example A:
>>This code is more than 80 times faster than a "easy" Python
>>implementation. For every call, it does some bitwise operations and does
>>an array lookup for every string
Grant Edwards wrote:
> On 2006-05-27, Travis E. Oliphant <[EMAIL PROTECTED]> wrote:
>
>> Not that you made a bad choice. I do wonder, how much of your
>> difficulty was with the interface to the underlying fitpack
>> routines.
>
> I've no idea. I had never done anything with splines before,
> s
Hello list,
What is the best way to check that a process is running (or better yet
number of instances) based on the name of the process? Would have to
work on a unix/linux system.
Thank you.
--
To be updated...
--
http://mail.python.org/mailman/listinfo/python-list
> What is the best way to check that a process is running (or better yet
> number of instances) based on the name of the process? Would have to
> work on a unix/linux system.
Use "ps -C proc_name". Then either read the nr of lines in the output
(for the number of instances) or read the return valu
LittlePython wrote:
> That is very close to what I have being doing, however I was unable to
> enclose a bmp or another file for that matter in the exe. I used both DATA
> and BINARY key words with no luck. I checked what was in the package and
> there were there. I guess for some reason it could n
Acctualy there is a solution:
see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473810
(thanks darrin massena for sharing)
and , if you will set all the neccessary parametrs, it won't be
recognized as a
spam,
thanks
--
http://mail.python.org/mailman/listinfo/python-list
72 matches
Mail list logo