09-04-2017
9 More Discussions You Might Find Interesting
1. Programming
I'm a newbie and want to learn a programming language, willy-nilly I picked python...
Should I go with 2.6.x which at first glance seems extremely well documented, or should I go with 3.0, which is new and shiny?!
I want...no...I'm going to NEED fantastic documentation or I'm going to fail... (2 Replies)
Discussion started by: guptaxpn
2 Replies
2. Shell Programming and Scripting
I starting teaching myself python and am stuck on trying to understand why I am not getting the output that I want. Long story short, I am using PDB for debugging and here my function in which I am having my issue:
import re
...
...
...
def find_all_flvs(url):
soup =... (1 Reply)
Discussion started by: metallica1973
1 Replies
3. Programming
I am planning on taking a class in Python. My choices are 2.5 or 3.0. Which version should I choose? I am getting the impression they are two separate paths.
thanks. (5 Replies)
Discussion started by: djehresmann
5 Replies
4. UNIX for Dummies Questions & Answers
Hello All,
I was looking for a solution for enabling/disabling the Capslock from the command line and came across some Python code for doing just that...
Well, in this case the code was written to ONLY turn-off Capslock but I assume there has to be a way to turn it on too.
Site where I... (0 Replies)
Discussion started by: mrm5102
0 Replies
5. Shell Programming and Scripting
#!/usr/bin/python
def genCommanString(s):
print s
abc = {
"sftp":genCommanString('f5sftp'),
"/usr/local/ssh/bin/sftp": genCommanString('f5sftp')
}
value="sftp"
xyz = abc.get(value)
Why the above coding produce 2 row output?
(i.e.
f5sftp
f5sftp)
Is it... (1 Reply)
Discussion started by: cstsang
1 Replies
6. Shell Programming and Scripting
Greetings!
After some cut-and-try, I've cobbled together the following bit of basic code:#!/usr/bin/python
import gtk
class PyApp(gtk.Window):
def __init__(self):
super(PyApp, self).__init__()
self.set_size_request(250, 250)
... (0 Replies)
Discussion started by: LinQ
0 Replies
7. Shell Programming and Scripting
Hi,
I get he values for nmval=MS1 & csval=Cluster from the properties file like below.
nmval=configProps.get("SVR_NAME")
csval=configProps.get("CLS_NAME")What should i do in the commands below so as to use the variables nmval and csval instead of manually typing MS1 and Cluster
I want to... (1 Reply)
Discussion started by: mohtashims
1 Replies
8. Programming
Hi all...
Simple yes or no answer question for the big guns with a qualifier if YES.
I can possibly do FFT for my needs in AudioScope using python.
Q: Is python now considered part of the /usr/bin or other command paths for ALL current *NIX style OSes?
IF YES which version(s) should I... (4 Replies)
Discussion started by: wisecracker
4 Replies
9. Shell Programming and Scripting
I have the following code:
#!/usr/bin/env python
mylist =
def printWithoutNewlines():
for objects in mylist:
#print(objects)
objects = objects.replace('hello', "hi")
print objects
When executed, it gives the following output:
## ./loop.py
hi... (3 Replies)
Discussion started by: SkySmart
3 Replies
LEARN ABOUT DEBIAN
dh_python
DH_PYTHON(1) Debhelper DH_PYTHON(1)
NAME
dh_python - calculates Python dependencies and adds postinst and prerm Python scripts (deprecated)
SYNOPSIS
dh_python [debhelperoptions] [-n] [-V version] [moduledirs...]
DESCRIPTION
Note: This program is deprecated. You should use dh_python2 instead. This program will do nothing if debian/pycompat or a Python-Version
control file field exists.
dh_python is a debhelper program that is responsible for generating the ${python:Depends} substitutions and adding them to substvars files.
It will also add a postinst and a prerm script if required.
The program will look at Python scripts and modules in your package, and will use this information to generate a dependency on python, with
the current major version, or on pythonX.Y if your scripts or modules need a specific python version. The dependency will be substituted
into your package's control file wherever you place the token ${python:Depends}.
If some modules need to be byte-compiled at install time, appropriate postinst and prerm scripts will be generated. If already byte-
compiled modules are found, they are removed.
If you use this program, your package should build-depend on python.
OPTIONS
module dirs
If your package installs Python modules in non-standard directories, you can make dh_python check those directories by passing their
names on the command line. By default, it will check /usr/lib/site-python, /usr/lib/$PACKAGE, /usr/share/$PACKAGE,
/usr/lib/games/$PACKAGE, /usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages.
Note: only /usr/lib/site-python, /usr/lib/python?.?/site-packages and the extra names on the command line are searched for binary (.so)
modules.
-V version
If the .py files your package ships are meant to be used by a specific pythonX.Y version, you can use this option to specify the
desired version, such as 2.3. Do not use if you ship modules in /usr/lib/site-python.
-n, --noscripts
Do not modify postinst/prerm scripts.
CONFORMS TO
Debian policy, version 3.5.7
Python policy, version 0.3.7
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Josselin Mouette <joss@debian.org>
most ideas stolen from Brendan O'Dea <bod@debian.org>
9.20120909 2011-12-06 DH_PYTHON(1)