In Progress

Edit lines of code in Python (.py) program

I have a Python program the has the following lines of code in the .py file:

def getWorkingDirectory():

cFile = open ("conf","r")

conf = [url removed, login to view]()

conf = [url removed, login to view]("\t","")

workDirectory = [url removed, login to view]('<DIRECTORY>(.*?)</DIRECTORY>', [url removed, login to view] | [url removed, login to view]).findall(conf)

return workDirectory[0]

The program goes to get a working directory that is defined in a file called 'conf'. The contents of the conf file are here:

<DIRECTORY>/home/user/Desktop</DIRECTORY>

I want to eliminate the need for the 'conf' file and define the working directory in the Python .py file. I need to know what the lines of code should be to do this. I was thinking this would work but it didn't:

def getWorkingDirectory():

workDirectory = [url removed, login to view]('<DIRECTORY>/home/user/Desktop</DIRECTORY>', [url removed, login to view] | [url removed, login to view]).findall(conf)

return workDirectory[0]

Skills: Python

See more: python home work, get a code, R program, python work, python program, python read, read lines, open code, program python, code read, compile code, read code, compile python, lines code, python read file, python file read, open program, python desktop, python code, edit user, code called, called code, code r, file read program, compile program

About the Employer:
( 9 reviews ) Lawrenceville, United States

Project ID: #2510368

Awarded to:

kailashbuki

I have previous experience on such projects. Allow me to do it. :)

$30 USD in 1 day
(8 Reviews)
4.6

11 freelancers are bidding on average $30 for this job

samitXI

please check your inbox. Thanks

$30 USD in 1 day
(20 Reviews)
5.0
M5L2764K

See the private message

$30 USD in 1 day
(10 Reviews)
4.8
EngineerCat

Hi! please read my PM, Thanks!

$30 USD in 0 days
(8 Reviews)
4.2
skhohlov

Hello, It is easy task. I can help you by skype and make some training for you.

$30 USD in 1 day
(1 Review)
2.6
hddh

I can do it.

$30 USD in 0 days
(3 Reviews)
2.0
exsys

Available right away.

$30 USD in 0 days
(1 Review)
1.4
martinsuly

Hi, expert in the area. I am interested in your project. Thanks.

$30 USD in 1 day
(0 Reviews)
0.0
Qiantangren

Hi, I could help you with this problem. I'm familiar with python program, while I have write an python web site with a uliweb framework, a chinese python web site develop framework. So I hope I could help you now.

$30 USD in 1 day
(0 Reviews)
0.0
herpay

Hello, I can send you the solution immediately after you choose my bid. Regards, Tamas

$30 USD in 0 days
(0 Reviews)
0.0
jegorami

I've been working as a python developer for over 6 years. I can help you over skype in no time.

$30 USD in 1 day
(0 Reviews)
0.0