Re: argparse for cygwin python

2012-01-17 Thread Rick Rankin




- Original Message -
> From: Jason Tishler 
> To: xxx@xxx
> Cc: 
> Sent: Tuesday, January 17, 2012 11:23 AM
> Subject: Re: argparse for cygwin python
> 
> On Tue, Jan 17, 2012 at 01:04:46PM -0500, LMH wrote:
>>  I have a python script and when I try to run it I get an error for no 
>>  such module, "ImportError: No module named argparse".
>> 
>>  [snip]
>> 
>>  Any suggestions?
> 
> See the following:
> 
>     http://docs.python.org/dev/library/argparse.html
> 
> argparse is not available until Python 3.2; Cygwin Python is 2.6.
> 

No, argparse is included as a standard package in Python 2.7. I use it all the 
time. It was introduced in Python 3.x, then backported, IIRC. I keep hoping 
Cygwin's python maintainer will update to at least 2.7 ;-)

--Rick


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Don't want executive attribute

2012-01-17 Thread Pan ruochen
> Like it or not, it's how Windows works. There's no exact match for
> "executable" attribute behavior, as it is on *NIX systems.
> If you tell us, what is your real problem/what you want to achieve, we may be
> able to help you.
>

Actually I don't have any problem about this.
I just want cygwin more colorful as most of *NIX terminals do, i.e.
red for tar/zip files, green for executables.
And I notice that if I touch a new file on cygiwn, the new-created
file has no executable attribute.
Based on that, I wonder whether I can change the default attributes
for files which have existed before cygwin is installed.

-- 
Best Regards,
Pan Ruochen

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Can't install cygwin, but can visit the URL

2012-01-17 Thread Pan ruochen
I successfully installed cygwin simply using Internet Explorer Proxy Settings.
Many thanks all your guys for kindly suggestions.

On Tue, Jan 17, 2012 at 6:11 PM, Johan van den Berg
 wrote:
> See
>
> http://cygwin.com/faq-nochunks.html#faq.setup.cli
>
> regarding how to specify --proxy / -p as a command line option to setup.exe 
> so that
> you would be able to specify a proxy for setup.exe to use.
>
> Kind regards
> Johan



