everywhere you run your exe it spread its needed file to _MEIPASS
you should work to get result


On Wed, May 7, 2014 at 6:07 PM, Christiaan Maks <[email protected]>wrote:

> Yes, but I don't need the path to the temp folder. I need the path where
> the exe was launched from. In this case, the exe is on drive E:\ so I want
> to retrieve that path.
>
>
> On Wednesday, 7 May 2014 15:19:59 UTC+2, Mahmoodreza Aarabi wrote:
>
>> yes
>> wheb you run exe file pyinstaller create _MEIPASS in sys.
>> in run-time you should add this path to os.environ as a path
>>
>> then exe file can detect it as root folder
>>
>>
>> On Wed, May 7, 2014 at 5:37 PM, Christiaan Maks <[email protected]>wrote:
>>
>>> I thought the _MEIPASS var is the location of the temporary folder?
>>>
>>>
>>> On Wednesday, 7 May 2014 14:30:05 UTC+2, Mahmoodreza Aarabi wrote:
>>>
>>>> add your _MEIPASS to os.environ
>>>> ;)
>>>>
>>>>
>>>> On Wed, May 7, 2014 at 4:34 PM, Christiaan Maks <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I want to run my --onefile .exe from a USB stick and I want to pass
>>>>> the location of the .exe (so the USB drive) to the main Python file. How 
>>>>> do
>>>>> I do this?
>>>>>
>>>>> For clarity:
>>>>>
>>>>> Program.exe is on USB drive E:\
>>>>> Launching Program.exe results in extracting to the temporary folder on
>>>>> C:\Users\...
>>>>> The main.py file gets E:\ as argument when launched.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "PyInstaller" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>>
>>>>> Visit this group at http://groups.google.com/group/pyinstaller.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> Bests,
>>>> madoodia
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "PyInstaller" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/pyinstaller.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>>
>> Bests,
>> madoodia
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "PyInstaller" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pyinstaller.
> For more options, visit https://groups.google.com/d/optout.
>



-- 


Bests,
madoodia

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to