I have a small pygame based game which uses .jpg and .png files for sprites. I have created a single file .exe with pyinstaller as a --onefile. The problem is that all the game assets are visible within a folder.   How can I hide all the assets or put them in a file that is accessed and not visible to users?   Any ideas would be great.
I am creating an ZIP file with ZipFile in Python 2.5, it works ok so far:  import zipfile, os  locfile = "test.txt" loczip = os.path.splitext (locfile)[0] + ".zip" zip = zipfile.ZipFile (loczip, "w") zip.write (locfile) zip.close()   but I couldn't find how to encrypt the files in the ZIP file. I could use system and call PKZIP -s, but I suppose there must be a more "Pythonic" way.  I'm looking for an open source solution.
How can I permanently enable cheating? I'm giving Deus Ex a quick playthrough as a refresher before jumping into Human Revolution. In the interest of expediency, I've decided to cheat. ^.^  Normally, cheats must be re-enabled for each level when playing the original DX. I've encountered instructions on several sites (word-for-word identical instructions, so clearly copy/pasted) for permanently enabling cheats, but they aren't working for me:     Because you will need to redo this for every level, you can open up 'user.ini' and add 'bCheatsEnabled True' in the [DeusEx.DeusExGameInfo] section of the file to allow cheats to be activated forever.   Not only is that not working for me, it doesn't even look right compared to the rest of the file (space instead of =). With increasing desperation, I've tried adding that line (both verbatim and switching to an equal sign) to every section of both User.ini and DeusEx.ini which looks even remotely plausible — even creating a [DeusEx.JCDentonMale] section, just in case.  Does anyone know how to get this working? I'm running DX:GOTY version 1.112fm from Steam on Windows 7. Ambiguity of "quite" The adverb "quite" has the following meanings :     1: wholly, completely ("not quite   finished")      2: to an extreme : positively "quite   sure" —often used as an intensifier   with a "quite a swell guy" "quite a   beauty"      3: to a considerable extent : rather   ("quite near")   My understanding is that #1 and #2 conflict with #3. For example, when you say "She's quite right", do you mean "She's completely right" or "To a considerable extent, she's right"? Notice that in the latter case you're not saying that she is completely right.  Another example is "I'm quite sure". Does it necessarily mean "I'm completely sure"?   Does the word really have conflicting meanings that can possibly cause ambiguity? Or am I missing something? I would like to ask a question about Java that doesn't have a specific answer. It's a question to see what people think and to share their opinion.    Will Stack Overflow tolerate this, or is there another Stack Exchange resource where I may ask a question like this? The Wikipedia page () proves that $$f(x) = \begin{cases}  \exp(-1/x),  &amp; \mbox{if }x&gt;0 \\ 0, &amp; \mbox{if }x\le0 \end{cases}$$ is a non-analytic smooth function. But I don't understand why the fact that "the Taylor series of $f$ at the origin converges everywhere [where does "everywhere" mean here?] to $0$" implies the Taylor series converges to $0$ when $x&gt;0$? Can someone explain this in greater detail? I guess there should be a gap in my understanding of power series. If the topology of a space  has a countable base, then each base contains a countable subfamily which is also a base. How do I install Java? How do I install Java, including in my browser, so websites with Java work? Best practice: card expiry date on checkout I've come across quite a few answers that request the asker to, for example: "send the user an email", after which the answerer will provide them with the code or other resources they're looking for.  A few examples:          Should we take action against these questions?  I feel like these answers aren't appropriate (see my answer below).  Update:  Perhaps there are some cases where this is acceptable. I've seen a few questions regarding a particular piece of commercial software where the author/developer of the software answers, telling the asker to contact either them or their organization's in-house support.  I'm on the fence about this case. If I came across a question here describing a similar problem I was having, it would be useful to me to have the support information and know that I could contact it for assistance.  I'm interested in others' opinions on this situation in particular. StackExchange drop down hiding chat, blog and log out, concerns How do I fix "Error C1033: cannot open program database"? Directing graph such that any outdegree would be at most 2 Let $G=(V,E)$ be a graph. Suppose that for every subgraph $G'=(V',E') , G' \subset G$, we have $|E'| \le 2|V'|$. Show it's possible to direct $G$ such that any outdegree would be at most $2$.   I tried proving it by induction. I've realized that the minimum degree at any subgraph of $G$ is at most 4. I tried removing the vertex $v_0$ with the minimal degree at a certain subgraph from the original graph, claiming that the graph from the remaining vertexes can be directed as required. How can I include the vertex $v_0$ in the new directed graph such that any outdegree would still be at most 2? Thanks With arrays, why is it the case that a[5] == 5[a]? Any way to have CPU temperature in the menu bar? I tried  and  but it does not update the temperature and I do not wish to change the fan speed. I have a Python script which I would like to execute at every startup. I can run it by adding this to the startup applications:  python3 /path/to/script.py   That works, but it doesn't open a terminal window, so I can't see the program's output. How could I make it open a terminal window and execute the script in there?  Note: I get the window to stay open with input(' ') at the end of the Python script. Thanks! How to extract files to another directory using 'tar' command? I thought tar archive.tar /users/mylocation would work, but it doesn't. How can I do that? Let $a,b,c\in\mathbb{R}^*_+$, $abc=1$.  How can i show that $\left(a-1+\frac{1}b\right)\left(b-1+\frac{1}c\right)\left(c-1+\frac{1}a\right)\leq1$ ?  I got $\left(ab-b+1\right)\left(bc-c+1\right)\left(ca-a+1\right)\leq abc=1$, but i can't go any further ...  If i expand it :   $2-ab-\frac{b}a-c-ac-\frac{a}c-b+2a+\frac{2}a-bc-\frac{c}b-a+2b+\frac{2}b+2c+\frac{2}c-4$  Which gives using $c=\frac{1}{ab}$ :   $5ab-\frac{b}a-\frac{1}{ab}-a^2b+\frac{1}a+b+\frac{1}b-2$ Can I find out the return value before returning while debugging in Visual Studio? Take the following function:  DataTable go() {     return someTableAdapter.getSomeData(); }   When I set a breakpoint in this function, is there a possibility to inspect the returned value? go() is directly coupled to a datagrid in an .aspx page.  The only way to inspect the returned datatable is to use a temporary variable. However, that's a bit inconvenient. Isn't there another way? How can I iterate, loop, process, or otherwise do something, with each element from a comma separated list of things?  This question       , and the are already lots of very good answers everywhere. However I think it would also be valuable to have a single reference point where all such alternative techniques are explained in detail, with their advantages and disadvantages discussed.  All of plain-TeX, LaTeX, LaTeX3, LuaTeX, Context, etoolbox, pgffor, etc. answers are invited. Please consider explaining, for example:   How does the command/method deal with whitespace around items? How does the command/method deal with empty/missing items? (e.g. a,b,,c) How does the command/method deal with a trailing comma? Can the command/method work of a list stored on a macro? Is each iteration evaluated globally or on a local group? (i.e., if a command is defined during an iteration, does the command survive the loop?) Do items get expanded or somehow mangled before being processed? What about lists where items are key=value or some other kind of pairs? Does the method work for lists separated with something other than a comma? Any other thing I should know before deciding to use this method? Ex-dividend date: How long do I have to hold a stock in order to get the next dividend? I want to be a stockholder on record for a dividend. So lets assume I bought stock before the ex dividend date. Can I immediately sell the stock after the ex-dividend date to collect the dividend, or do I need to hold for a few weeks to collect the dividend?  Lets say the ex-dividend date is the 15th of the month. I buy stock on the 14th (I think this is soon enough to be a shareholder on record) and then I sell on the 15th. Do I get the dividend in my account when it is distributed?  Don't worry &ndash; I have a proprietary way of hedging the stock's post-dividend price adjustment, and it costs less than the actual dividend so all is well.  I just don't know what the shortest time I can hold a position is. I'd like to know the shortest theoretical time possible in order to get the dividend.  Insight appreciated. What was the issue solved by the new "using" syntax for template typedefs?