Sponsored Content
Top Forums Shell Programming and Scripting Code conversion from JSP to PYTHON Post 302068776 by csaha on Tuesday 21st of March 2006 12:15:23 AM
Old 03-21-2006
Data

Looks like this kind of work hasn't been done yet. Can someone atleast suggest some way around ???

Thanks for support
C Saha
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

JSP on an HP UX-11

We have an HP UX-11 server running Unix and we wish to run Java Server Pages on this system. Can anyone see a reason why these pages will not work under this environment. Thanks for you help. Matthew (2 Replies)
Discussion started by: MLarra51
2 Replies

2. Programming

Please I need your help about jsp and java

Hello.. is there any way to send a file or a string from jsp website to java program which all I will develope i remember that i can make socket connection between jsp and java but:confused::confused: I dont now how if there any website or booke explain that or if there another way ... (2 Replies)
Discussion started by: vip_a1
2 Replies

3. Shell Programming and Scripting

Help with Python Code Whitespace

Hello All, I have some python code that pulls together titles and displays them on web pages. Here is the section of code I am struggling with: #string to grab title titlePattern =r'''\s*(\(+\))?(?P<title>.*)''' #returns the title part of the subject line def getTitle... (0 Replies)
Discussion started by: jhampt
0 Replies

4. UNIX for Advanced & Expert Users

Conversion from ASCII to binary for physical simulation code in C/C++

Good evening, everybody A good math friend told me that it would be possible to shrink the size of the numerical datas I produce with a physical simulation code I programmed for my PhD. It usually writes at least 100 GB to complete the simulation, and it seems that it is too high. There are... (7 Replies)
Discussion started by: Cybertib
7 Replies

5. Shell Programming and Scripting

[python]string to list conversion

I have a file command.txt. It's content are as follows:- The content of file is actually a command with script name and respective arguments. arg1 and arg2 are dummy arguments , format : -arg arg_value test is a argument specifying run mode , format : -arg In my python code, i read it and... (1 Reply)
Discussion started by: animesharma
1 Replies

6. Shell Programming and Scripting

conversion of code in perl and python

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

7. Shell Programming and Scripting

Delimiter Conversion(Generic Code)

Hi All, I am looking for a generic code which can search for the existing delimiter(what ever it may be) in a file and convert it to Pipeline. The file may have Pipeline delimiter already in that case just leave it. Please find below some sample records. Sample records1: ... (2 Replies)
Discussion started by: Arun Mishra
2 Replies

8. Programming

Python conversion to epoch time

Hi. I have timestamps that I am trying to convert to epoch time. An example: I am trying to convert this to an epoch timestamp but have one little glitch. I have this: import time date_time = '' pattern = '' epoch = int(time.mktime(time.strptime(date_time, pattern))) print epoch... (1 Reply)
Discussion started by: treesloth
1 Replies

9. Shell Programming and Scripting

Python soap and string to .xlsx conversion

Hi experts - I'm relatively new to python, but I have an requirement to automate getting a file from a WebLib server using an API. The file I'm requesting from this sever is an excel spreadsheet (.xlsx). I get a valid response back via an xml doc from the server. In this xml file I get... (8 Replies)
Discussion started by: timj123
8 Replies

10. Programming

Two problems with my python code

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
PY.TEST-3(1)							      pytest							      PY.TEST-3(1)

NAME
pytest - pytest usage CALLING PY.TEST-3 THROUGH PYTHON -M PY.TEST-3 New in version 2.0. If you use Python-2.5 or later you can invoke testing through the Python interpreter from the command line: python -m pytest [...] This is equivalent to invoking the command line script py.test-3 [...] directly. GETTING HELP ON VERSION, OPTION NAMES, ENVIRONMENT VARIABLES py.test-3 --version # shows where pytest was imported from py.test-3 --funcargs # show available builtin function arguments py.test-3 -h | --help # show help on command line and config file options STOPPING AFTER THE FIRST (OR N) FAILURES To stop the testing process after the first (N) failures: py.test-3 -x # stop after first failure py.test-3 --maxfail=2 # stop after two failures SPECIFYING TESTS
/ SELECTING TESTS Several test run options: py.test-3 test_mod.py # run tests in module py.test-3 somepath # run all tests below path py.test-3 -k string # only run tests whose names contain a string Import 'pkg' and use its filesystem location to find and run tests: py.test-3 --pyargs pkg # run all tests found below directory of pypkg MODIFYING PYTHON TRACEBACK PRINTING
Examples for modifying traceback printing: py.test-3 --showlocals # show local variables in tracebacks py.test-3 -l # show local variables (shortcut) py.test-3 --tb=long # the default informative traceback formatting py.test-3 --tb=native # the Python standard library formatting py.test-3 --tb=short # a shorter traceback format py.test-3 --tb=line # only one line per failure DROPPING TO PDB (PYTHON DEBUGGER) ON FAILURES Python comes with a builtin Python debugger called PDB. py.test-3 allows one to drop into the PDB prompt via a command line option: py.test-3 --pdb This will invoke the Python debugger on every failure. Often you might only want to do this for the first failing test to understand a certain failure situation: py.test-3 -x --pdb # drop to PDB on first failure, then end test session py.test-3 --pdb --maxfail=3 # drop to PDB for the first three failures SETTING A BREAKPOINT
/ AKA SET_TRACE() If you want to set a breakpoint and enter the pdb.set_trace() you can use a helper: import pytest def test_function(): ... pytest.set_trace() # invoke PDB debugger and tracing In previous versions you could only enter PDB tracing if you disabled capturing on the command line via py.test-3 -s. PROFILING TEST EXECUTION DURATION
To get a list of the slowest 10 test durations: py.test-3 --durations=10 CREATING JUNITXML FORMAT FILES
To create result files which can be read by Hudson or other Continuous integration servers, use this invocation: py.test-3 --junitxml=path to create an XML file at path. CREATING RESULTLOG FORMAT FILES
To create plain-text machine-readable result files you can issue: py.test-3 --resultlog=path and look at the content at the path location. Such files are used e.g. by the PyPy-test web page to show test results over several revi- sions. SENDING TEST REPORT TO POCOO PASTEBIN SERVICE
Creating a URL for each test failure: py.test-3 --pastebin=failed This will submit test run information to a remote Paste service and provide a URL for each failure. You may select tests as usual or add for example -x if you only want to send one particular failure. Creating a URL for a whole test session log: py.test-3 --pastebin=all Currently only pasting to the http://paste.pocoo.org service is implemented. CALLING PY.TEST-3 FROM PYTHON CODE New in version 2.0. You can invoke py.test-3 from Python code directly: pytest.main() this acts as if you would call "py.test-3" from the command line. It will not raise SystemExit but return the exitcode instead. You can pass in options and arguments: pytest.main(['x', 'mytestdir']) or pass in a string: pytest.main("-x mytestdir") You can specify additional plugins to pytest.main: # content of myinvoke.py import pytest class MyPlugin: def pytest_addoption(self, parser): raise pytest.UsageError("hi from our plugin") pytest.main(plugins=[MyPlugin()]) Running it will exit quickly: $ python myinvoke.py ERROR: hi from our plugin AUTHOR
holger krekel at merlinux eu COPYRIGHT
2011, holger krekel et alii 2.2 June 24, 2012 PY.TEST-3(1)
All times are GMT -4. The time now is 08:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy