Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 support? #7

Closed
v-python opened this issue Dec 19, 2012 · 12 comments
Closed

Python 3 support? #7

v-python opened this issue Dec 19, 2012 · 12 comments

Comments

@v-python
Copy link

I whacked at it until it seems to run under Python 3, but I didn't make the code conditional, so I have a replacement version... any interest? I'm not a git user, so I just grabbed the file, and edited. Tell me where to email the file, if interested. Was pretty straightforward. Otherwise I'll just put it on my web site, and it will acquire bit-rot...

My goal was to extract GPS data, so I added --gps option to print only that.

@ianare
Copy link
Owner

ianare commented Dec 20, 2012

Sure, send it over and I'll create a py3 branch with it.

ianare AT gmail DOT com

@v-python
Copy link
Author

On 12/19/2012 4:18 PM, ianaré sévi wrote:

Sure, send it over and I'll create a py3 branch with it.

I think I tossed a version number at the top, but you might have your
own technique.

The stuff after main, and the import of pprint can probably be removed,
I just used pprint for debugging, I think.

New features are the py3 functionality... once you see the differences,
you may choose to encapsulate them in a way that would not require a
branch. I'd be glad to help test anything if, for some reason, you don't
have py3 available.

Also, I added GPS support, and if win32 extensions are available, it
tosses its GPS output on the clipboard. Handy but if you strip it out,
I'll move that code into a different utility program that imports
EXIF.py so I can track your updates over time.

This was a "Quick, get the job done" port, but the pressure is off now.

Glenn

@ianare
Copy link
Owner

ianare commented Dec 20, 2012

Can you send the file as an attachment? The whitespace got all corrupted.

@ianare
Copy link
Owner

ianare commented Dec 20, 2012

I think I tossed a version number at the top, but you might have your
own technique.

I don't really have a technique, I just put it the header.

The stuff after main, and the import of pprint can probably be removed,
I just used pprint for debugging, I think.

OK

New features are the py3 functionality... once you see the differences,
you may choose to encapsulate them in a way that would not require a
branch. I'd be glad to help test anything if, for some reason, you don't
have py3 available.

This would be good, but the first step is having a branch to allow
merging any improvements made to the py2 version.

Also, I added GPS support, and if win32 extensions are available, it
tosses its GPS output on the clipboard. Handy but if you strip it out,
I'll move that code into a different utility program that imports
EXIF.py so I can track your updates over time.

There can't be any platform specific code.

This was a "Quick, get the job done" port, but the pressure is off now.

Thanks for the contribution. You should consider forking the repo for
any future work as it would make things much easier.

  • ianaré sévi

@v-python
Copy link
Author

On 12/19/2012 4:31 PM, ianaré sévi wrote:

Can you send the file as an attachment? The whitespace got all corrupted.


Reply to this email directly or view it on GitHub
#7 (comment).

I did... but maybe your mail client also displayed it inline, and
corrupted it on the display?

Or do I have different editor settings, and it is a tab versus space
issue? If so, what tab settings do you use?

@ianare
Copy link
Owner

ianare commented Dec 20, 2012

I did... but maybe your mail client also displayed it inline, and

corrupted it on the display?

Or do I have different editor settings, and it is a tab versus space
issue? If so, what tab settings do you use?

Not an editor setting, looks like a problem with email. Just send me an
email directly without going through github.

  • ianaré sévi

@v-python
Copy link
Author

On 12/19/2012 4:42 PM, ianaré sévi wrote:

I did... but maybe your mail client also displayed it inline, and

corrupted it on the display?

Or do I have different editor settings, and it is a tab versus space
issue? If so, what tab settings do you use?

Not an editor setting, looks like a problem with email. Just send me an
email directly without going through github.

  • ianaré sévi


Reply to this email directly or view it on GitHub
#7 (comment).

And your email address? Github is hidnig it from me.

@ianare
Copy link
Owner

ianare commented Dec 20, 2012

ianare AT gmail DOT com

  • ianaré sévi

2012/12/20 v-python notifications@github.com

On 12/19/2012 4:42 PM, ianaré sévi wrote:

I did... but maybe your mail client also displayed it inline, and

corrupted it on the display?

Or do I have different editor settings, and it is a tab versus space
issue? If so, what tab settings do you use?

Not an editor setting, looks like a problem with email. Just send me an
email directly without going through github.

  • ianaré sévi


Reply to this email directly or view it on GitHub
#7 (comment).

And your email address? Github is hidnig it from me.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-11555844.

@v-python
Copy link
Author

On 12/19/2012 4:38 PM, ianaré sévi wrote:

I think I tossed a version number at the top, but you might have your
own technique.

I don't really have a technique, I just put it the header.

The stuff after main, and the import of pprint can probably be removed,
I just used pprint for debugging, I think.

OK

New features are the py3 functionality... once you see the differences,
you may choose to encapsulate them in a way that would not require a
branch. I'd be glad to help test anything if, for some reason, you
don't
have py3 available.

This would be good, but the first step is having a branch to allow
merging any improvements made to the py2 version.

Also, I added GPS support, and if win32 extensions are available, it
tosses its GPS output on the clipboard. Handy but if you strip it out,
I'll move that code into a different utility program that imports
EXIF.py so I can track your updates over time.

There can't be any platform specific code.

It's in a try block, so it doesn't happen if it isn't there, regardless
of platform. But no problem if you strip that out, regardless.

This was a "Quick, get the job done" port, but the pressure is off now.

Thanks for the contribution. You should consider forking the repo for
any future work as it would make things much easier.

Yeah, I've used source control, and it works great in companies, or for
cooperative projects. But there are too many different ones for me to
learn them all, and to want to reinstall them all when I switch
computers, or for a one-time contribution. It already takes a week to
install software on a new computer...

Happily, I was able to find the link on github to download the source
file without installing git client.

  • ianaré sévi


Reply to this email directly or view it on GitHub
#7 (comment).

@ianare
Copy link
Owner

ianare commented Dec 20, 2012

OK got the file, it looks like you modified an older version, there was a recent addition of several bug fixes and extra debugging info which your version is missing.

@v-python
Copy link
Author

On 12/19/2012 6:01 PM, ianaré sévi wrote:

OK got the file, it looks like you modified an older version, there
was a recent addition of several bug fixes and extra debugging info
which your version is missing.

I had downloaded it in November... when the issue first came up, but
other projects intervened. Then the day came when it was needed yesterday :)

Four basic changes:

single byte slices changed from [ 4 ] to [ 4:5 ] so they stay bytes
instead of turning into ints, for comparisons.

Exception syntax

'\xff' => '\xff'

print syntax

Glenn

@odinho
Copy link

odinho commented Dec 27, 2012

With so small changes it should be very well possible to support both py3 and py2 in one codebase without any ugliness, as far as I can see :-)

@ianare ianare closed this as completed Feb 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants