Hello to all
I'm about to write a simulator for a microcontroller in python
(why python? because I love it!!!)
but I have a problem.
The registry of this processor are all 8 bit long (and 10 bit for some
other strange register)
and I need to simulate the fixed point behaviour of the register,
and
dingo_1980 wrote:
> I wanted to know if scipy.sparse support or will support the following
> functions which are available in scipy.linalg or scipy or numpy:
>
> Inverse
> Cholesky
> SVD
> multiply
> power
> append
> eig
> concatenate
>
> Thanks...
You should probably ask on a SciPy mailing list
currently I am using
[code]
req=urllib2.Request(url)
data=''
if '' not in data:
fd=urllib2.urlopen(req)
data=fd.read()
time.sleep(10)
time.sleep(10)
blahblah
[/code]
Is there any other ready-to-use function? And what if the internet
connection is chocked so that the html pa
On 2008-07-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm looking over the docs for the re module and can't find how to
> "NOT" an entire regex.
(?! R)
> How make regex that means "contains regex#1 but NOT regex#2" ?
(\1|(?!\2))
should do what you want.
Albert
--
http://mail.python.org
On Jul 1, 2:34 am, "A.T.Hofkamp" <[EMAIL PROTECTED]> wrote:
> On 2008-07-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I'm looking over the docs for the re module and can't find how to
> > "NOT" an entire regex.
>
> (?! R)
>
> > How make regex that means "contains regex#1 but NOT regex#2"
On Tue, 01 Jul 2008 15:16:03 +0800, oyster wrote:
> currently I am using
> [code]
> req=urllib2.Request(url)
> data=''
> if '' not in data:
> fd=urllib2.urlopen(req)
> data=fd.read()
> time.sleep(10)
> time.sleep(10)
> blahblah
> [/code]
That looks very strange. Why the `
On Mon, 30 Jun 2008 13:43:22 -0700, John Machin wrote:
>> I reply here to all of you about such point: that's not important,
>> although I appreciate very much your suggestions! My point was
>> 'something that works in Perl, has problems in Python'.
>
> It *is* important; our point was 'you didn'
Hello everyone,
I'm trying to embed Python interpreter in C code, but in a specific way:
loading compiled bytecode into a memory location and executing it (don't
ask why, complicated reasons).
PyImport_ExecCodeModule seems like obvious candidate, docs say:
"Given a module name (possibly of the
Kurda Yon a écrit :
Hi,
I start to learn the object oriented programing in Python. As far as I
understood, every class has a set of corresponding methods and
variables.
Every object has a set of attributes. Some of these attributes are
methods (which are thmeselves objects too), some are not.
Hi everyone ! ! !
I'm just a month old in the world of Python and trying to develop an
application using Tkinter in which a new window pops out on a
particular button press.The code for this new window is in
"AddKlas.py" file.
The problem is all the content of the new window is overwritten on
th
Naruto 407, One Piece 506, Bleach 329 Hot manga Download
The hottest mangas and the latest chapters
Manga news, Most popular mangas, Latest mangas, Latest chapters
http://english1.isoshu.com/?recommid=1023
http://emanga1.isoshu.com/?recommid=1023
A New Wonderful Manga: Maken-ki!
http://englis
On 1 Jul, 04:09, Allen <[EMAIL PROTECTED]> wrote:
> I read the website of some information about PyPy, and how a translator
> translates the RPython code to C/CLI/Java/etc to be compiled to a native
> executable or something like that. Would it be possible, in PyPy, to
> write such an extension th
Asian porn sites! Not the best, only better.
To join our team, we do together.URL: http://www.loioi.com
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 01 Jul 2008 03:13:42 -0700, viv1tyagi wrote:
> Hi everyone ! ! !
>
> I'm just a month old in the world of Python and trying to develop an
> application using Tkinter in which a new window pops out on a
> particular button press.The code for this new window is in
> "AddKlas.py" file.
> The
On 1 Jul, 08:57, nickola <[EMAIL PROTECTED]> wrote:
> Hello to all
> I'm about to write a simulator for a microcontroller in python
> (why python? because I love it!!!)
>
> but I have a problem.
>
> The registry of this processor are all 8 bit long (and 10 bit for some
> other strange register)
Hi,
the following code does not work until I ommit the "a=0" statement.
def test():
exec "a=3" in locals()
print a
a=0
test()
print raises:
UnboundLocalError: local variable 'a' referenced before
assignment
Can anybody explain what is going wrong here ?
Gree
2008/7/1, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> I'm looking over the docs for the re module and can't find how to
> "NOT" an entire regex.
>
> For example.
>
> How make regex that means "contains regex#1 but NOT regex#2" ?
>
> Chris
>
> --
> http://mail.python.org/mailman/listinfo/python-l
A project I'm currently working on uses Turbogears as a framework. I'd
like to interact with it using the tg-admin shell. We also use gettext's
_() function for internationalization. Now, this function is overwritten
in interactive mode, which causes annoying exceptions. Is it possible to
disab
Koen Vossen wrote:
> A project I'm currently working on uses Turbogears as a framework. I'd
> like to interact with it using the tg-admin shell. We also use gettext's
> _() function for internationalization. Now, this function is overwritten
> in interactive mode, which causes annoying exceptions.
Koen Vossen wrote:
> A project I'm currently working on uses Turbogears as a framework. I'd
> like to interact with it using the tg-admin shell. We also use gettext's
> _() function for internationalization. Now, this function is overwritten
> in interactive mode, which causes annoying exceptions.
Trying to learn Python here, but getting tangled up with variable
scope across functions, modules etc and associated problems. Can
anyone advise please?
Learning project is a GUI-based (wxPython) Python program that needs
to access external data across a serial port.
The first thing that I need
Hi,
the download page (http://www.python.org/download/releases/3.0/) for
Python 3000 shows :
9119625244b17aa35ed94b655a2b2135 13491200 python-3.0b1.msi
but I got
9119625244a57aa35ed94b655a2b2135 13491200 python-3.0b1.msi
(44a57 rather than 44b17 )
with several md5 checkers ( MdChecker
On 2008-06-29, slix <[EMAIL PROTECTED]> wrote:
> Recursion is awesome for writing some functions, like searching trees
> etc but wow how can it be THAT much slower for computing fibonacci-
> numbers?
Try the following recursive function:
def fib(n):
def gfib(a, b , n):
if n == 0:
ret
On Mon, 30 Jun 2008 17:44:13 +, Jürgen Exner wrote:
> Xah <[EMAIL PROTECTED]> wrote:
>>my perl and python tutorial
>>
>>http://xahlee.org/perl-python/index.html
>>
>>is now available for download for offline reading.
>
> Why anyone would have the idea to mix two different langauges in one
>
Allen schrieb:
> I read the website of some information about PyPy, and how a translator
> translates the RPython code to C/CLI/Java/etc to be compiled to a native
> executable or something like that. Would it be possible, in PyPy, to
> write such an extension that could easily be compiled to nati
John Dann a écrit :
Trying to learn Python here, but getting tangled up with variable
scope across functions, modules etc and associated problems. Can
anyone advise please?
Learning project is a GUI-based (wxPython) Python program that needs
to access external data across a serial port.
The f
Hi
If PyImport_ExecCodeModule have a two parameteres and second parameter is
PyObject type why you are make a call with a unsigned char value ?
If you search this function name into Google you will can found some
examples, use for example PyMarshal_ReadObjectFromString or
PyMarshal_ReadObjectFro
On 30 jun 2008, at 18:55, [EMAIL PROTECTED] wrote:
Is there any way to type into a Tkinter frame window?
I want to use raw_input() within a Tkinter frame.
--
http://mail.python.org/mailman/listinfo/python-list
You could use the Tkinter.Entry option from dialog windows...
http://www.pythonwa
nickola wrote:
> Hello to all
> I'm about to write a simulator for a microcontroller in python
> (why python? because I love it!!!)
[...]
> The registry of this processor are all 8 bit long (and 10 bit for some
> other strange register)
> and I need to simulate the fixed point behaviour of the
Hi,
I try to parse a file with pyparsing and get this output:
['generic', 'host-01', 'host alias xyz', '10.0.0.1']
- alias: host alias xyz
- host_name: ['host-01']
- ip_address: ['10.0.0.1']
- use: ['generic']
generic
host-01
host alias xyz
Hi, I'm just toying around with some ideas at the moment.
Is there an easy and safe way to recursivly import all modules under a
particular namespace?
Say, I had modules:
foo
foo.bar
foo.bar.baz
foo.baz
bar
bar.baz
I want to import all the modules in the foo namespace, so the first
four modules
In article <[EMAIL PROTECTED]>,
Tim Roberts <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Aahz) wrote:
>>Paul McNett <[EMAIL PROTECTED]> wrote:
>>>
>>>They want an expert for a maximum of $25 per hour? If they find someone,
>>>it'll be a pretty good bullshitter looking for experience.
>>
>>Note
rocksportrocker wrote:
>
> Hi,
>
> the following code does not work until I ommit the "a=0" statement.
>
>
>def test():
>exec "a=3" in locals()
>print a
>a=0
>
> test()
>
> print raises:
> UnboundLocalError: local variable 'a' referenced before
> assignme
On Jun 28, 12:22 am, Kurda Yon <[EMAIL PROTECTED]> wrote:
> I would like to know what are advantages of Python in comparison with C
> ++? In which cases and why Python can be a better tool than C++?
>
> Thank you!
Back in 2002, we made a hard decision between c++ (well established
here) java (not
i am a newbie to python and is working on an application which needs
to connect to the database. can anyone guide me through the DBMS that
i can use and the module to connect to it. currently i have MySQL
installed using the link on the python.org site but is unable to
connect to it through python.
Marcin Krol wrote:
Hello everyone,
I'm trying to embed Python interpreter in C code, but in a specific way:
loading compiled bytecode into a memory location and executing it (don't
ask why, complicated reasons).
PyImport_ExecCodeModule seems like obvious candidate, docs say:
"Given a module na
On Jun 30, 3:12 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Mon, 30 Jun 2008 10:55:00 -0700, Tom Davis wrote:
> > To me, this seems illogical. I can understand that the GC is
> > reluctant to reclaim objects that have many connections to other
> > objects and so forth, but once th
Many thanks for the repsonse - much appreciated.
And sorry - yes I was probably compounding two separate issues here -
the GUI one and the variable scope one. Maybe the wxPython list would
be the best place to ask more about the GUI side of things.
Then actually I can simplify my remaining quest
On Jun 30, 8:24 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Jun 30, 1:55 pm, Tom Davis <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 26, 5:38 am, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > > On Jun 26, 5:19 am, Tom Davis <[EMAIL PROTECTED]> wrote:
>
> > > > I am having a problem where a long-runn
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Tuesday, July 01, 2008 2:29 AM
> To: python-list@python.org
> Subject: How make regex that means "contains regex#1 but NOT regex#2"
> ??
>
> I'm looking over the do
On Jul 1, 8:02 am, name <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I try to parse a file with pyparsing and get this output:
>
> ['generic', 'host-01', 'host alias xyz', '10.0.0.1']
> - alias: host alias xyz
> - host_name: ['host-01']
> - ip_address: ['10.0.0.1']
> - use: ['generic']
> Do you mean something like this?
>
> Easy Cap Audio-Video Capturing Adapter
> http://www.youtube.com/watch?v=3AvT8JQ7NzI
this would be suitable, if it had a documented driver, some sites said
it could only be used with the included
software. many bad comments, though:
http://forums.ebay.com/db
On 2008-07-01, nickola <[EMAIL PROTECTED]> wrote:
> Hello to all
> I'm about to write a simulator for a microcontroller in python
> (why python? because I love it!!!)
>
> but I have a problem.
>
> The registry of this processor are all 8 bit long (and 10 bit
> for some other strange register) a
I am really stuck presently, trying to install these on my Windows XP.
I have downloaded easy_install and it is now in Python25\Scripts but
none of the commands I have read in either program folder have worked
to install them.
I was hoping someone could give me a step by step guide to installing
t
Peter Otten <[EMAIL PROTECTED]> writes:
> >>> import sys
> >>> def displayhook(result):
> ... if result is not None:
> ... __builtins__._last = result
> ... print result
> ...
Better is to explicitly import the name '__builtin__'
http://www.python.org/doc/lib/module-bu
Paul McGuire <[EMAIL PROTECTED]> wrote in news:be7af822-70d7-44fb-96fa-
[EMAIL PROTECTED]:
>
> Looks like this is a bug in asXML(). Note that if I reverse the use
> and host_name strings in the input and in your grammar, I get this XML
> output:
>
>
> host-01
> generic
> host alias xyz
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Reedick, Andrew
> Sent: Tuesday, July 01, 2008 10:07 AM
> To: [EMAIL PROTECTED]; python-list@python.org
> Subject: RE: How make regex that means "contains regex#1 but NOT
> regex#2" ??
What is a good way to emulate:
from module import xxx
where 'module' is a dynamically generated string?
__import__ ('modulename', fromlist=['xxx'])
seems to be what I want, but then it seems 'xxx' is not placed in globals()
(which makes me wonder, what exactly did fromlist do?)
--
http://mail.p
John Dann a écrit :
Many thanks for the repsonse - much appreciated.
And sorry - yes I was probably compounding two separate issues here -
the GUI one and the variable scope one. Maybe the wxPython list would
be the best place to ask more about the GUI side of things.
Then actually I can simpl
On Tue, Jul 1, 2008 at 12:11 PM, Neal Becker <[EMAIL PROTECTED]> wrote:
> What is a good way to emulate:
>
> from module import xxx
> where 'module' is a dynamically generated string?
>
> __import__ ('modulename', fromlist=['xxx'])
>
> seems to be what I want, but then it seems 'xxx' is not placed
I'm trying to figure out how to use the gnu readline library so
that when my program is prompting the user for input there is
line editing and history support.
I've read and re-read the documentation for the "readline"
module in the standard library and I still can't figure out how
to use the modu
Thanks to all for the responses!
to MEl: I also want to build a pic simulator, but I want to do this as
"python for big project" learning exercise, I have used python in the
past only for small script and now I want to use it for something more
"big".
do you have some code to share?
myhdl seems i
At 2008-06-30T19:34:53Z, Mike <[EMAIL PROTECTED]> writes:
> I should have say "why embedding HTML into Python is not good enough?" ;=)
I'm a programmer and would be able to cope with embedding HTML in assembler
if the need arose.
Having said that, embedding HTML in anything but HTML tends to be
Dear Users,
I'm having a problem when trying to move script from Linux to Windows.
A zipfile opperation is failing with the message:
"BadZipFile: File is not a zip file"
I have a simple scripts that reads a zip file in the same way as any
other file into a string, then sends it across to a netwo
I installed from here:
http://bazaar-vcs.org/WindowsInstall
first pycrypto-2.0.1.win32-py2.5.zip
then paramiko-1.7.1-ctypes.win32.exe
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 01 Jul 2008 16:38:23 +0100, Wesley Brooks wrote:
> Dear Users,
>
> I'm having a problem when trying to move script from Linux to Windows.
> A zipfile opperation is failing with the message:
>
> "BadZipFile: File is not a zip file"
>
> I have a simple scripts that reads a zip file in the
Correct your information about Islam
,
The Misunderstood Religion
When you are ready_ you can enter this place!!!
http://sultan.org
--
http://mail.python.org/mailman/listinfo/python-list
kkwweett a écrit :
Hi,
the download page (http://www.python.org/download/releases/3.0/) for
Python 3000 shows :
9119625244b17aa35ed94b655a2b2135 13491200 python-3.0b1.msi
but I got
9119625244a57aa35ed94b655a2b2135 13491200 python-3.0b1.msi
(44a57 rather than 44b17 )
with several md5 c
Guilherme Polo wrote:
> On Tue, Jul 1, 2008 at 12:11 PM, Neal Becker <[EMAIL PROTECTED]> wrote:
>> What is a good way to emulate:
>>
>> from module import xxx
>> where 'module' is a dynamically generated string?
>>
>> __import__ ('modulename', fromlist=['xxx'])
>>
>> seems to be what I want, but t
Grant Edwards wrote:
> I'm trying to figure out how to use the gnu readline library so
> that when my program is prompting the user for input there is
> line editing and history support.
>
> I've read and re-read the documentation for the "readline"
> module in the standard library and I still ca
Pau Freixes wrote:
If you search this function name into Google you will can found some
examples, use for example PyMarshal_ReadObjectFromString or
PyMarshal_ReadObjectFromFile
Rest assured I looked at a lot of code, but none of it was reading
in the .pyc file. I had no idea about the 8-byte h
Carsten Haese wrote:
python_code is a C string containing the raw bytes from your pyc file.
Casting that to a PyObject pointer will not magically transform it into
a Python code object.
well yeah, I kind of didn't think that through..
A pyc file contains the following:
1) An 8 byte head
Hello everyone,
In the meantime I managed to work out another solution, mainly thanks to
reading the source code of some OSS projects. I post it here so somebody
else looking for solution to this problem had the example available:
cut
#include
#include
#include
#include
#include
Does anyone know if there are any generally available classes for parsing
various wiki markup formats?
--
| _ | * | _ |
| _ | _ | * |
| * | * | * |
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 01 Jul 2008 17:54:05 +0200, kkwweett <[EMAIL PROTECTED]> wrote:
> kkwweett a écrit :
>> Hi,
>>
>> the download page (http://www.python.org/download/releases/3.0/) for
>> Python 3000 shows :
>>
>> 9119625244b17aa35ed94b655a2b2135 13491200 python-3.0b1.msi
>>
>> but I got
>>
>> 9119625
On Tue, Jul 1, 2008 at 12:55 PM, Neal Becker <[EMAIL PROTECTED]> wrote:
> Guilherme Polo wrote:
>
>> On Tue, Jul 1, 2008 at 12:11 PM, Neal Becker <[EMAIL PROTECTED]> wrote:
>>> What is a good way to emulate:
>>>
>>> from module import xxx
>>> where 'module' is a dynamically generated string?
>>>
>>
In article
<[EMAIL PROTECTED]>,
Jonathan Gardner <[EMAIL PROTECTED]> wrote:
> On Jun 27, 10:32 am, "David C. Ullrich" <[EMAIL PROTECTED]> wrote:
> > (ii) The regexes in languages like Python and Perl include
> > features that are not part of the formal CS notion of
> > "regular expression". Do t
>> What I want to do is replace sys.stdin.readline() with
>> something that will provide the user with line editing and
>> history recall. In other languages, one uses the Gnu readline
>> library to do that, but my reading of the Python library
>> documentation is that's not what the Python readli
Michael Mabin wrote:
> Does anyone know if there are any generally available classes for parsing
> various wiki markup formats?
Several here:
http://pypi.python.org/pypi?%3Aaction=search&term=wiki&submit=search
I'm sure you could find a good one, and add your own markup if needed.
j
--
http:/
Hello.
I want to convert unicode character into ascii one.
The method ".encode('ASCII') " can convert only those unicode characters,
which fit into 0..128 range.
But there are still lots of characters beyond this range, which can be
manually converted to some visibly similar ascii characters. For
Peter Bulychev wrote:
Hello.
I want to convert unicode character into ascii one.
The method ".encode('ASCII') " can convert only those unicode
characters, which fit into 0..128 range.
But there are still lots of characters beyond this range, which can be
manually converted to some visibly si
How do I convert a string to a char array? I am doing this so I can edit
the string received from an sql query so I can remove unnecessary
characters.
--
http://mail.python.org/mailman/listinfo/python-list
Thank you for you answer.
If you only want this to work for a subset, please define that subset.
Actually, I want to convert only punctuations (dots, commas, hyphens and so
on).
--
Best regards,
Peter Bulychev.
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 1, 9:35 am, varun chadha <[EMAIL PROTECTED]> wrote:
> i am a newbie to python and is working on an application which needs
> to connect to the database. can anyone guide me through the DBMS that
> i can use and the module to connect to it. currently i have MySQL
> installed using the link on
Brandon wrote:
How do I convert a string to a char array? I am doing this so I can edit
the string received from an sql query so I can remove unnecessary
characters.
The precise answer is:
>>> s = 'abcdefghi'
>>> l = list(s)
>>> l
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
>>>
But qui
On Jul 1, 2:49 pm, "Brandon" <[EMAIL PROTECTED]> wrote:
> How do I convert a string to a char array? I am doing this so I can edit
> the string received from an sql query so I can remove unnecessary
> characters.
Answering your specific question:
Python 2.5.1 (r251:54863, Mar 31 2008, 11:09:52)
nickola wrote:
Hello to all
I'm about to write a simulator for a microcontroller in python
(why python? because I love it!!!)
but I have a problem.
The registry of this processor are all 8 bit long (and 10 bit for some
other strange register)
and I need to simulate the fixed point behavio
Peter Bulychev wrote:
Thank you for you answer.
If you only want this to work for a subset, please define that subset.
Actually, I want to convert only punctuations (dots, commas, hyphens
and so on).
Then make your translation table manually and apply this method:
unicode.translate
Fina
master,slave1,slave2=zip(*x)
What does the asterisk do here?
Thanks
** Posted from http://www.teranews.com **
--
http://mail.python.org/mailman/listinfo/python-list
Thank you both for your help.
"Mike Kent" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Jul 1, 2:49 pm, "Brandon" <[EMAIL PROTECTED]> wrote:
> How do I convert a string to a char array? I am doing this so I can edit
> the string received from an sql query so I can remove unnecess
list.append([1,2]) will add the two element list as the next
element of the list.
list.extend([1,2]) is equivalent to list = list + [1, 2]
and the result is that each element of the added list
becomes it's own new element in the original list.
Is that the only difference?
>From the manual:
s.ex
On 2008-07-01, Terry Reedy <[EMAIL PROTECTED]> wrote:
>
>
> nickola wrote:
>> Hello to all
>> I'm about to write a simulator for a microcontroller in python
>> (why python? because I love it!!!)
>>
>> but I have a problem.
>>
>> The registry of this processor are all 8 bit long (and 10 bit fo
Peter Bulychev wrote:
Hello.
I want to convert unicode character into ascii one.
The method ".encode('ASCII') " can convert only those unicode
characters, which fit into 0..128 range.
But there are still lots of characters beyond this range, which can be
manually converted to some visibly
[EMAIL PROTECTED] wrote:
Hello,
Does anyone know how to fix this error when trying to build MySQL-
python-1.2.2:
python setup.py build
Traceback (most recent call last):
File "setup.py", line 5, in
import ez_setup; ez_setup.use_setuptools()
File "/Users/jasonnerida/Downloads/MySQL-pyth
On Jul 1, 12:35 pm, Tobiah <[EMAIL PROTECTED]> wrote:
> list.append([1,2]) will add the two element list as the next
> element of the list.
>
> list.extend([1,2]) is equivalent to list = list + [1, 2]
> and the result is that each element of the added list
> becomes it's own new element in the orig
Hi,
I have a class called "vector". And I would like to define a function
"dot" which would return a dot product of any two "vectors". I want
to call this function as follow: dot(x,y).
Well, I can define a functions "dot" outside the class and it works
exactly as I want. However, the problem is
On 1 juil, 21:35, Tobiah <[EMAIL PROTECTED]> wrote:
> list.append([1,2]) will add the two element list as the next
> element of the list.
list.append(obj) will add obj as the last element of list, whatever
type(obj) is.
> list.extend([1,2]) is equivalent to list = list + [1, 2]
Not quite. The se
Luis Zarrabeitia <[EMAIL PROTECTED]> wrote:
> > is that what lazy evaluation in functional languages avoids thus
> > making recursive versions much faster?
>
> Not exactly... Functional languages are (or should be) optimized for
> recursion,
> but if the algorithm you write is still exponential
Matimus <[EMAIL PROTECTED]>:
> On Jun 30, 9:55 am, [EMAIL PROTECTED] wrote:
>> Is there any way to type into a Tkinter frame window?
>> I want to use raw_input() within a Tkinter frame.
>
> `raw_input(prompt)` just calls `sys.stdout.write(prompt)` and returns
> `sys.stdin.readline()`.
It does mor
On Tue, 01 Jul 2008 12:35:01 -0700, Tobiah wrote:
> list.append([1,2]) will add the two element list as the next
> element of the list.
>
> list.extend([1,2]) is equivalent to list = list + [1, 2]
> and the result is that each element of the added list
> becomes it's own new element in the origin
On 1 juil, 22:46, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
(snip)
> By definition any function in a functional language will
> always produce the same result if given the same arguments,
This is only true for pure functional languages.
I know you know it, but someone might think it also appli
On 1 juil, 22:43, Kurda Yon <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a class called "vector". And I would like to define a function
> "dot" which would return a dot product of any two "vectors". I want
> to call this function as follow: dot(x,y).
>
> Well, I can define a functions "dot" outside
Hello.
I think I'm aware of how attribute access is resolved in python. When
referencing a class instance attribute which is not defined in the
scope of the instance, Python looks for a class attribute with the
same name. (For assignment or deletion this is not the case,
thankfully.)
I've been tryi
chamalulu schrieb:
Hello.
I think I'm aware of how attribute access is resolved in python. When
referencing a class instance attribute which is not defined in the
scope of the instance, Python looks for a class attribute with the
same name. (For assignment or deletion this is not the case,
thankf
On Jul 1, 5:01 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> On 1 juil, 22:43, Kurda Yon <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I have a class called "vector". And I would like to define a function
> > "dot" which would return a dot product of any two "vectors". I want
> > to call t
Tobiah <[EMAIL PROTECTED]> wrote:
> master,slave1,slave2=zip(*x)
>
> What does the asterisk do here?
>
> Thanks
> ** Posted from http://www.teranews.com **
Instead of passing a single argument x to zip() you can think of it
unpacking the list x and passing len(x) arguments to zip.
So if
Nick Craig-Wood wrote:
[snip]
By definition any function in a functional language will
always produce the same result if given the same arguments, so you can
memoize any function.
Ah, so that's why time.time() seems to be stuck... ;)
Rich
--
http://mail.python.org/mailman/listinfo/python-li
>
> Hi,
>
> I have a class called "vector". And I would like to define a function
> "dot" which would return a dot product of any two "vectors". I want
> to call this function as follow: dot(x,y).
>
> Well, I can define a functions "dot" outside the class and it works
> exactly as I want. However,
I have two 2x2 arrays a & b.
a=(([c,d],[e,f]))
b=(([g,h],[i,j]))
Each of c,d,e,f,g,h,i,j are all 1xN arrays
I want to matrix multiply a & b to create a 2x2 array x, where the elements
of x are created with element-wise math and result in the following:
x[0,0] = c*g+d*i
x[0,1] = c*h+d*j
x[1,0] = e*g
I've embedded Python in an extension for a program we are using here
at work. And I'm a bit stumped as to why I am getting an
AttributeError only in the embedded Python.
First, a bit of what I am doing. We use a simulator for a
microprocessor we are using in our systems. Our simulator allows fo
1 - 100 of 131 matches
Mail list logo