-- 
Best Regards,
Pan Ruochen

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Robert F
Larry Hall (Cygwin  cygwin.com> writes:

> So you're saying the snapshot exhibits the above behavior?
> 


No, this was happening pre and post snapshot.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Larry Hall (Cygwin)

On 1/17/2012 6:24 PM, Robert F wrote:

Larry Hall (Cygwin  cygwin.com>  writes:




Your advice did solve the problem, thanks!  I wonder which specific entry in the
changelog did it...


Great!  I thought you might at least see some different behavior.  There has
been a fair bit of work done in this area for the upcoming release, which
will be "soon".


The unwillignness to show any text until it finds a newline seems it could be a
cygwin issue.  Taking the following code:

#ifndef __CYGWIN__
#define SLEEP _sleep(2000)
#else
#define SLEEP sleep(2)
#endif
#include
#include
int main() {
  int i;
  while(1) {
   for(i = 0; i<  5; i++) {
printf("%c", 'a'+i);
SLEEP;
   }
   SLEEP;
   printf("\n");
  }
}

When built in visual C++, it will show 'a', 'b', 'c' etc every 2 seconds.  When
built in cygwin with gcc, it will show 'abcde' every 10 seconds.  The latter
happens whether I run it from a bash console or windows console.

I'll start a new thread for this if noone off-handedly has the answer...


So you're saying the snapshot exhibits the above behavior?


--
Larry

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Larry Hall (Cygwin)

On 1/17/2012 5:34 PM, Robert F wrote:



This has me stumped.


I'd suggest trying a snapshot -

If that doesn't help, a full problem report might help someone on the list
spot an issue.


Problem reports:   http://cygwin.com/problems.html





I might give the snapshot a shot.  Do you know how far from the release build
the latest snapshot is and when the next one is planned?

Is "full problem report" a technical term?  It's not on the page you link.  I
thought my report was detailed enough, and I can provide more info if anyone
needs it.  I've tried posting to the mailing list but my emails are rejected
from there without explanation (yes I've received the 'welcome to the list'
email :( ).


You're talking to the list now, though I can see that you've resorted to
gmane.  No problem.

The page describing the requirements of a problem report is the link I have
above.  Your description of the problem is fine but we had no cygcheck
info or code to try.  That's all I was pointing out.  The link in question
requests these kinds of things.

--
Larry

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Robert F
Larry Hall (Cygwin  cygwin.com> writes:
>

Your advice did solve the problem, thanks!  I wonder which specific entry in the
changelog did it...

The unwillignness to show any text until it finds a newline seems it could be a
cygwin issue.  Taking the following code:

#ifndef __CYGWIN__
#define SLEEP _sleep(2000)
#else
#define SLEEP sleep(2)
#endif
#include 
#include 
int main() {
 int i;
 while(1) {
  for(i = 0; i < 5; i++) {
   printf("%c", 'a'+i);
   SLEEP;
  }
  SLEEP;
  printf("\n");
 }
}

When built in visual C++, it will show 'a', 'b', 'c' etc every 2 seconds.  When
built in cygwin with gcc, it will show 'abcde' every 10 seconds.  The latter
happens whether I run it from a bash console or windows console.

I'll start a new thread for this if noone off-handedly has the answer...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Robert F
Robert F  hotmail.co.uk> writes:

> 
> 
> > I might give the snapshot a shot.  Do you know how far from the release 
> > build
> > the latest snapshot is and when the next one is planned?
> > 
> 
> Update: I did a flat replacement of cygwin1.dll with the latest snapshot of it
> and all my cygwin apps go apesh*t.  Is it because I didn't update the whole
> environment?
> 
> 


Sorry for spamming, it was simply that I tried running an app in an
already-started bash console, instead of restarting it with the new dll. :) 
Will let you know if the bug manifests again.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Robert F

> I might give the snapshot a shot.  Do you know how far from the release build
> the latest snapshot is and when the next one is planned?
> 

Update: I did a flat replacement of cygwin1.dll with the latest snapshot of it
and all my cygwin apps go apesh*t.  Is it because I didn't update the whole
environment?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Robert F

> > This has me stumped.
> 
> I'd suggest trying a snapshot - 
> 
> If that doesn't help, a full problem report might help someone on the list
> spot an issue.
> 
> > Problem reports:   http://cygwin.com/problems.html
> 


I might give the snapshot a shot.  Do you know how far from the release build
the latest snapshot is and when the next one is planned?

Is "full problem report" a technical term?  It's not on the page you link.  I
thought my report was detailed enough, and I can provide more info if anyone
needs it.  I've tried posting to the mailing list but my emails are rejected
from there without explanation (yes I've received the 'welcome to the list'
email :( ).


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Larry Hall (Cygwin)

On 1/17/2012 5:25 PM, Larry Hall (Cygwin) wrote:

On 1/17/2012 5:16 PM, Robert F wrote:

This could be a cygwin bug, but I'm not 100% sure. It may even be a weird
interaction with the windows console.

I have a single threaded app that loops, polls network activity with a
'select'
function and interrupts the flow of the loop when a SIGALRM signal is ran,
the
handler of which sets a variable that the loop responds to.

While this app more-or-less ran fine in its native linux environment, when
trying to run it at home in cygwin a problem occurs. Basically, between about
2-100 seconds of starting the process (on average), the alarm signal never
runs
as scheduled and never runs again, except for one more time when I hit CTRL+C
(which I know by inserting debugging output into the signal handler).

The funny thing is the app happily continues looping and calling the 'select'
function, it just never gets interrupted by an alarm signal. The select
function
handles cases of EINTR where it was interrupted by an alarm, btw (sockets are
nonblocking and timeout is 1 second).

Now here's the REALLY weird bit. IF I insert a printf (with newline
terminated
string) after the select function, _the problem never occurs_. If there's no
newline, the printed strings are buffered without being shown, until either a
newline arrives or I hit CTRL-C.

Doesn't work if I put it before the select function, only after.

I haven't included any io streams into the fd_sets passed to the select
function, in case you were wondering. They are zeroed and then only receive
network connections.

This has me stumped.


I'd suggest trying a snapshot - 

   ^^^
   http://cygwin.com/snapshots/


If that doesn't help, a full problem report might help someone on the list
spot an issue.


Problem reports: http://cygwin.com/problems.html





--
Larry

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Larry Hall (Cygwin)

On 1/17/2012 5:16 PM, Robert F wrote:

This could be a cygwin bug, but I'm not 100% sure.  It may even be a weird
interaction with the windows console.

I have a single threaded app that loops, polls network activity with a 'select'
function and interrupts the flow of the loop when a SIGALRM signal is ran, the
handler of which sets a variable that the loop responds to.

While this app more-or-less ran fine in its native linux environment, when
trying to run it at home in cygwin a problem occurs. Basically, between about
2-100 seconds of starting the process (on average), the alarm signal never runs
as scheduled and never runs again, except for one more time when I hit CTRL+C
(which I know by inserting debugging output into the signal handler).

The funny thing is the app happily continues looping and calling the 'select'
function, it just never gets interrupted by an alarm signal. The select function
handles cases of EINTR where it was interrupted by an alarm, btw (sockets are
nonblocking and timeout is 1 second).

Now here's the REALLY weird bit. IF I insert a printf (with newline terminated
string) after the select function, _the problem never occurs_.  If there's no
newline, the printed strings are buffered without being shown, until either a
newline arrives or I hit CTRL-C.

Doesn't work if I put it before the select function, only after.

I haven't included any io streams into the fd_sets passed to the select
function, in case you were wondering. They are zeroed and then only receive
network connections.

This has me stumped.


I'd suggest trying a snapshot - 

If that doesn't help, a full problem report might help someone on the list
spot an issue.


Problem reports:   http://cygwin.com/problems.html


--
Larry

_

A: Yes.

Q: Are you sure?

A: Because it reverses the logical flow of conversation.

Q: Why is top posting annoying in email?


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread Larry Hall (Cygwin)

On 1/17/2012 12:57 PM, marco atzeri wrote:

On 1/17/2012 6:36 PM, Tom Chiverton wrote:

On 17 January 2012 15:23, Corinna Vinschen wrote:

This sounds as if you made an update without stopping all Cygwin
processes. Do you have some Cygwin services like sshd running?


Could well be that.
Is the setup.exe meant to check that ? If not, I think it should.


Eetup checks and advise; you can override, but it is not recommended
and you need to reboot to allow windows replace cygwin1.dll that
was in use.

For the other issue
2 [main] bash 5320 c:\cygwin\bin\bash.exe: *** fatal error - couldn't allo
cate heap, Win32 error 487, base 0x4E, top 0x55, reserve_size
454656, al
locsize 458752, page_const 4096

the usual suggestion is "rebaseall" from dash shell


I'd recommend a reboot before doing the rebaseall.  If there's a replace
of the new cygwin1.dll pending, best to get that in place first.  Then
you can check if you see the same error again and rebase as required.

--
Larry

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Madness with the 'select' function, sigalrm, and stdout. (CYGWIN_NT-6.1-WOW64)

2012-01-17 Thread Robert F
This could be a cygwin bug, but I'm not 100% sure.  It may even be a weird
interaction with the windows console.

I have a single threaded app that loops, polls network activity with a 'select'
function and interrupts the flow of the loop when a SIGALRM signal is ran, the
handler of which sets a variable that the loop responds to.

While this app more-or-less ran fine in its native linux environment, when
trying to run it at home in cygwin a problem occurs. Basically, between about
2-100 seconds of starting the process (on average), the alarm signal never runs
as scheduled and never runs again, except for one more time when I hit CTRL+C
(which I know by inserting debugging output into the signal handler).

The funny thing is the app happily continues looping and calling the 'select'
function, it just never gets interrupted by an alarm signal. The select function
handles cases of EINTR where it was interrupted by an alarm, btw (sockets are
nonblocking and timeout is 1 second).

Now here's the REALLY weird bit. IF I insert a printf (with newline terminated
string) after the select function, _the problem never occurs_.  If there's no
newline, the printed strings are buffered without being shown, until either a
newline arrives or I hit CTRL-C.

Doesn't work if I put it before the select function, only after.

I haven't included any io streams into the fd_sets passed to the select
function, in case you were wondering. They are zeroed and then only receive
network connections.

This has me stumped.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: argparse for cygwin python

2012-01-17 Thread Yaakov (Cygwin/X)
On Tue, 2012-01-17 at 13:23 -0500, Jason Tishler wrote:
> See the following:
> 
> http://docs.python.org/dev/library/argparse.html
> 
> argparse is not available until Python 3.2; Cygwin Python is 2.6.

It is also in 2.7, FWIW.  But it can also be installed separately for
older versions of Python:

http://pypi.python.org/pypi/argparse

Cygwin Ports provides a python-argparse package.


Yaakov



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: argparse for cygwin python

2012-01-17 Thread Jason Tishler
On Tue, Jan 17, 2012 at 01:04:46PM -0500, LMH wrote:
> I have a python script and when I try to run it I get an error for no 
> such module, "ImportError: No module named argparse".
> 
> [snip]
> 
> Any suggestions?

See the following:

http://docs.python.org/dev/library/argparse.html

argparse is not available until Python 3.2; Cygwin Python is 2.6.

Jason

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



what happened to [PATCH] setup -e, --separate-src-dirs option (http://sourceware.org/ml/cygwin-apps/2011-12/msg00022.html)

2012-01-17 Thread Hans Horn

As subject line says.
As far as I recall, this got a lot of +1 votes.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: argparse for cygwin python

2012-01-17 Thread LMH

Thanks for the information, but that didn't fix the issue.

There is now a file argparse.py located in,

cygwin\lib\python2.6\site-packages\stgit

but I am still getting the error. Do I need to restart or something, or 
do I need to do something else to let python know where the package is?


LMH



marco atzeri wrote:

On 1/17/2012 7:04 PM, LMH wrote:

I have a python script and when I try to run it I get an error for no
such module, "ImportError: No module named argparse".

The only package I have installed is numpy, but I don't see argparse
mentioned in any of the other packages. I have run this script on this
computer before, but I don't remember if I have re-installed cygwin
since then. I thought that argparse was in the python standard library,
so I don't know if the issues is a dependency or something else.

Here are the first few lines of the script,

#! /usr/bin/python2.6

import argparse
from time import time

#USAGE: python dif.py --filename [filename] --columns [0,1,2,...]
#COLUMNS START FROM INDEX 0

parser = argparse.ArgumentParser(description='..')
parser.add_argument('--filename', dest='filename', help='input file
name')
parser.add_argument('--columns', dest='col', help='columns to be
neglected')
args = parser.parse_args()
col = [int(i) for i in args.col.split(',')]


Any suggestions?

LMH


use the package search
http://cygwin.com/packages/

the outcome
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=argparse

suggests that it is a module of stgit

Regards
Marco

--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Another example of intermittent shell failure...

2012-01-17 Thread marco atzeri

On 1/17/2012 5:10 PM, Paul Breslin wrote:

   0 [main] sh 2272 exception::handle: Exception: STATUS_ACCESS_VIOLATION
 630 [main] sh 2272 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
   0 [main] sh 3392 exception::handle: Exception: STATUS_ACCESS_VIOLATION
 808 [main] sh 3392 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
   0 [main] sh 6388 exception::handle: Exception: STATUS_ACCESS_VIOLATION
 727 [main] sh 6388 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
   0 [main] sh 9316 exception::handle: Exception: STATUS_ACCESS_VIOLATION
 446 [main] sh 9316 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
   0 [main] sh 1872 exception::handle: Exception: STATUS_ACCESS_VIOLATION
 851 [main] sh 1872 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
   0 [main] sh 9160 exception::handle: Exception: STATUS_ACCESS_VIOLATION
 424 [main] sh 9160 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
   0 [main] sh 3784 fork: child -1 - died waiting for longjmp before 
initialization, retry 0, exit code 0x600, errno 11
/bin/sh: fork: retry: Resource temporarily unavailable


fork issues are usually solved with rebaseall,
additionally you can also try a recent snapshots

http://cygwin.com/snapshots/


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: argparse for cygwin python

2012-01-17 Thread marco atzeri

On 1/17/2012 7:04 PM, LMH wrote:

I have a python script and when I try to run it I get an error for no
such module, "ImportError: No module named argparse".

The only package I have installed is numpy, but I don't see argparse
mentioned in any of the other packages. I have run this script on this
computer before, but I don't remember if I have re-installed cygwin
since then. I thought that argparse was in the python standard library,
so I don't know if the issues is a dependency or something else.

Here are the first few lines of the script,

#! /usr/bin/python2.6

import argparse
from time import time

#USAGE: python dif.py --filename [filename] --columns [0,1,2,...]
#COLUMNS START FROM INDEX 0

parser = argparse.ArgumentParser(description='..')
parser.add_argument('--filename', dest='filename', help='input file name')
parser.add_argument('--columns', dest='col', help='columns to be
neglected')
args = parser.parse_args()
col = [int(i) for i in args.col.split(',')]


Any suggestions?

LMH


use the package search
http://cygwin.com/packages/

the outcome
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=argparse

suggests that it is a module of stgit

Regards
Marco

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



argparse for cygwin python

2012-01-17 Thread LMH
I have a python script and when I try to run it I get an error for no 
such module, "ImportError: No module named argparse".


The only package I have installed is numpy, but I don't see argparse 
mentioned in any of the other packages. I have run this script on this 
computer before, but I don't remember if I have re-installed cygwin 
since then. I thought that argparse was in the python standard library, 
so I don't know if the issues is a dependency or something else.


Here are the first few lines of the script,

#! /usr/bin/python2.6

import argparse
from time import time

#USAGE: python dif.py --filename [filename] --columns [0,1,2,...]
#COLUMNS START FROM INDEX 0

parser = argparse.ArgumentParser(description='..')
parser.add_argument('--filename', dest='filename', help='input file name')
parser.add_argument('--columns', dest='col', help='columns to be neglected')
args = parser.parse_args()
col = [int(i) for i in args.col.split(',')]


Any suggestions?

LMH

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread marco atzeri

On 1/17/2012 6:36 PM, Tom Chiverton wrote:

On 17 January 2012 15:23, Corinna Vinschen wrote:

This sounds as if you made an update without stopping all Cygwin
processes.  Do you have some Cygwin services like sshd running?


Could well be that.
Is the setup.exe meant to check that ? If not, I think it should.

--
Tom



Eetup checks and advise; you can override, but it is not recommended
and you need to reboot to allow windows replace cygwin1.dll that
was in use.

For the other issue
2 [main] bash 5320 c:\cygwin\bin\bash.exe: *** fatal error - couldn't allo
cate heap, Win32 error 487, base 0x4E, top 0x55, reserve_size 
454656, al

locsize 458752, page_const 4096

the usual suggestion is "rebaseall" from dash shell

Marco

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread Tom Chiverton
On 17 January 2012 15:23, Corinna Vinschen wrote:
> This sounds as if you made an update without stopping all Cygwin
> processes.  Do you have some Cygwin services like sshd running?

Could well be that.
Is the setup.exe meant to check that ? If not, I think it should.

--
Tom

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Another example of intermittent shell failure...

2012-01-17 Thread Paul Breslin
  0 [main] sh 2272 exception::handle: Exception: STATUS_ACCESS_VIOLATION
630 [main] sh 2272 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
  0 [main] sh 3392 exception::handle: Exception: STATUS_ACCESS_VIOLATION
808 [main] sh 3392 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
  0 [main] sh 6388 exception::handle: Exception: STATUS_ACCESS_VIOLATION
727 [main] sh 6388 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
  0 [main] sh 9316 exception::handle: Exception: STATUS_ACCESS_VIOLATION
446 [main] sh 9316 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
  0 [main] sh 1872 exception::handle: Exception: STATUS_ACCESS_VIOLATION
851 [main] sh 1872 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
  0 [main] sh 9160 exception::handle: Exception: STATUS_ACCESS_VIOLATION
424 [main] sh 9160 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
  0 [main] sh 3784 fork: child -1 - died waiting for longjmp before 
initialization, retry 0, exit code 0x600, errno 11
/bin/sh: fork: retry: Resource temporarily unavailable
1019187 [main] sh 1456 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1019920 [main] sh 1456 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
1113661 [main] sh 5172 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1114160 [main] sh 5172 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
1214360 [main] sh 5200 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1214880 [main] sh 5200 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
1306174 [main] sh 7072 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1306763 [main] sh 7072 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
1404154 [main] sh 9508 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1404797 [main] sh 9508 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
1489409 [main] sh 6328 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1489970 [main] sh 6328 open_stackdumpfile: Dumping stack trace to 
sh.exe.stackdump
1581589 [main] sh 3784 fork: child -1 - died waiting for longjmp before 
initialization, retry 0, exit code 0x600, errno 11

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Can't install cygwin, but can visit the URL

2012-01-17 Thread Larry Hall (Cygwin)

On 1/17/2012 5:11 AM, Johan van den Berg wrote:

On Tue, Jan 17, 2012 at 3:20 PM, Johan van den Berg
  wrote:


Do you have a proxy configuration in your browser?

Regards
Johan


On 17 Jan 2012, at 9:44 AM, Pan ruochen wrote:
Yes, I do. So it is the cause?


See

http://cygwin.com/faq-nochunks.html#faq.setup.cli

regarding how to specify --proxy / -p as a command line option to setup.exe so 
that
you would be able to specify a proxy for setup.exe to use.


You can also specify this option in the GUI.  Choose the "Use IE5 Settings"
or "Use HTTP/FTP Proxy:" options, depending on your local configuration and
needs.

--
Larry

_

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread Corinna Vinschen
On Jan 17 15:13, Tom Chiverton wrote:
> On 17 January 2012 13:26, marco atzeri  wrote:
> > your cygwin dll is 1.7.7 while last one is 1.7.9,
> > so your update did not work.
> 
> Hmm. I'm just re-running the (latest) setup.exe - what else should I do ?
> In c:\cygwin\bin I found a cygwin1.dll.new with version 1007.9.0.0 as
> well as one with the right name, version 1007.7.0.0.
> 
> If I swap to using the 1007.9 one by changing the names, bash stared
> from the command line just seg faults...
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> 
> C:\Documents and Settings\tchiverton>c:\cygwin\bin\bash
> tchiverton@EV34:tchiverton$ /bin/bash
>   2 [main] bash 5320 c:\cygwin\bin\bash.exe: *** fatal error - couldn't 
> allo
> cate heap, Win32 error 487, base 0x4E, top 0x55, reserve_size 454656, 
> al
> locsize 458752, page_const 4096
> Stack trace:
> Frame Function  Args
> 0022E4C0  6102796B  (0022E4C0, , , )
> 0022E7B0  6102796B  (6117EC60, 8000, , 61180977)
> 0022F7E0  61004F1B  (611B66CC, 004E, 0055, 0006F000)
> 0022F810  6106E8C3  (7FFE, 0007, 0003, 7C90DA0A)
> 0022F900  610C133B  (07C8, 0200, 6116A724, 6116A720)
> 0022F930  610064C0  (, 0002, , )
> 0022F9F0  6106FC15  (6100, 0001, 0022FD30, 6106F960)
> 0022FA10  7C90118A  (6106F960, 6100, 0001, 0022FD30)
> 0022FB18  7C91B5D2  (0022FD30, 7FFDF000, 7FFD9000, )
> 0022FC94  7C91FBDC  (0022FD30, 7C90, 0022FCE0, 7C90E900)
> 0022FD1C  7C91FAD7  (0022FD30, 7C90, , 00010017)
> End of stack trace
>   0 [main] bash 4120 fork: child -1 - died waiting for longjmp before 
> initia
> lization, retry 0, exit code 0x100, errno 11
> bash: fork: retry: Resource temporarily unavailable
> tchiverton@EV34:tchiverton$
> 
> This does not happen if I run Bash again from CMD (!)
> Though I can now run ls and get output !

This sounds as if you made an update without stopping all Cygwin
processes.  Do you have some Cygwin services like sshd running?
You should stop all Cygwin processes, even using TaskManager if
necessary, then make sure you only have one Cygwin DLL called
cygwin1.dll, preferredly the 1.7.9 DLL, and only then start a
fresh Cygwin process.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread Tom Chiverton
On 17 January 2012 13:26, marco atzeri  wrote:
> your cygwin dll is 1.7.7 while last one is 1.7.9,
> so your update did not work.

Hmm. I'm just re-running the (latest) setup.exe - what else should I do ?
In c:\cygwin\bin I found a cygwin1.dll.new with version 1007.9.0.0 as
well as one with the right name, version 1007.7.0.0.

If I swap to using the 1007.9 one by changing the names, bash stared
from the command line just seg faults...
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\tchiverton>c:\cygwin\bin\bash
tchiverton@EV34:tchiverton$ /bin/bash
  2 [main] bash 5320 c:\cygwin\bin\bash.exe: *** fatal error - couldn't allo
cate heap, Win32 error 487, base 0x4E, top 0x55, reserve_size 454656, al
locsize 458752, page_const 4096
Stack trace:
Frame Function  Args
0022E4C0  6102796B  (0022E4C0, , , )
0022E7B0  6102796B  (6117EC60, 8000, , 61180977)
0022F7E0  61004F1B  (611B66CC, 004E, 0055, 0006F000)
0022F810  6106E8C3  (7FFE, 0007, 0003, 7C90DA0A)
0022F900  610C133B  (07C8, 0200, 6116A724, 6116A720)
0022F930  610064C0  (, 0002, , )
0022F9F0  6106FC15  (6100, 0001, 0022FD30, 6106F960)
0022FA10  7C90118A  (6106F960, 6100, 0001, 0022FD30)
0022FB18  7C91B5D2  (0022FD30, 7FFDF000, 7FFD9000, )
0022FC94  7C91FBDC  (0022FD30, 7C90, 0022FCE0, 7C90E900)
0022FD1C  7C91FAD7  (0022FD30, 7C90, , 00010017)
End of stack trace
  0 [main] bash 4120 fork: child -1 - died waiting for longjmp before initia
lization, retry 0, exit code 0x100, errno 11
bash: fork: retry: Resource temporarily unavailable
tchiverton@EV34:tchiverton$

This does not happen if I run Bash again from CMD (!)
Though I can now run ls and get output !

Did I manage to get a broken update at some point then ?
Can I recover, apart from deleting c:\cygwin and reinstall ?

>> If I type just 'ls', not output. Same for 'ls bin' when I know that
>> folder has stuff in. 'ls bin[tab][tab]' shows the files as expected:
>> tchiverton@EV34:~$ ls
> so you are in your own home directory, that was not clear from
> your description.
> How are you running the shell and which is ?

I can replicate by just opening a Windows command prompt, run
c:\cygwin\bin\bash and then use '/bin/ls' as PATH seems wrong.
I normally use a short cut in the start menu that has a 'target' of
"C:\cygwin\bin\rxvt.exe -geometry 100x50 -sl 1500 -fn "Inconsolata-14"
-bg black -fg grey -sr -e c:\cygwin\bin\bash --login -i" though.

> what is the output of "ls -la ." ?

Nothing. "ls -la .[tab]" works as expected though.

> Have you problems or messed with the files:
> /etc/passwd
> /etc/group

Nope.
I looked in them, and they seem OK.
Running 'id' doesn't produce output either, so I guess that is why
it's not in the check output.

-- 
Tom

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread marco atzeri

On 1/17/2012 1:52 PM, Tom Chiverton wrote:

And here is a report of the message. Let's see if that works OK now
the attachment is in the archive :

ls on my Windows XP box recently stopped working. Running an update
from the latest setup.exe hasn't helped.


your cygwin dll is 1.7.7 while last one is 1.7.9,
so your update did not work.



If I type just 'ls', not output. Same for 'ls bin' when I know that
folder has stuff in. 'ls bin[tab][tab]' shows the files as expected:
tchiverton@EV34:~$ ls


so you are in your own home directory, that was not clear from
your description.
How are you running the shell and which is ?


tchiverton@EV34:~$ ls bin
tchiverton@EV34:~$ ls bin/

> findEmptySvnDirs.sh  sync-mp3.sh
> tchiverton@EV34:~$ ls bin/

what is the output of "ls -la ." ?



Attached is cygcheck output run from a bash prompt, it moaned a little when run:
tchiverton@EV34:~$ cygcheck -s -v -r>  /cygdrive/c/cygcheck.txt
garbled output from 'id' command - no uid= found


that is likely the issue.
On the cygcheck output, after the PATH and before

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

you should have something like

Output from C:\cygwin\bin\id.exe
UID: 1008(marco)GID: 513(None)
513(None)   0(root) 544(Administrators) 545(Users)

Have you problems or messed with the files:
/etc/passwd
/etc/group

Regards
Marco

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Don't want executive attribute

2012-01-17 Thread Andrey Repin
Greetings, Pan ruochen!

> Cygwin treat most of files executive. But I really don't like this
> feature. Is there any option to disable it?

Like it or not, it's how Windows works. There's no exact match for
"executable" attribute behavior, as it is on *NIX systems.
If you tell us, what is your real problem/what you want to achieve, we may be
able to help you.


--
WBR,
Andrey Repin (anrdae...@freemail.ru) 17.01.2012, <17:00>

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread Tom Chiverton
And here is a report of the message. Let's see if that works OK now
the attachment is in the archive :

ls on my Windows XP box recently stopped working. Running an update
from the latest setup.exe hasn't helped.

If I type just 'ls', not output. Same for 'ls bin' when I know that
folder has stuff in. 'ls bin[tab][tab]' shows the files as expected:
tchiverton@EV34:~$ ls
tchiverton@EV34:~$ ls bin
tchiverton@EV34:~$ ls bin/
findEmptySvnDirs.sh  sync-mp3.sh
tchiverton@EV34:~$ ls bin/

Attached is cygcheck output run from a bash prompt, it moaned a little when run:
tchiverton@EV34:~$ cygcheck -s -v -r > /cygdrive/c/cygcheck.txt
garbled output from 'id' command - no uid= found

-- 
Tom

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



/etc/profile set $TMP to /tmp. It's insecure!

2012-01-17 Thread Atry
Original $TMP and $TEMP is unset in /etc/defaults/etc/skel/.bashrc
version 3.9-3, which make %USERPROFILE% directory dirty. After some
disscuss at http://cygwin.com/ml/cygwin/2011-03/msg00211.html,
/etc/profile version 4.0-6 set $TMP and $TEMP to /tmp. Now any program
start from bash, create temporary files in /tmp, or C:\cygwin\tmp.

Cygwin program, which approves /tmp 's mode 1777, creates temporary
files with mode 400. That's OK.

Native Win32 program, which ignores /tmp 's mode 1777, creates
temporary files with mode 755. These files can be read from any user.
Win32 process may leak internal data, cause potential privilege
escalation attack.

I suggest that set $tmp (lowercase) to original $TMP, which is
meaningless for cygwin programs, and is recognized for Win32 programs.

Proposed settings in /etc/profile:

ORIGINAL_TMP=$TMP
ORIGINAL_TEMP=$TEMP
unset TMP TEMP
export tmp=`cygpath -w "$ORIGINAL_TMP"`
export temp=`cygpath -w "$ORIGINAL_TEMP"`

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread marco atzeri

On 1/17/2012 11:35 AM, Tom Chiverton wrote:

Problem reports:   http://cygwin.com/problems.html


I thought I had, sorry. There's an attachment on the initial post and
I've included my native O/S version, and mentioned I'm using the
latest release.
What did I miss ?



I do not see your initial post on the archive
http://cygwin.com/ml/cygwin/2012-01/threads.html

Is eventually blocked/rejected by mailing list filters ?

Regards
Marco

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread Tom Chiverton
> Problem reports:       http://cygwin.com/problems.html

I thought I had, sorry. There's an attachment on the initial post and
I've included my native O/S version, and mentioned I'm using the
latest release.
What did I miss ?

-- 
Tom

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Can't install cygwin, but can visit the URL

2012-01-17 Thread Johan van den Berg
> On Tue, Jan 17, 2012 at 3:20 PM, Johan van den Berg
>  wrote:
>> 
>> Do you have a proxy configuration in your browser?
>> 
>> Regards
>> Johan
> 
> On 17 Jan 2012, at 9:44 AM, Pan ruochen wrote:
> Yes, I do. So it is the cause?

See 

http://cygwin.com/faq-nochunks.html#faq.setup.cli 

regarding how to specify --proxy / -p as a command line option to setup.exe so 
that 
you would be able to specify a proxy for setup.exe to use.

Kind regards
Johan

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread marco atzeri

On 1/17/2012 10:34 AM, Tom Chiverton wrote:

On 16 January 2012 09:40, Tom Chiverton  wrote:

ls on my Windows XP box recently stopped working. Running an update
from the latest setup.exe hasn't helped.


Do I need to provide any more info to help ? Is this an obvious
problem the FAQ and Google don't locate for me ?




please follow the guidelines at

Problem reports:   http://cygwin.com/problems.html

this will help us to understand your problem


Regards
Marco

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Don't want executive attribute

2012-01-17 Thread marco atzeri

On 1/17/2012 10:32 AM, Pan ruochen wrote:

Hi Al,

Cygwin treat most of files executive. But I really don't like this
feature. Is there any option to disable it?



which files ? Your question is not very clear.

Please read documentation

http://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-perm
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-files

on how cygwin try to emulate POSIX permissions on windows ACL permissions.

Regards
Marco

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: ls does not show any output

2012-01-17 Thread Tom Chiverton
On 16 January 2012 09:40, Tom Chiverton  wrote:
> ls on my Windows XP box recently stopped working. Running an update
> from the latest setup.exe hasn't helped.

Do I need to provide any more info to help ? Is this an obvious
problem the FAQ and Google don't locate for me ?

-- 
Tom

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Don't want executive attribute

2012-01-17 Thread Pan ruochen
Hi Al,

Cygwin treat most of files executive. But I really don't like this
feature. Is there any option to disable it?

-- 
Best Regards,
Pan Ruochen

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple