10 More Discussions You Might Find Interesting
1. Programming
Hello everyone ,
I need your help to end my python code.
I've this code in python :
from ipywidgets import interact, Dropdown
from ipywidgets import *
from ipywidgets.embed import embed_minimal_html
import pandas as pd
import os
import sys
#################### Dropdown servers... (1 Reply)
Discussion started by: Tim2424
1 Replies
2. Programming
I am using python 3.4. Below is the exception I am getting-
Traceback (most recent call last):
File "./oop.py", line 20, in <module>
y = DerivedClass("Manu")
File "./oop.py", line 15, in __init__
super().__init__(self,value)
TypeError: __init__() takes 2 positional arguments but... (2 Replies)
Discussion started by: Tanu
2 Replies
3. 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
4. Programming
Need to run this api command via curl, the python code works without any problems , but we want the same to be run as curl command
import requests
params = {'username': 'testuser'}
params = 'c3NhbmthMDJjsd'
params = 'test'
params = 'guide'
params = '192.168.0.37'
params =... (2 Replies)
Discussion started by: iron_michael86
2 Replies
5. Shell Programming and Scripting
How to convert below bash code in perl and python.
for BLOCK in /sys/block/emcpow*
do
echo "100000" > "$BLOCK"/queue/nr_requests
echo "noop" > "$BLOCK"/queue/scheduler
done (2 Replies)
Discussion started by: learnbash
2 Replies
6. Programming
Hey there,
First post here in the Unix forums, but I have used them a lot for research over the last year. Anyways, to why I'm here now:
I'm working on a project and I'll be using the AIS Parser SDK by Brian C. Lane (can't post the link, but google that and the first 8 links will be relevant) ... (4 Replies)
Discussion started by: pmd006
4 Replies
7. Shell Programming and Scripting
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Discussion started by: shahanali
3 Replies
8. Shell Programming and Scripting
Hello,
I am trying to figure out how to get rid of whitespace that is in certain areas (Title) of HTML pages that are created be a python script.
IE:
This is the title. (tabs are creating these spaces)
This is another title. (tabs are creating these spaces)... (5 Replies)
Discussion started by: jhampt
5 Replies
9. Shell Programming and Scripting
Helloo...
I am not much familiar with python..I found this small script in python I even do not have python on my computer...can anyone help me out to convert this into ksh or sh..
PLEASE any help I will appreciate..
here is python code..
#!/usr/bin/env python
import random # Get a... (3 Replies)
Discussion started by: amon
3 Replies
10. Shell Programming and Scripting
Guys
I need to convert a code from JSP (Java Tags are also there inside JSP) to PYTHON.
I have OK kind of knowledge in PYTHON, but dont have a muck knowledge in JAVA/JSP.
Any idea how to approach?
Thanks in advance to all
C Saha (1 Reply)
Discussion started by: csaha
1 Replies
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)