Ori, In my previous post I forgot to join the line with a semi-colon.
The following is a legal -- albeit "unpythonic" -- single line that meets
your requirement:
>>> mycommand = "i = 1\nif i >= 1:\n\tprint 'Test passed'\nelse:\n\tprint
'test failed'"; exec(mycommand)
Test passed
>>>
May the Pyth
>>> mycommand = "i = 1\nif i >= 1:\n\tprint 'Test passed'\nelse:\n\tprint
'test failed'"
>>> exec(mycommand)
Test passed
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ori
Sent: Monday, August 13, 2007 5:23 PM
To: users@lists.ironpython.com
Subject: Re: [
"help", "copyright", "credits" or "license" for more information.
>>> import array
>>> arr = array.array('I')
>>> l = range(12)
>>> l
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
>>> arr.fromlist(l)
>>
of irregularities in representing the newline
sequence, but this is a new one for me. Is this behavior intended?
--Thane
P.S. I've "fixed" the behavior so my IDE works nicely, otherwise it doesn't
recognize the newline.
Thane Plummer
TKP Corp.
No virus found in th
in IPY 2.0
Thane Plummer
TKP Corp.
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.8.14/845 - Release Date: 6/12/2007
6:39 AM
___
users mailing list
users@lists.ironpyth
One problem with A) lies in the ambiguity of the contents of site.py --
portability issues could be large. Also, remember that site.py was
implemented as a solution to give IronPython access to the standard libs.
This may change at some point and solution A) could be deprecated.
-Original Mes
Here's how I implement intellisense in Python. This is very easy for an
interactive command line, and a bit trickier for an editor. The code was
gleaned from an Idle implementation, and I haven't changed it in years. It
works fine with both CPython and IronPython, returning both the stdlib and
.
Have you looked at the code for tab completion?
Ipy.exe -X:TabCompletion
On the other hand, why not write it in Python? It works for me.
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Blesson Varghese
Sent: Tuesday, November 28, 2006 1:58 AM
To: users@lists.iro
The md5 is a known issue; I know Seo has code, but I seem to recall a post
saying that it didn't work (http://sparcs.kaist.ac.kr/~tinuviel/fepy/lib ).
Kevin Chu posted an md5 module to this list - you might give try using that
before spending too much time investigating your sys.path.
--Thane
-
Here's a link to the Udell video:
http://weblog.infoworld.com/udell/screenroom/ironpython_wmv.html
An excellent overview of ipy by Jim.
At the risk of sounding redundant, thanks to the entire IronPython team for
creating such a great 1.0 release!
"import this"
_
From: [E
My vote is to keep Python pure, i.e. import SomeGeneric_TT or foo =
TwoParamGeneric<<2 are simply un-Pythonic.
It is amusing that the .NET framework has incorporated a feature
--Generics-- that make it more useful, and indeed more like Python, and the
Python community is now trying to emulate a so
The C++ guys would be glad to provide you with pointers.
The Managed C++ people will give you pointers, but only safe ones.
The C# group will give you pointers, but only if they _really_ have to.
The Python group gives you pointers all the time, but you're never really
aware of it.
But seriously .
12 matches
Mail list logo