Export to GitHub

pyp - issue #7

I ported to cygwin python


Posted on Mar 11, 2012 by Happy Giraffe

I ported this to cywgin python and included a 'bs' for backslash token.

Keep up the great work!

See attached.

What version of the product are you using? On what operating system?

python 2.6 on windows xp, cygwin

Please provide any additional information below.

Attachments

Comment #1

Posted on Mar 12, 2012 by Grumpy Lion

thanks for the port! That's awesome! I don't know if you have the bandwidth, but it would be cool if it's possible to get this running on linux/OSX/cygwin with the same code. I was able to get a single version that was very stable on linux and osx, but i really don't have much experience with cygwin. I was able to avoid any one off statements per operating systems, which I think makes it much more stable. It looks like the main changes were shebang and rerun...if you can elegantly pull this off, we can incorporate your changes into the main version.

thanks,

t

Comment #2

Posted on Mar 13, 2012 by Happy Giraffe

I really enjoyed your talk at PyCON. Your script was so well-written that was easy to port. I think the line with the env problem might be a peculiarity of my outdated cygwin installation. Other than that, there was only a small change to the temporary file path (you had an extra '/'). Otherwise, the only addition was the 'bs' for backslash variable. I didn't change "rerun", though, except for the temporary file path slash issue.

By the way, without cygwin, it is both hopeless and useless to try to port this to Windows DOS since there is a dearth of commandline utilities there anyway.

The only other thing I was going to try to add was to enhance the p.replace() with regular expressions. Finally, and this might be a cygwin issue, but blank spaces in history[0] don't seem to be working out for me. This makes it hard to use xargs as the last step in the pipe chain.

Keep up the great work!

Comment #3

Posted on Mar 14, 2012 by Grumpy Lion

thanks...scheduling was pretty hectic for the talk...with I had another day to prepare! thanks for checking that out. let me investigate the file path. Can you see if a more modern cygwin will pick up the env shebang? If so, we can roll out a native version that will run on mac, linux, and windows...

cheers,

t

Comment #4

Posted on Mar 14, 2012 by Happy Giraffe

It looks like the env problem is deeper than I thought. I upgraded to the latest version of cygwin and it's still there. I will file a bug report with the cygwin developers.

Thanks for sharing all your great work!

Comment #5

Posted on Mar 15, 2012 by Grumpy Lion

thanks for checking that out. please try this beta. you can use "b" or "backslash" for split/join operations. also check out the new --quick_output flag.

Attachments

Comment #6

Posted on Mar 15, 2012 by Grumpy Lion

we'll have a special cygwin section for this type of install in the manual soon...but first verify this works ok.

thanks,

t

Comment #7

Posted on Mar 16, 2012 by Happy Giraffe

I doesn't work due to the /usr/bin/env problem and the extra '/' in the tmp file. These are the main changes I made in your orignal script, besides the 'bs' separator.

Thanks!

Comment #8

Posted on Mar 16, 2012 by Grumpy Lion

sorry about that...I'm working on a single beta to fix all issues at once...please check this one out. It has the temp file fix (i'm surprised this ran fine on linux and osx actually)...and has a quick output option. shebang should work for you now, and is the only difference now with the other beta.

Attachments

Comment #9

Posted on Mar 17, 2012 by Happy Giraffe

This looks good. I haven't tested all of the functionality, but everything looks okay so far.

Comment #10

Posted on May 16, 2012 by Grumpy Lion

new pyp_beta should fix this, but you will have to change the shebang: http://code.google.com/p/pyp/downloads/detail?name=pyp_beta&can=2&q=#makechanges

Status: Fixed

Labels:
Type-Defect Priority-Medium