"Dave Angel" wrote:
Why would you write some C-program just to save having two separate
files, one batch and one for the script? For that matter, several
answers have given you approaches that didn't involve list
comprehensions, including merging the two in a single file, using an
initial vari
On 10/11/2012 09:40 AM, Gisle Vanem wrote:
> "Dave Angel" wrote:
>
>> it has nothing to do with being on a command line. You're using
>> semicolon to combine several statements, and there are restrictions on
>> what can be combined that way. One restriction is the looping
>> constructs, for, if,
Chris Angelico wrote:
> On Fri, Oct 12, 2012 at 3:49 AM, Gisle Vanem wrote:
> > wrote in comp.lang.python
> >
> > (my ISP no longer updates this group. Last message is from 8. April.
> > Does the postings to the python mailing-list automatically get reposted to
> > comp.lang.python?)
>
> Yes, c.
On Fri, Oct 12, 2012 at 3:49 AM, Gisle Vanem wrote:
> wrote in comp.lang.python
>
> (my ISP no longer updates this group. Last message is from 8. April.
> Does the postings to the python mailing-list automatically get reposted to
> comp.lang.python?)
Yes, c.l.p and python-list mirror each other.
wrote in comp.lang.python
(my ISP no longer updates this group. Last message is from 8. April.
Does the postings to the python mailing-list automatically get reposted
to comp.lang.python?)
C:\Windows\system32\python32.zip
c:\python32\DLLs
I see a similar result:
f:\Windows\system32\python
On Fri, Oct 12, 2012 at 3:24 AM, wrote:
> Le jeudi 11 octobre 2012 15:16:33 UTC+2, Ramchandra Apte a écrit :
>
> PS C:\> $cmd="import sys;"
> PS C:\> $cmd+="print('\n'.join(sys.path))"
> PS C:\> $cmd
> import sys;print('\n'.join(sys.path))
> PS C:\> c:\python32\python -c $cmd
>
> C:\Windows\syste
Le jeudi 11 octobre 2012 15:16:33 UTC+2, Ramchandra Apte a écrit :
PS C:\> $cmd="import sys;"
PS C:\> $cmd+="print('\n'.join(sys.path))"
PS C:\> $cmd
import sys;print('\n'.join(sys.path))
PS C:\> c:\python32\python -c $cmd
C:\Windows\system32\python32.zip
c:\python32\DLLs
c:\python32\lib
c:\pytho
"Dave Angel" wrote:
it has nothing to do with being on a command line. You're using
semicolon to combine several statements, and there are restrictions on
what can be combined that way. One restriction is the looping
constructs, for, if, while.
Ok, I suspected something like that.
You can
On Fri, Oct 12, 2012 at 12:16 AM, Ramchandra Apte
wrote:
> What about the "Power" in PowerShell?
What about it? Are you suggesting that the OP use it? Are you saying
that Windows batch already includes it? You quoted my entire post
(double-spaced), but that context adds nothing to your statement;
On Thursday, 11 October 2012 18:44:44 UTC+5:30, Chris Angelico wrote:
> On Thu, Oct 11, 2012 at 11:16 PM, D'Arcy J.M. Cain wrote:
>
> > On Thu, 11 Oct 2012 13:24:22 +0200
>
> > Gisle Vanem wrote:
>
> >
>
> >> Hello list. I'm a newbie when it comes to Python.
>
> >>
>
> >> I'm trying to tur
On Thu, Oct 11, 2012 at 11:16 PM, D'Arcy J.M. Cain wrote:
> On Thu, 11 Oct 2012 13:24:22 +0200
> Gisle Vanem wrote:
>
>> Hello list. I'm a newbie when it comes to Python.
>>
>> I'm trying to turn this:
>>
>> def print_sys_path():
>> i = 0
>> for p in sys.path:
>> print ('sys.path[%
On Thu, 11 Oct 2012 13:24:22 +0200
Gisle Vanem wrote:
> Hello list. I'm a newbie when it comes to Python.
>
> I'm trying to turn this:
>
> def print_sys_path():
> i = 0
> for p in sys.path:
> print ('sys.path[%2d]: %s' % (i, p))
> i += 1
>
> into a one-line python command
On 10/11/2012 07:24 AM, Gisle Vanem wrote:
> Hello list. I'm a newbie when it comes to Python.
>
> I'm trying to turn this:
>
> def print_sys_path():
>i = 0
>for p in sys.path:
> print ('sys.path[%2d]: %s' % (i, p))
> i += 1
>
> into a one-line python command (in a .bat file):
>
>
According to the document
(http://docs.python.org/using/cmdline.html#interface-options),
> When called with -c command, it executes the Python statement(s) given as
> command. Here command may contain multiple statements separated by newlines.
> Leading whitespace is significant in Python statem
14 matches
Mail list logo