I was wondering if you could help me with my new python program. I recently added a browse button to the GUI to make things more "user-friendly." I told python to only accept *.pvt files when the user is asked to browse for a file... Now, I am left wondering how to tell python to take the path the user browsed to and open a cmd window[using subprocess.Popen("cmd.exe")] and cd to that user defined path.. any ideas???
subprocess.Popen() accepts a cwd argument:
Popen(["cmd.exe"], cwd=mypath)
Related
I'm hosting an AppImage file on github releases
https://github.com/Gilad-Kutiel-App/jumpfm/releases.
The file does not have an execution permission when downloaded and it is needed to set it manually.
Is there anything I can do about it ?
Thank you,
Gilad
Before you can run an AppImage (or really any executable for that matter), you need to make it executable. This is a Linux security feature. There are three main ways to make an AppImage executable:
1. With the GUI
Open your file manager and browse to the location of the AppImage
Right-click on the AppImage and click the ‘Properties’ entry
Switch to the Permissions tab and
Click the ‘Allow executing file as program’ checkbox if you are using a Nautilus-based file manager (Files, Nemo, Caja), or click the ‘Is executable’ checkbox if you are using Dolphin, or change the ‘Execute’ drop down list to ‘Anyone’ if you are using PCManFM
Close the dialog
Double-click on the AppImage file to run
2. On the command line
chmod a+x Some.Appimage
3. Automatically with the optional appimaged daemon
If you would like to have all AppImages be executable automatically, you can install the optional appimaged daemon. It will automatically add downloaded AppImages to the menu and make them executable for you. It can be downloaded from https://github.com/AppImage/AppImageKit/releases or installed from your distribution.
On your download page, you can link to the image and/or to http://discourse.appimage.org/t/how-to-make-an-appimage-executable/80
Note: Please DO NOT put an AppImage into another archive like a .zip or .tar.gz. While it may be tempting to avoid users having to set permission, this breaks desktop integration with the optional `appimaged daemon, among other things. Besides, the beauty of the AppImage format is that you never need to unpack anything
I'm new to Zend and noticed there's something called ZFtool. So I installed it via this tutorial: http://framework.zend.com/manual/2.1/en/modules/zendtool.introduction.html. With some hassle and editting I finally got it to work in my htdocs folder of xampp.
Whenever I now run php vendor/zendframework/zftool/zf.php create project testproject it actually creates a project in my htdocs called testproject. But whenever I now want to add a module I'd have to do php vendor/zendframework/zftool/zf.php create module some_module c:/xampp/htdocs/testproject.
Now; I've got the feeling that this can(or atleast SHOULD) be more efficient than how I'm going at it now. Is there a way I can make the zf.php file universally reachable or anything to make the command line a little easier?
Download zftool.phar from : https://packages.zendframework.com/zftool.phar
Place it on:
C:\bin\zftool.phar
Create zftool.bat on:
C:\bin\zftool.bat
zftool.bat
#ECHO OFF
php "%~dp0zftool.phar" %*
Add this path to your Environment Variable:
Now you are able to use zftool from anywhere in your command prompt like this:
I have a task with these requirements: On Ubuntu 12.04, I need to open an instance of Nautilus (file manager) with a defined path which is set in the Perl script by an user.
Are there any approaches to do it? Thanks for a response.
UPD
And is it possible to select a particular file from all files which are located in a folder (path)?
Your question is really very vague. Without anything else to go on:
system("nautilus", $path);
I want to create a CD which contains many files [audio files, text files, applications, etc..], when the CD will be inserted it will open an application which shows a welcome screen to user and guides him, plus it will also open the CD in explorer (simply show the contents of the CD allowing the user to select which files he wish to open).
The users are elders in a retirement home, we are teaching them how to use computers.
The operation system is windows xp with autorun set on default.
my question is is it possible, and if so how?
And if not, is it possible to make the autorun load the application which will guide the user, but when the user accesses the drive itself via double-clicking it will open the cd contents.
Any help appreciated, thanks ahead.
Since it will be used in Windows only, try this: create two files (autorun.inf and open.bat) in the root directory of your CD.
Put this inside autorun.inf
[autorun]
ShellExecute=open.bat
...and this inside open.bat
start <path to the dir you want to open>
start <path to the default cd app>
I use textmate for website development and compass to compile css stylesheets. Right now everytime I open up the folder with textmate I have to additionally run a compass watch /path/to/folder command. I know textmate is pretty powerfull, but not sure how to make it work so the compass watch command is automatically applied to projects you open with textmate (I usually drag the projectfolder on the dock-icon). Is this possible?
Sure thing. You will need to make a small function in your .bashrc file.
I based the function below off an alias I create for SublimeText2 to make it work like "mate dir/" (a feature I missed greatly):
#Sublime Text Alias
alias slime='open -a "/Applications/Sublime Text 2.app"'
So, you don't really want an alias to run two commands, since an alias is...an "alias" for a specific command. However, a function is well suited:
#for Textmate
function matew() {
open -a "/Applications/TextMate.app" $1
compass watch $1
}
I picked "matew" - cause it was like mate+watch, but you can call your function whatever you will remember. (e.g epicPwn(), etc) Thus, your new function is run as:
matew dirName/
Note: Just be sure to put the correct path to TextMate. Also, the compass watch command will fowl up if you aren't passing a directory, obviously. Similarly if the directory doesn't have a compass project -> compass watch will spit back a standard "no project" error (but TM will still open the dir/). e.g.:
matew src/
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.