You are here

gPodder python help

11 posts / 0 new
Last post
agdurrette
Offline
Last seen: 1 year 3 weeks ago
Developer
Joined: 2008-01-16 13:55
gPodder python help

Someone requested gPodder and I was thinking about working on it but I have a question.

It is coded in python so there is a bunch of .py scripts. All the dependencies look like there included (including python). When ran it compiles the .py scripts. I was wondering when I package it should I include the compiled scripts package it as is?

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
"Compiles"

What do you mean by "compiles"? Are you meaning it produces *.pyc files?

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

agdurrette
Offline
Last seen: 1 year 3 weeks ago
Developer
Joined: 2008-01-16 13:55
yes.

yes.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Sigh... another project that

Sigh... another project that doesn't use py2exe or cx_Freeze or any such thing.

The pyc files are generated from the py files and it will run fine without one or the other - if the pyc files are there and up to date it'll use them, if the pyc files are there and the py files are not, it'll use them, if the pyc files are not there it'll generate them from the py files (except for the script called directly - so if you delete the py files for smallness and speed, make sure you leave gpodder.py or whatever it is that it launches directly, as it won't create the corresponding pyc file for it).

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

agdurrette
Offline
Last seen: 1 year 3 weeks ago
Developer
Joined: 2008-01-16 13:55
K, Thanks for the info. One

K, Thanks for the info. One more question.

I'm using PAL and in gPodder Portable.ini I have ProgramExecutable=gPodder\gpodder.exe when I run gPodder Portable.exe, the splash screen comes up it launches gPodder.exe but before gPodder does any thing it seems to crash, but when I run gPodder.exe it runs fine.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Working directory

In these cases it's almost always the working directory.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

agdurrette
Offline
Last seen: 1 year 3 weeks ago
Developer
Joined: 2008-01-16 13:55
Adding

I tried adding

[Environment]
PATH=%PATH%;%PAL:AppDir%\gpodder

and

[Launch]
ProgramExecutable=gpodder\gpodder.exe
WorkingDirectory=%PAL:AppDir%\gpodder

both do not working.

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 3 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Release

Hey Andrew, last I'd heard Chris Morgan had said he'd 'get around to' doing this over a year ago and I'd started playing with it sometime last year. Not sure how far you had gotten as I didn't realize you were working on this. It turned out to be very complicated and I had to portablize python (renaming it so that it wouldn't interfere with other python instances) and manually pass it both a command line and an environment variable, bypassing gpodder.exe entirely. I determined these by using a simple NSIS script in place of pythonw.exe to tell me the command line and env vars.

I also had to manually edit launcher.py to manually set up the config and downloads directories as there are bugs in gPodder itself and it would reset the downloads path on every launch to be within App (and if you had that and launched something to watch it, it would get stuck and PAL would make a copy of your downloads directory, which could be 100s of MBs). I also set up the LANG variable for switching with the platform and included a manual setting for it as well as automatically setting it based on the installer language at install time.

Like I said, messy. If you'd like to take it over, I'd be more than happy for you to. 2.13 should be out soon (it's already done for Linux platforms... their Windows dev just lags a bit). I'm happy to walk you through all the code and changes required. I'm sorry if I stepped on your toes a bit, but I didn't see this in the ready for release thread or test releases page so didn't know you were working on it. Hope you hadn't spent too much time spinning your wheels trying to figure it out. I know it certainly stumped me for a while.

Sometimes, the impossible can become possible, if you're awesome!

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 6 months ago
Joined: 2007-04-15 21:08
Me?

I don't recall ever saying anything about this...

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 3 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Hmmm

Maybe it was something else I was looking at today. It was something you wanted to get done after you did PAL 1.0.

Sometimes, the impossible can become possible, if you're awesome!

agdurrette
Offline
Last seen: 1 year 3 weeks ago
Developer
Joined: 2008-01-16 13:55
I was pretty bummed when I

I was pretty bummed when I saw that gPodder Portable was released because I spent a good amount of time trying to get it to launch. But knowing that even you were having problems made me much happier :). I thought I was not using PATH correctly :P.
I would love to take it over for you. Smile

"It's just an online installer. It's not going to mug you.", JTH
"The shell is the key to unlock Linux's greatest advantages."

Log in or register to post comments