0
votes
0answers
14 views

Regex to hard code logger name

I'm trying to find and replace a logger pattern in my java source files. It looks like the following: org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger( //MyClass.class | ...
2
votes
1answer
33 views

python - Changing a variable with a nested function

Excuse me for being new to python. I feel as if this should be possible, but I have looked all over in this site (among others). I can't seem to directly change a variable in a function with a ...
0
votes
3answers
31 views

Extracting some data from an HTML file and writing it to another file

Given that we have an HTML file as shown below: </pre> <pre><img src="/icons/blank.gif" alt="Icon "> <a href="?C=N;O=D">Name</a> <img ...
0
votes
1answer
31 views

Reset iterator error

I have been trying to create a csv file that will change all the subnets and IP address ranges so none overlap. The original question is here Editing csv file to edit subnets so there is no overlap in ...
0
votes
0answers
15 views

Editing csv file to edit subnets so there is no overlap in IP ranges (ipaddress module in Python 3.3)

I have been trying to create a csv file that will change all the subnets and IP address ranges so none overlap. I have this file to start: Zone Name, IPStart, IPStop,Range,Source Group ...
2
votes
4answers
67 views

Average List from a List of Lists - Is there a more efficient way?

I have a list of lists named 'run'. I am creating an average of those lists using this section of my code: ave = [0 for t in range(s)] for t in range(s): z = 0 for i in range(l): z = ...
-4
votes
0answers
38 views

Python finally not catching KeyboardInterrupt [on hold]

Why doesn't the finally catch keyboard interrupts in this example? try: print("Waiting for something...") ...
3
votes
2answers
112 views

Writing numbers from 0 to 1000000000

I am trying to write a list of the numbers from 0 to 1000000000 as strings, directly to a text file. I would also like each number to have leading zeros up to ten digit places, e.g. 0000000000, ...
1
vote
1answer
23 views

Howto deploy python applications inside corporate network

First let me explain the current situation: We do have several python applications which depend on custom (not public released ones) as well as general known packages. These depedencies are all ...
0
votes
1answer
9 views

How to stop traversing current root and iterate to the next one

I'm writing a simple function that walks through a directory tree looking for folders of a certain name. What I'm after is a match's parent path. E.g., for "C:/a/b/c/MATCH" I want "C:/a/b/c". I don't ...
3
votes
1answer
20 views

How to escape number in regex

So I was replacing characters by re module. I have a string 'abc_def' and need to add 1 after _. So I was doing this. st = 'abc_def' re.sub(r'^(\w+_)('')(\w+)$',r'\11\3',st) But this takes \11 as ...
0
votes
0answers
7 views

Python handle custom exception from java web service

I have a java web service and python client using suds. My server raises custom exceptions which I would like to handle in the python script. Is it possible to catch them or it always will be caught ...
1
vote
2answers
38 views

Python: How to get an entry box within a message box?

I just realised I hadn't asked the user for their name at the start of the game. So I tried this code: Label(root, text="What is you name?").grid(row=0, column=0) e1 = self.Entry(root) ...
0
votes
1answer
20 views

Image does not open with python imaging library

I have just installed the Python imaging library and started to learn it but I cannot sem to open the image file. import Image im = Image.open("Desert.jpg") print im.format, im.size, ...
0
votes
2answers
32 views

Python 3 Syntax Error “>” via GrokLearning

method = input("Is it currently raining? ") if method=="Yes" : print("You should take the bus.") else: distance = input("How far in km do you want to travel? ") if distance == > 2: ...

1 2 3 4 5 320
15 30 50 per page