@@ -318,35 +318,6 @@ internal static void Initialize()
318
318
Runtime . PyList_Append ( path , item ) ;
319
319
Runtime . XDecref ( item ) ;
320
320
AssemblyManager . UpdatePath ( ) ;
321
-
322
- IntPtr sysmodule = Runtime . PyImport_ImportModule ( "sys" ) ;
323
- IntPtr sysargv = Runtime . PyObject_GetAttrString ( sysmodule , "argv" ) ;
324
- //if sys.argv is available, no need to mess with it
325
- if ( sysargv == IntPtr . Zero ) {
326
- string [ ] clrargv ;
327
- try {
328
- clrargv = System . Environment . GetCommandLineArgs ( ) ;
329
- }
330
- catch ( NotSupportedException ) {
331
- // some platforms do not support argv
332
- // Need to add at least the list with empty string to sys.argv,
333
- // this is how python interpreter gets loaded in interactive mode
334
- clrargv = new string [ ] { String . Empty } ;
335
- }
336
- int vi = 0 ;
337
- int clrargc = clrargv . Length ;
338
- IntPtr pylistargv = PyList_New ( clrargc ) ;
339
- foreach ( string clrargvi in clrargv ) {
340
- IntPtr pystrargvi = PyString_FromString ( clrargvi ) ;
341
- Runtime . XIncref ( pystrargvi ) ;
342
- int r = Runtime . PyList_SetItem ( pylistargv , vi , pystrargvi ) ;
343
- vi += 1 ;
344
- if ( r < 0 ) {
345
- throw new PythonException ( ) ;
346
- }
347
- }
348
- PySys_SetArgvEx ( clrargc , pylistargv , 0 ) ;
349
- }
350
321
}
351
322
352
323
internal static void Shutdown ( )
@@ -2125,11 +2096,6 @@ int updatepath
2125
2096
) ;
2126
2097
#endif
2127
2098
2128
- [ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl,
2129
- ExactSpelling = true, CharSet = CharSet . Ansi ) ]
2130
- internal unsafe static extern void
2131
- PySys_SetArgvEx ( int argc , IntPtr argv , int updatepath ) ;
2132
-
2133
2099
[ DllImport ( Runtime . dll , CallingConvention = CallingConvention . Cdecl,
2134
2100
ExactSpelling = true, CharSet = CharSet . Ansi ) ]
2135
2101
internal unsafe static extern IntPtr
0 commit comments