Format: application/x-python-code
1 o
2
3 ��h, � @ s( d Z ddlmZ dd� Z d dd�ZdS )
4 zka clumsy attempt at a macro language to let the programmer execute code on the server (ex: determine 64bit)� )�is64bitc C s� t |ttf�r
5 |g}|d }z�| dkr5t�� r||d fW S z||d fW W S ty4 |df Y W S w | dkrI||vrHddl}||�� fW S n~| dkrnddl}z||d |�� fW W S tym ||�� f Y W S w | d kr�ddl }z|d }W n ty� d}Y nw ||j
6 �|d |�fW S | d
7 kr�d|vs�|d s�|dfW S |d
8 | fW S | dkr�ddl }ddl}||j
9 �|�� d|d �fW S td| � ��� td| � d|����)ay allow the programmer to perform limited processing on the server by passing macro names and args
10
11 :new_key - the key name the macro will create
12 :args[0] - macro name
13 :args[1:] - any arguments
14 :code - the value of the keyword item
15 :kwargs - the connection keyword dictionary. ??key has been removed
16 --> the value to put in for kwargs['name'] = value
17 � r r � � �getuserN�getnode�getenvZ
18 auto_security�userzIntegrated Security=SSPIz'User ID=%(user)s; Password=%(password)sZfind_temp_test_pathZ
19 adodbapi_testzUnknown connect string macro=zError in macro processing � )�
20 isinstance�strr �Python�
21 IndexError�getpassr �platform�node�os�environ�get�tempfile�path�join�
22 gettempdir�
23 ValueError) �
24 macro_name�args�kwargs�new_keyr r r Zdfltr � r �Uc:\Users\shubh\Videos\agent\nova\Lib\site-packages\adodbapi/process_connect_string.py�
25 macro_call s\
26 �����
27 �r Fc
28 C s� z| d }W n t y d}Y nw t|t�r|�|� n|r#||d<