Tagged Questions
2
votes
3answers
34 views
Different results when running in python interpreter vs. script file
I am trying to use bash functions inside my python script to allow me to locate a specific directory and then grep a given file inside the directory. The catch is that I only have part of the ...
0
votes
3answers
45 views
Convert julian day into date
I have files named day00000.nc, day00001.nc, day00002.nc, ...day00364.nc for several years.
They represent the 365 or 366 days.
I want to rename my files like this day20070101.nc, day20070102.nc , ...
0
votes
1answer
28 views
package creation file doesnot take value from .bashrc file
I am newbie to python, and for GUIs, I use wxpython.
My Issue is this:
I have to create a debian file for two types of products(say product 1 and product 2).That can be done by running ...
0
votes
2answers
87 views
Running Python script from bash: Command not found error
I Get command not found error. 0 and $filestem are the two args and I had the following in a script. And when i execute the script, I get command not found.
echo -e "Enter the file stem name"
read ...
-3
votes
0answers
37 views
Data mining a website? [closed]
What's the easiest way to go about this? I'm most comfortable with Python and a little comfortable with bash. I've checked out the urllib2 library in Python and I've also checked out Scrapy.
I want ...
1
vote
2answers
58 views
Getting Command line in Python
So I am working on this project where I take input from the user (a file name ) and then open and check for stuff. the file name is "cur"
Now suppose the name of my file is kb.py (Its in python)
If I ...
0
votes
2answers
30 views
numpy loadtxt skip first row
I have a small issue when I'm trying to import data from csv files with numpy's loadtxt function. Here's a sample of the type of data files I have.
Call it 'datafile1.csv':
# Comment 1
# Comment 2
...
0
votes
0answers
50 views
Why interpreter path in first line of python script is truncated? [duplicate]
I have one test script which create virtual environment and run some test in that environment.
Now the problem is when it create virtual environment it give path of python interpreter created in ...
1
vote
4answers
88 views
Run bash script in thread not blocking the main loop
I have a python programm that I want a progressbar to be pulsed when I run a bash script in a thread and show some messages.
When I click a button, the thread is started launching the script, but the ...
-1
votes
3answers
47 views
which version of python is used when I run it in interpreter?
I am confused in trying to understand which python version is used when I run them in interpreter?
That is, how the shell decides which python version to load when I have more than one versions.
I ...
1
vote
1answer
29 views
How to insert an inline (heredoc maybe? ) python script into a bash stdin/stdout streaming pipeline
I have recently been doing fair amount of work in python and would like to be able to udse its features instead of shell/bash builtins / shell scripting.
So for a shell pipeline like this:
echo -e ...
1
vote
1answer
35 views
Launching SimpleHTTPServer in background
I am trying to write a shell script that launches a server and then fires up a browser to view the served content
(cd app && python -m SimpleHTTPServer) &
open http://localhost:8000
...
0
votes
0answers
9 views
easy_install using older module for dependency check [migrated]
How do I get easy_install to see a newer version of a module which is required to install another module?
I'm trying to install MISO locally using:
easy_install --user -U misopy
It gives me an ...
0
votes
1answer
62 views
How to use Jenkins Environment variables in python script
so I have a bash script in which I use the environment variables from Jenkins
for example:
QUALIFIER=echo $BUILD_ID | sed "s/[-_]//g" | cut -c1-12
Essentially I'm taking the build id, along with ...
0
votes
2answers
46 views
Unix Subshell inheriting the command history from parent bash
I have written a series of python tools that spawn new bash sessions. I am want those individual subshells to inherit the command history of the parent. I have tried:
shopt -s histappend
...