github.com/goplus/llgo@v0.8.3/py/os/gen.go (about) 1 package os 2 3 import ( 4 _ "unsafe" 5 6 "github.com/goplus/llgo/py" 7 ) 8 9 const LLGoPackage = "py.os" 10 11 // Perform a stat system call on the given path. 12 // 13 // path 14 // Path to be examined; can be string, bytes, a path-like object or 15 // open-file-descriptor int. 16 // dir_fd 17 // If not None, it should be a file descriptor open to a directory, 18 // and path should be a relative string; path will then be relative to 19 // that directory. 20 // follow_symlinks 21 // If False, and the last element of the path is a symbolic link, 22 // stat will examine the symbolic link itself instead of the file 23 // the link points to. 24 // 25 // dir_fd and follow_symlinks may not be implemented 26 // 27 // on your platform. If they are unavailable, using them will raise a 28 // NotImplementedError. 29 // 30 // It's an error to use dir_fd or follow_symlinks when specifying path as 31 // 32 // an open file descriptor. 33 // 34 //go:linkname Stat py.stat 35 func Stat(path *py.Object) *py.Object 36 37 // Use the real uid/gid to test for access to a path. 38 // 39 // path 40 // Path to be tested; can be string, bytes, or a path-like object. 41 // mode 42 // Operating-system mode bitfield. Can be F_OK to test existence, 43 // or the inclusive-OR of R_OK, W_OK, and X_OK. 44 // dir_fd 45 // If not None, it should be a file descriptor open to a directory, 46 // and path should be relative; path will then be relative to that 47 // directory. 48 // effective_ids 49 // If True, access will use the effective uid/gid instead of 50 // the real uid/gid. 51 // follow_symlinks 52 // If False, and the last element of the path is a symbolic link, 53 // access will examine the symbolic link itself instead of the file 54 // the link points to. 55 // 56 // dir_fd, effective_ids, and follow_symlinks may not be implemented 57 // 58 // on your platform. If they are unavailable, using them will raise a 59 // NotImplementedError. 60 // 61 // Note that most operations will use the effective uid/gid, therefore this 62 // 63 // routine can be used in a suid/sgid environment to test if the invoking user 64 // has the specified access to the path. 65 // 66 //go:linkname Access py.access 67 func Access(path *py.Object, mode *py.Object) *py.Object 68 69 // Return the name of the terminal device connected to 'fd'. 70 // 71 // fd 72 // Integer file descriptor handle. 73 // 74 //go:linkname Ttyname py.ttyname 75 func Ttyname(fd *py.Object) *py.Object 76 77 // Change the current working directory to the specified path. 78 // 79 // path may always be specified as a string. 80 // On some platforms, path may also be specified as an open file descriptor. 81 // 82 // If this functionality is unavailable, using it raises an exception. 83 // 84 //go:linkname Chdir py.chdir 85 func Chdir(path *py.Object) *py.Object 86 87 // Set file flags. 88 // 89 // If follow_symlinks is False, and the last element of the path is a symbolic 90 // 91 // link, chflags will change flags on the symbolic link itself instead of the 92 // file the link points to. 93 // 94 // follow_symlinks may not be implemented on your platform. If it is 95 // unavailable, using it will raise a NotImplementedError. 96 // 97 //go:linkname Chflags py.chflags 98 func Chflags(path *py.Object, flags *py.Object, followSymlinks *py.Object) *py.Object 99 100 // Change the access permissions of a file. 101 // 102 // path 103 // Path to be modified. May always be specified as a str, bytes, or a path-like object. 104 // On some platforms, path may also be specified as an open file descriptor. 105 // If this functionality is unavailable, using it raises an exception. 106 // mode 107 // Operating-system mode bitfield. 108 // Be careful when using number literals for *mode*. The conventional UNIX notation for 109 // numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in 110 // Python. 111 // dir_fd 112 // If not None, it should be a file descriptor open to a directory, 113 // and path should be relative; path will then be relative to that 114 // directory. 115 // follow_symlinks 116 // If False, and the last element of the path is a symbolic link, 117 // chmod will modify the symbolic link itself instead of the file 118 // the link points to. 119 // 120 // It is an error to use dir_fd or follow_symlinks when specifying path as 121 // 122 // an open file descriptor. 123 // 124 // dir_fd and follow_symlinks may not be implemented on your platform. 125 // 126 // If they are unavailable, using them will raise a NotImplementedError. 127 // 128 //go:linkname Chmod py.chmod 129 func Chmod(path *py.Object, mode *py.Object) *py.Object 130 131 // Change the access permissions of the file given by file descriptor fd. 132 // 133 // fd 134 // The file descriptor of the file to be modified. 135 // mode 136 // Operating-system mode bitfield. 137 // Be careful when using number literals for *mode*. The conventional UNIX notation for 138 // numeric modes uses an octal base, which needs to be indicated with a ``0o`` prefix in 139 // Python. 140 // 141 // Equivalent to os.chmod(fd, mode). 142 // 143 //go:linkname Fchmod py.fchmod 144 func Fchmod(fd *py.Object, mode *py.Object) *py.Object 145 146 // Change the access permissions of a file, without following symbolic links. 147 // 148 // If path is a symlink, this affects the link itself rather than the target. 149 // Equivalent to chmod(path, mode, follow_symlinks=False)." 150 // 151 //go:linkname Lchmod py.lchmod 152 func Lchmod(path *py.Object, mode *py.Object) *py.Object 153 154 // Change the owner and group id of path to the numeric uid and gid.\ 155 // 156 // path 157 // Path to be examined; can be string, bytes, a path-like object, or open-file-descriptor int. 158 // dir_fd 159 // If not None, it should be a file descriptor open to a directory, 160 // and path should be relative; path will then be relative to that 161 // directory. 162 // follow_symlinks 163 // If False, and the last element of the path is a symbolic link, 164 // stat will examine the symbolic link itself instead of the file 165 // the link points to. 166 // 167 // path may always be specified as a string. 168 // On some platforms, path may also be specified as an open file descriptor. 169 // 170 // If this functionality is unavailable, using it raises an exception. 171 // 172 // If dir_fd is not None, it should be a file descriptor open to a directory, 173 // 174 // and path should be relative; path will then be relative to that directory. 175 // 176 // If follow_symlinks is False, and the last element of the path is a symbolic 177 // 178 // link, chown will modify the symbolic link itself instead of the file the 179 // link points to. 180 // 181 // It is an error to use dir_fd or follow_symlinks when specifying path as 182 // 183 // an open file descriptor. 184 // 185 // dir_fd and follow_symlinks may not be implemented on your platform. 186 // 187 // If they are unavailable, using them will raise a NotImplementedError. 188 // 189 //go:linkname Chown py.chown 190 func Chown(path *py.Object, uid *py.Object, gid *py.Object) *py.Object 191 192 // Change the owner and group id of the file specified by file descriptor. 193 // 194 // Equivalent to os.chown(fd, uid, gid). 195 // 196 //go:linkname Fchown py.fchown 197 func Fchown(fd *py.Object, uid *py.Object, gid *py.Object) *py.Object 198 199 // Change the owner and group id of path to the numeric uid and gid. 200 // 201 // This function will not follow symbolic links. 202 // Equivalent to os.chown(path, uid, gid, follow_symlinks=False). 203 // 204 //go:linkname Lchown py.lchown 205 func Lchown(path *py.Object, uid *py.Object, gid *py.Object) *py.Object 206 207 // Set file flags. 208 // 209 // This function will not follow symbolic links. 210 // Equivalent to chflags(path, flags, follow_symlinks=False). 211 // 212 //go:linkname Lchflags py.lchflags 213 func Lchflags(path *py.Object, flags *py.Object) *py.Object 214 215 // Change root directory to path. 216 // 217 //go:linkname Chroot py.chroot 218 func Chroot(path *py.Object) *py.Object 219 220 // Return the name of the controlling terminal for this process. 221 // 222 //go:linkname Ctermid py.ctermid 223 func Ctermid() *py.Object 224 225 // Return a unicode string representing the current working directory. 226 // 227 //go:linkname Getcwd py.getcwd 228 func Getcwd() *py.Object 229 230 // Return a bytes string representing the current working directory. 231 // 232 //go:linkname Getcwdb py.getcwdb 233 func Getcwdb() *py.Object 234 235 // Create a hard link to a file. 236 // 237 // If either src_dir_fd or dst_dir_fd is not None, it should be a file 238 // 239 // descriptor open to a directory, and the respective path string (src or dst) 240 // should be relative; the path will then be relative to that directory. 241 // 242 // If follow_symlinks is False, and the last element of src is a symbolic 243 // 244 // link, link will create a link to the symbolic link itself instead of the 245 // file the link points to. 246 // 247 // src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your 248 // 249 // platform. If they are unavailable, using them will raise a 250 // NotImplementedError. 251 // 252 //go:linkname Link py.link 253 func Link(src *py.Object, dst *py.Object) *py.Object 254 255 // Return a list containing the names of the files in the directory. 256 // 257 // path can be specified as either str, bytes, or a path-like object. If path is bytes, 258 // 259 // the filenames returned will also be bytes; in all other circumstances 260 // the filenames returned will be str. 261 // 262 // If path is None, uses the path='.'. 263 // 264 // On some platforms, path may also be specified as an open file descriptor;\ 265 // the file descriptor must refer to a directory. 266 // If this functionality is unavailable, using it raises NotImplementedError. 267 // 268 // The list is in arbitrary order. It does not include the special 269 // entries '.' and '..' even if they are present in the directory. 270 // 271 //go:linkname Listdir py.listdir 272 func Listdir(path *py.Object) *py.Object 273 274 // Perform a stat system call on the given path, without following symbolic links. 275 // 276 // Like stat(), but do not follow symbolic links. 277 // Equivalent to stat(path, follow_symlinks=False). 278 // 279 //go:linkname Lstat py.lstat 280 func Lstat(path *py.Object) *py.Object 281 282 // Create a directory. 283 // 284 // If dir_fd is not None, it should be a file descriptor open to a directory, 285 // 286 // and path should be relative; path will then be relative to that directory. 287 // 288 // dir_fd may not be implemented on your platform. 289 // 290 // If it is unavailable, using it will raise a NotImplementedError. 291 // 292 // The mode argument is ignored on Windows. Where it is used, the current umask 293 // value is first masked out. 294 // 295 //go:linkname Mkdir py.mkdir 296 func Mkdir(path *py.Object, mode *py.Object) *py.Object 297 298 // Add increment to the priority of process and return the new priority. 299 // 300 //go:linkname Nice py.nice 301 func Nice(increment *py.Object) *py.Object 302 303 // Return program scheduling priority. 304 // 305 //go:linkname Getpriority py.getpriority 306 func Getpriority(which *py.Object, who *py.Object) *py.Object 307 308 // Set program scheduling priority. 309 // 310 //go:linkname Setpriority py.setpriority 311 func Setpriority(which *py.Object, who *py.Object, priority *py.Object) *py.Object 312 313 // Remove a directory. 314 // 315 // If dir_fd is not None, it should be a file descriptor open to a directory, 316 // 317 // and path should be relative; path will then be relative to that directory. 318 // 319 // dir_fd may not be implemented on your platform. 320 // 321 // If it is unavailable, using it will raise a NotImplementedError. 322 // 323 //go:linkname Rmdir py.rmdir 324 func Rmdir(path *py.Object) *py.Object 325 326 // Create a symbolic link pointing to src named dst. 327 // 328 // target_is_directory is required on Windows if the target is to be 329 // 330 // interpreted as a directory. (On Windows, symlink requires 331 // Windows 6.0 or greater, and raises a NotImplementedError otherwise.) 332 // target_is_directory is ignored on non-Windows platforms. 333 // 334 // If dir_fd is not None, it should be a file descriptor open to a directory, 335 // 336 // and path should be relative; path will then be relative to that directory. 337 // 338 // dir_fd may not be implemented on your platform. 339 // 340 // If it is unavailable, using it will raise a NotImplementedError. 341 // 342 //go:linkname Symlink py.symlink 343 func Symlink(src *py.Object, dst *py.Object, targetIsDirectory *py.Object) *py.Object 344 345 // Execute the command in a subshell. 346 // 347 //go:linkname System py.system 348 func System(command *py.Object) *py.Object 349 350 // Set the current numeric umask and return the previous umask. 351 // 352 //go:linkname Umask py.umask 353 func Umask(mask *py.Object) *py.Object 354 355 // Return an object identifying the current operating system. 356 // 357 // The object behaves like a named tuple with the following fields: 358 // 359 // (sysname, nodename, release, version, machine) 360 // 361 //go:linkname Uname py.uname 362 func Uname() *py.Object 363 364 // Remove a file (same as remove()). 365 // 366 // If dir_fd is not None, it should be a file descriptor open to a directory, 367 // 368 // and path should be relative; path will then be relative to that directory. 369 // 370 // dir_fd may not be implemented on your platform. 371 // 372 // If it is unavailable, using it will raise a NotImplementedError. 373 // 374 //go:linkname Unlink py.unlink 375 func Unlink(path *py.Object) *py.Object 376 377 // Remove a file (same as unlink()). 378 // 379 // If dir_fd is not None, it should be a file descriptor open to a directory, 380 // 381 // and path should be relative; path will then be relative to that directory. 382 // 383 // dir_fd may not be implemented on your platform. 384 // 385 // If it is unavailable, using it will raise a NotImplementedError. 386 // 387 //go:linkname Remove py.remove 388 func Remove(path *py.Object) *py.Object 389 390 // Return a collection containing process timing information. 391 // 392 // The object returned behaves like a named tuple with these fields: 393 // 394 // (utime, stime, cutime, cstime, elapsed_time) 395 // 396 // All fields are floating point numbers. 397 // 398 //go:linkname Times py.times 399 func Times() *py.Object 400 401 // Execute an executable path with arguments, replacing current process. 402 // 403 // path 404 // Path of executable file. 405 // argv 406 // Tuple or list of strings. 407 // 408 //go:linkname Execv py.execv 409 func Execv(path *py.Object, argv *py.Object) *py.Object 410 411 // Execute an executable path with arguments, replacing current process. 412 // 413 // path 414 // Path of executable file. 415 // argv 416 // Tuple or list of strings. 417 // env 418 // Dictionary of strings mapping to strings. 419 // 420 //go:linkname Execve py.execve 421 func Execve(path *py.Object, argv *py.Object, env *py.Object) *py.Object 422 423 // Fork a child process. 424 // 425 // Return 0 to child process and PID of child to parent process. 426 // 427 //go:linkname Fork py.fork 428 func Fork() *py.Object 429 430 // Get the minimum scheduling priority for policy. 431 // 432 //go:linkname SchedGetPriorityMin py.sched_get_priority_min 433 func SchedGetPriorityMin(policy *py.Object) *py.Object 434 435 // Voluntarily relinquish the CPU. 436 // 437 //go:linkname SchedYield py.sched_yield 438 func SchedYield() *py.Object 439 440 // Open a pseudo-terminal. 441 // 442 // Return a tuple of (master_fd, slave_fd) containing open file descriptors 443 // for both the master and slave ends. 444 // 445 //go:linkname Openpty py.openpty 446 func Openpty() *py.Object 447 448 // Prepare the tty of which fd is a file descriptor for a new login session. 449 // 450 // Make the calling process a session leader; make the tty the 451 // controlling tty, the stdin, the stdout, and the stderr of the 452 // calling process; close fd. 453 // 454 //go:linkname LoginTty py.login_tty 455 func LoginTty(fd *py.Object) *py.Object 456 457 // Fork a new process with a new pseudo-terminal as controlling tty. 458 // 459 // Returns a tuple of (pid, master_fd). 460 // Like fork(), return pid of 0 to the child process, 461 // and pid of child to the parent process. 462 // To both, return fd of newly opened pseudo-terminal. 463 // 464 //go:linkname Forkpty py.forkpty 465 func Forkpty() *py.Object 466 467 // Return the current process's effective group id. 468 // 469 //go:linkname Getegid py.getegid 470 func Getegid() *py.Object 471 472 // Return the current process's effective user id. 473 // 474 //go:linkname Geteuid py.geteuid 475 func Geteuid() *py.Object 476 477 // Return the current process's group id. 478 // 479 //go:linkname Getgid py.getgid 480 func Getgid() *py.Object 481 482 // Returns a list of groups to which a user belongs. 483 // 484 // user 485 // username to lookup 486 // group 487 // base group id of the user 488 // 489 //go:linkname Getgrouplist py.getgrouplist 490 func Getgrouplist(user *py.Object, group *py.Object) *py.Object 491 492 // Return list of supplemental group IDs for the process. 493 // 494 //go:linkname Getgroups py.getgroups 495 func Getgroups() *py.Object 496 497 // Return the current process id. 498 // 499 //go:linkname Getpid py.getpid 500 func Getpid() *py.Object 501 502 // Return the current process group id. 503 // 504 //go:linkname Getpgrp py.getpgrp 505 func Getpgrp() *py.Object 506 507 // Return the parent's process id. 508 // 509 // If the parent process has already exited, Windows machines will still 510 // return its id; others systems will return the id of the 'init' process (1). 511 // 512 //go:linkname Getppid py.getppid 513 func Getppid() *py.Object 514 515 // Return the current process's user id. 516 // 517 //go:linkname Getuid py.getuid 518 func Getuid() *py.Object 519 520 // Return the actual login name. 521 // 522 //go:linkname Getlogin py.getlogin 523 func Getlogin() *py.Object 524 525 // Kill a process with a signal. 526 // 527 //go:linkname Kill py.kill 528 func Kill(pid *py.Object, signal *py.Object) *py.Object 529 530 // Kill a process group with a signal. 531 // 532 //go:linkname Killpg py.killpg 533 func Killpg(pgid *py.Object, signal *py.Object) *py.Object 534 535 // Set the current process's user id. 536 // 537 //go:linkname Setuid py.setuid 538 func Setuid(uid *py.Object) *py.Object 539 540 // Set the current process's effective user id. 541 // 542 //go:linkname Seteuid py.seteuid 543 func Seteuid(euid *py.Object) *py.Object 544 545 // Set the current process's real and effective user ids. 546 // 547 //go:linkname Setreuid py.setreuid 548 func Setreuid(ruid *py.Object, euid *py.Object) *py.Object 549 550 // Set the current process's group id. 551 // 552 //go:linkname Setgid py.setgid 553 func Setgid(gid *py.Object) *py.Object 554 555 // Set the current process's effective group id. 556 // 557 //go:linkname Setegid py.setegid 558 func Setegid(egid *py.Object) *py.Object 559 560 // Set the current process's real and effective group ids. 561 // 562 //go:linkname Setregid py.setregid 563 func Setregid(rgid *py.Object, egid *py.Object) *py.Object 564 565 // Set the groups of the current process to list. 566 // 567 //go:linkname Setgroups py.setgroups 568 func Setgroups(groups *py.Object) *py.Object 569 570 // Initialize the group access list. 571 // 572 // Call the system initgroups() to initialize the group access list with all of 573 // the groups of which the specified username is a member, plus the specified 574 // group id. 575 // 576 //go:linkname Initgroups py.initgroups 577 func Initgroups(username *py.Object, gid *py.Object) *py.Object 578 579 // Call the system call getpgid(), and return the result. 580 // 581 //go:linkname Getpgid py.getpgid 582 func Getpgid(pid *py.Object) *py.Object 583 584 // Make the current process the leader of its process group. 585 // 586 //go:linkname Setpgrp py.setpgrp 587 func Setpgrp() *py.Object 588 589 // Wait for completion of a child process. 590 // 591 // Returns a tuple of information about the child process: 592 // 593 // (pid, status) 594 // 595 //go:linkname Wait py.wait 596 func Wait() *py.Object 597 598 // Wait for completion of a child process. 599 // 600 // Returns a tuple of information about the child process: 601 // 602 // (pid, status, rusage) 603 // 604 //go:linkname Wait3 py.wait3 605 func Wait3(options *py.Object) *py.Object 606 607 // Wait for completion of a specific child process. 608 // 609 // Returns a tuple of information about the child process: 610 // 611 // (pid, status, rusage) 612 // 613 //go:linkname Wait4 py.wait4 614 func Wait4(pid *py.Object, options *py.Object) *py.Object 615 616 // Wait for completion of a given child process. 617 // 618 // Returns a tuple of information regarding the child process: 619 // 620 // (pid, status) 621 // 622 // The options argument is ignored on Windows. 623 // 624 //go:linkname Waitpid py.waitpid 625 func Waitpid(pid *py.Object, options *py.Object) *py.Object 626 627 // Call the system call getsid(pid) and return the result. 628 // 629 //go:linkname Getsid py.getsid 630 func Getsid(pid *py.Object) *py.Object 631 632 // Call the system call setsid(). 633 // 634 //go:linkname Setsid py.setsid 635 func Setsid() *py.Object 636 637 // Call the system call setpgid(pid, pgrp). 638 // 639 //go:linkname Setpgid py.setpgid 640 func Setpgid(pid *py.Object, pgrp *py.Object) *py.Object 641 642 // Return the process group associated with the terminal specified by fd. 643 // 644 //go:linkname Tcgetpgrp py.tcgetpgrp 645 func Tcgetpgrp(fd *py.Object) *py.Object 646 647 // Set the process group associated with the terminal specified by fd. 648 // 649 //go:linkname Tcsetpgrp py.tcsetpgrp 650 func Tcsetpgrp(fd *py.Object, pgid *py.Object) *py.Object 651 652 // Open a file for low level IO. Returns a file descriptor (integer). 653 // 654 // If dir_fd is not None, it should be a file descriptor open to a directory, 655 // 656 // and path should be relative; path will then be relative to that directory. 657 // 658 // dir_fd may not be implemented on your platform. 659 // 660 // If it is unavailable, using it will raise a NotImplementedError. 661 // 662 //go:linkname Open py.open 663 func Open(path *py.Object, flags *py.Object, mode *py.Object) *py.Object 664 665 // Close a file descriptor. 666 // 667 //go:linkname Close py.close 668 func Close(fd *py.Object) *py.Object 669 670 // Closes all file descriptors in [fd_low, fd_high), ignoring errors. 671 // 672 //go:linkname Closerange py.closerange 673 func Closerange(fdLow *py.Object, fdHigh *py.Object) *py.Object 674 675 // Return a string describing the encoding of a terminal's file descriptor. 676 // 677 // The file descriptor must be attached to a terminal. 678 // If the device is not a terminal, return None. 679 // 680 //go:linkname DeviceEncoding py.device_encoding 681 func DeviceEncoding(fd *py.Object) *py.Object 682 683 // Return a duplicate of a file descriptor. 684 // 685 //go:linkname Dup py.dup 686 func Dup(fd *py.Object) *py.Object 687 688 // Duplicate file descriptor. 689 // 690 //go:linkname Dup2 py.dup2 691 func Dup2(fd *py.Object, fd2 *py.Object, inheritable *py.Object) *py.Object 692 693 // Apply, test or remove a POSIX lock on an open file descriptor. 694 // 695 // fd 696 // An open file descriptor. 697 // command 698 // One of F_LOCK, F_TLOCK, F_ULOCK or F_TEST. 699 // length 700 // The number of bytes to lock, starting at the current position. 701 // 702 //go:linkname Lockf py.lockf 703 func Lockf(fd *py.Object, command *py.Object, length *py.Object) *py.Object 704 705 // Set the position of a file descriptor. Return the new position. 706 // 707 // fd 708 // An open file descriptor, as returned by os.open(). 709 // position 710 // Position, interpreted relative to 'whence'. 711 // whence 712 // The relative position to seek from. Valid values are: 713 // - SEEK_SET: seek from the start of the file. 714 // - SEEK_CUR: seek from the current file position. 715 // - SEEK_END: seek from the end of the file. 716 // 717 // The return value is the number of bytes relative to the beginning of the file. 718 // 719 //go:linkname Lseek py.lseek 720 func Lseek(fd *py.Object, position *py.Object, whence *py.Object) *py.Object 721 722 // Read from a file descriptor. Returns a bytes object. 723 // 724 //go:linkname Read py.read 725 func Read(fd *py.Object, length *py.Object) *py.Object 726 727 // Read from a file descriptor fd into an iterable of buffers. 728 // 729 // The buffers should be mutable buffers accepting bytes. 730 // readv will transfer data into each buffer until it is full 731 // and then move on to the next buffer in the sequence to hold 732 // the rest of the data. 733 // 734 // readv returns the total number of bytes read, 735 // which may be less than the total capacity of all the buffers. 736 // 737 //go:linkname Readv py.readv 738 func Readv(fd *py.Object, buffers *py.Object) *py.Object 739 740 // Read a number of bytes from a file descriptor starting at a particular offset. 741 // 742 // Read length bytes from file descriptor fd, starting at offset bytes from 743 // the beginning of the file. The file offset remains unchanged. 744 // 745 //go:linkname Pread py.pread 746 func Pread(fd *py.Object, length *py.Object, offset *py.Object) *py.Object 747 748 // Reads from a file descriptor into a number of mutable bytes-like objects. 749 // 750 // Combines the functionality of readv() and pread(). As readv(), it will 751 // transfer data into each buffer until it is full and then move on to the next 752 // buffer in the sequence to hold the rest of the data. Its fourth argument, 753 // specifies the file offset at which the input operation is to be performed. It 754 // will return the total number of bytes read (which can be less than the total 755 // capacity of all the objects). 756 // 757 // The flags argument contains a bitwise OR of zero or more of the following flags: 758 // 759 // - RWF_HIPRI 760 // - RWF_NOWAIT 761 // 762 // Using non-zero flags requires Linux 4.6 or newer. 763 // 764 //go:linkname Preadv py.preadv 765 func Preadv(fd *py.Object, buffers *py.Object, offset *py.Object, flags *py.Object) *py.Object 766 767 // Write a bytes object to a file descriptor. 768 // 769 //go:linkname Write py.write 770 func Write(fd *py.Object, data *py.Object) *py.Object 771 772 // Iterate over buffers, and write the contents of each to a file descriptor. 773 // 774 // Returns the total number of bytes written. 775 // buffers must be a sequence of bytes-like objects. 776 // 777 //go:linkname Writev py.writev 778 func Writev(fd *py.Object, buffers *py.Object) *py.Object 779 780 // Write bytes to a file descriptor starting at a particular offset. 781 // 782 // Write buffer to fd, starting at offset bytes from the beginning of 783 // the file. Returns the number of bytes writte. Does not change the 784 // current file offset. 785 // 786 //go:linkname Pwrite py.pwrite 787 func Pwrite(fd *py.Object, buffer *py.Object, offset *py.Object) *py.Object 788 789 // Writes the contents of bytes-like objects to a file descriptor at a given offset. 790 // 791 // Combines the functionality of writev() and pwrite(). All buffers must be a sequence 792 // of bytes-like objects. Buffers are processed in array order. Entire contents of first 793 // buffer is written before proceeding to second, and so on. The operating system may 794 // set a limit (sysconf() value SC_IOV_MAX) on the number of buffers that can be used. 795 // This function writes the contents of each object to the file descriptor and returns 796 // the total number of bytes written. 797 // 798 // The flags argument contains a bitwise OR of zero or more of the following flags: 799 // 800 // - RWF_DSYNC 801 // - RWF_SYNC 802 // - RWF_APPEND 803 // 804 // Using non-zero flags requires Linux 4.7 or newer. 805 // 806 //go:linkname Pwritev py.pwritev 807 func Pwritev(fd *py.Object, buffers *py.Object, offset *py.Object, flags *py.Object) *py.Object 808 809 // Copy count bytes from file descriptor in_fd to file descriptor out_fd. 810 // 811 //go:linkname Sendfile py.sendfile 812 func Sendfile(outFd *py.Object, inFd *py.Object, offset *py.Object, count *py.Object, headers *py.Object, trailers *py.Object, flags *py.Object) *py.Object 813 814 // Perform a stat system call on the given file descriptor. 815 // 816 // Like stat(), but for an open file descriptor. 817 // Equivalent to os.stat(fd). 818 // 819 //go:linkname Fstat py.fstat 820 func Fstat(fd *py.Object) *py.Object 821 822 // Return True if the fd is connected to a terminal. 823 // 824 // Return True if the file descriptor is an open file descriptor 825 // connected to the slave end of a terminal. 826 // 827 //go:linkname Isatty py.isatty 828 func Isatty(fd *py.Object) *py.Object 829 830 // Create a pipe. 831 // 832 // Returns a tuple of two file descriptors: 833 // 834 // (read_fd, write_fd) 835 // 836 //go:linkname Pipe py.pipe 837 func Pipe() *py.Object 838 839 // Create a "fifo" (a POSIX named pipe). 840 // 841 // If dir_fd is not None, it should be a file descriptor open to a directory, 842 // 843 // and path should be relative; path will then be relative to that directory. 844 // 845 // dir_fd may not be implemented on your platform. 846 // 847 // If it is unavailable, using it will raise a NotImplementedError. 848 // 849 //go:linkname Mkfifo py.mkfifo 850 func Mkfifo(path *py.Object, mode *py.Object) *py.Object 851 852 // Create a node in the file system. 853 // 854 // Create a node in the file system (file, device special file or named pipe) 855 // at path. mode specifies both the permissions to use and the 856 // type of node to be created, being combined (bitwise OR) with one of 857 // S_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO. If S_IFCHR or S_IFBLK is set on mode, 858 // device defines the newly created device special file (probably using 859 // os.makedev()). Otherwise device is ignored. 860 // 861 // If dir_fd is not None, it should be a file descriptor open to a directory, 862 // 863 // and path should be relative; path will then be relative to that directory. 864 // 865 // dir_fd may not be implemented on your platform. 866 // 867 // If it is unavailable, using it will raise a NotImplementedError. 868 // 869 //go:linkname Mknod py.mknod 870 func Mknod(path *py.Object, mode *py.Object, device *py.Object) *py.Object 871 872 // Extracts a device major number from a raw device number. 873 // 874 //go:linkname Major py.major 875 func Major(device *py.Object) *py.Object 876 877 // Extracts a device minor number from a raw device number. 878 // 879 //go:linkname Minor py.minor 880 func Minor(device *py.Object) *py.Object 881 882 // Composes a raw device number from the major and minor device numbers. 883 // 884 //go:linkname Makedev py.makedev 885 func Makedev(major *py.Object, minor *py.Object) *py.Object 886 887 // Truncate a file, specified by file descriptor, to a specific length. 888 // 889 //go:linkname Ftruncate py.ftruncate 890 func Ftruncate(fd *py.Object, length *py.Object) *py.Object 891 892 // Truncate a file, specified by path, to a specific length. 893 // 894 // On some platforms, path may also be specified as an open file descriptor. 895 // 896 // If this functionality is unavailable, using it raises an exception. 897 // 898 //go:linkname Truncate py.truncate 899 func Truncate(path *py.Object, length *py.Object) *py.Object 900 901 // Change or add an environment variable. 902 // 903 //go:linkname Putenv py.putenv 904 func Putenv(name *py.Object, value *py.Object) *py.Object 905 906 // Delete an environment variable. 907 // 908 //go:linkname Unsetenv py.unsetenv 909 func Unsetenv(name *py.Object) *py.Object 910 911 // Translate an error code to a message string. 912 // 913 //go:linkname Strerror py.strerror 914 func Strerror(code *py.Object) *py.Object 915 916 // Change to the directory of the given file descriptor. 917 // 918 // fd must be opened on a directory, not a file. 919 // Equivalent to os.chdir(fd). 920 // 921 //go:linkname Fchdir py.fchdir 922 func Fchdir(fd *py.Object) *py.Object 923 924 // Force write of fd to disk. 925 // 926 //go:linkname Fsync py.fsync 927 func Fsync(fd *py.Object) *py.Object 928 929 // Force write of everything to disk. 930 // 931 //go:linkname Sync py.sync 932 func Sync() *py.Object 933 934 // Return True if the process returning status was dumped to a core file. 935 // 936 //go:linkname WCOREDUMP py.WCOREDUMP 937 func WCOREDUMP(status *py.Object) *py.Object 938 939 // Return True if a particular process was continued from a job control stop. 940 // 941 // Return True if the process returning status was continued from a 942 // job control stop. 943 // 944 //go:linkname WIFCONTINUED py.WIFCONTINUED 945 func WIFCONTINUED(status *py.Object) *py.Object 946 947 // Return True if the process returning status was stopped. 948 // 949 //go:linkname WIFSTOPPED py.WIFSTOPPED 950 func WIFSTOPPED(status *py.Object) *py.Object 951 952 // Return True if the process returning status was terminated by a signal. 953 // 954 //go:linkname WIFSIGNALED py.WIFSIGNALED 955 func WIFSIGNALED(status *py.Object) *py.Object 956 957 // Return True if the process returning status exited via the exit() system call. 958 // 959 //go:linkname WIFEXITED py.WIFEXITED 960 func WIFEXITED(status *py.Object) *py.Object 961 962 // Return the process return code from status. 963 // 964 //go:linkname WEXITSTATUS py.WEXITSTATUS 965 func WEXITSTATUS(status *py.Object) *py.Object 966 967 // Return the signal that terminated the process that provided the status value. 968 // 969 //go:linkname WTERMSIG py.WTERMSIG 970 func WTERMSIG(status *py.Object) *py.Object 971 972 // Return the signal that stopped the process that provided the status value. 973 // 974 //go:linkname WSTOPSIG py.WSTOPSIG 975 func WSTOPSIG(status *py.Object) *py.Object 976 977 // Perform an fstatvfs system call on the given fd. 978 // 979 // Equivalent to statvfs(fd). 980 // 981 //go:linkname Fstatvfs py.fstatvfs 982 func Fstatvfs(fd *py.Object) *py.Object 983 984 // Perform a statvfs system call on the given path. 985 // 986 // path may always be specified as a string. 987 // On some platforms, path may also be specified as an open file descriptor. 988 // 989 // If this functionality is unavailable, using it raises an exception. 990 // 991 //go:linkname Statvfs py.statvfs 992 func Statvfs(path *py.Object) *py.Object 993 994 // Return a string-valued system configuration variable. 995 // 996 //go:linkname Confstr py.confstr 997 func Confstr(name *py.Object) *py.Object 998 999 // Return an integer-valued system configuration variable. 1000 // 1001 //go:linkname Sysconf py.sysconf 1002 func Sysconf(name *py.Object) *py.Object 1003 1004 // Return the configuration limit name for the file descriptor fd. 1005 // 1006 // If there is no limit, return -1. 1007 // 1008 //go:linkname Fpathconf py.fpathconf 1009 func Fpathconf(fd *py.Object, name *py.Object) *py.Object 1010 1011 // Return the configuration limit name for the file or directory path. 1012 // 1013 // If there is no limit, return -1. 1014 // On some platforms, path may also be specified as an open file descriptor. 1015 // 1016 // If this functionality is unavailable, using it raises an exception. 1017 // 1018 //go:linkname Pathconf py.pathconf 1019 func Pathconf(path *py.Object, name *py.Object) *py.Object 1020 1021 // Abort the interpreter immediately. 1022 // 1023 // This function 'dumps core' or otherwise fails in the hardest way possible 1024 // on the hosting operating system. This function never returns. 1025 // 1026 //go:linkname Abort py.abort 1027 func Abort() *py.Object 1028 1029 // Return average recent system load information. 1030 // 1031 // Return the number of processes in the system run queue averaged over 1032 // the last 1, 5, and 15 minutes as a tuple of three floats. 1033 // Raises OSError if the load average was unobtainable. 1034 // 1035 //go:linkname Getloadavg py.getloadavg 1036 func Getloadavg() *py.Object 1037 1038 // Return a bytes object containing random bytes suitable for cryptographic use. 1039 // 1040 //go:linkname Urandom py.urandom 1041 func Urandom(size *py.Object) *py.Object 1042 1043 // Return the number of CPUs in the system; return None if indeterminable. 1044 // 1045 // This number is not equivalent to the number of CPUs the current process can 1046 // use. The number of usable CPUs can be obtained with 1047 // “len(os.sched_getaffinity(0))“ 1048 // 1049 //go:linkname CpuCount py.cpu_count 1050 func CpuCount() *py.Object 1051 1052 // Get the close-on-exe flag of the specified file descriptor. 1053 // 1054 //go:linkname GetInheritable py.get_inheritable 1055 func GetInheritable(fd *py.Object) *py.Object 1056 1057 // Set the inheritable flag of the specified file descriptor. 1058 // 1059 //go:linkname SetInheritable py.set_inheritable 1060 func SetInheritable(fd *py.Object, inheritable *py.Object) *py.Object 1061 1062 // Get the blocking mode of the file descriptor. 1063 // 1064 // Return False if the O_NONBLOCK flag is set, True if the flag is cleared. 1065 // 1066 //go:linkname GetBlocking py.get_blocking 1067 func GetBlocking(fd *py.Object) *py.Object 1068 1069 // Set the blocking mode of the specified file descriptor. 1070 // 1071 // Set the O_NONBLOCK flag if blocking is False, 1072 // clear the O_NONBLOCK flag otherwise. 1073 // 1074 //go:linkname SetBlocking py.set_blocking 1075 func SetBlocking(fd *py.Object, blocking *py.Object) *py.Object 1076 1077 // Return an iterator of DirEntry objects for given path. 1078 // 1079 // path can be specified as either str, bytes, or a path-like object. If path 1080 // is bytes, the names of yielded DirEntry objects will also be bytes; in 1081 // all other circumstances they will be str. 1082 // 1083 // If path is None, uses the path='.'. 1084 // 1085 //go:linkname Scandir py.scandir 1086 func Scandir(path *py.Object) *py.Object 1087 1088 // Return the file system path representation of the object. 1089 // 1090 // If the object is str or bytes, then allow it to pass through as-is. If the 1091 // object defines __fspath__(), then return the result of that method. All other 1092 // types raise a TypeError. 1093 // 1094 //go:linkname Fspath py.fspath 1095 func Fspath(path *py.Object) *py.Object 1096 1097 // Convert a wait status to an exit code. 1098 // 1099 // On Unix: 1100 // 1101 // * If WIFEXITED(status) is true, return WEXITSTATUS(status). 1102 // * If WIFSIGNALED(status) is true, return -WTERMSIG(status). 1103 // * Otherwise, raise a ValueError. 1104 // 1105 // On Windows, return status shifted right by 8 bits. 1106 // 1107 // On Unix, if the process is being traced or if waitpid() was called with 1108 // WUNTRACED option, the caller must first check if WIFSTOPPED(status) is true. 1109 // This function must not be called if WIFSTOPPED(status) is true. 1110 // 1111 //go:linkname WaitstatusToExitcode py.waitstatus_to_exitcode 1112 func WaitstatusToExitcode(status *py.Object) *py.Object 1113 1114 // makedirs(name [, mode=0o777][, exist_ok=False]) 1115 // 1116 // Super-mkdir; create a leaf directory and all intermediate ones. Works like 1117 // mkdir, except that any intermediate path segment (not just the rightmost) 1118 // will be created if it does not exist. If the target directory already 1119 // exists, raise an OSError if exist_ok is False. Otherwise no exception is 1120 // raised. This is recursive. 1121 // 1122 //go:linkname Makedirs py.makedirs 1123 func Makedirs(name *py.Object, mode *py.Object, existOk *py.Object) *py.Object 1124 1125 // removedirs(name) 1126 // 1127 // Super-rmdir; remove a leaf directory and all empty intermediate 1128 // ones. Works like rmdir except that, if the leaf directory is 1129 // successfully removed, directories corresponding to rightmost path 1130 // segments will be pruned away until either the whole path is 1131 // consumed or an error occurs. Errors during this latter phase are 1132 // ignored -- they generally mean that a directory was not empty. 1133 // 1134 //go:linkname Removedirs py.removedirs 1135 func Removedirs(name *py.Object) *py.Object 1136 1137 // renames(old, new) 1138 // 1139 // Super-rename; create directories as necessary and delete any left 1140 // empty. Works like rename, except creation of any intermediate 1141 // directories needed to make the new pathname good is attempted 1142 // first. After the rename, directories corresponding to rightmost 1143 // path segments of the old name will be pruned until either the 1144 // whole path is consumed or a nonempty directory is found. 1145 // 1146 // Note: this function can fail with the new directory structure made 1147 // if you lack permissions needed to unlink the leaf directory or 1148 // file. 1149 // 1150 //go:linkname Renames py.renames 1151 func Renames(old *py.Object, new *py.Object) *py.Object 1152 1153 // Directory tree generator. 1154 // 1155 // For each directory in the directory tree rooted at top (including top 1156 // itself, but excluding '.' and '..'), yields a 3-tuple 1157 // 1158 // dirpath, dirnames, filenames 1159 // 1160 // dirpath is a string, the path to the directory. dirnames is a list of 1161 // the names of the subdirectories in dirpath (including symlinks to directories, 1162 // and excluding '.' and '..'). 1163 // filenames is a list of the names of the non-directory files in dirpath. 1164 // Note that the names in the lists are just names, with no path components. 1165 // To get a full path (which begins with top) to a file or directory in 1166 // dirpath, do os.path.join(dirpath, name). 1167 // 1168 // If optional arg 'topdown' is true or not specified, the triple for a 1169 // directory is generated before the triples for any of its subdirectories 1170 // (directories are generated top down). If topdown is false, the triple 1171 // for a directory is generated after the triples for all of its 1172 // subdirectories (directories are generated bottom up). 1173 // 1174 // When topdown is true, the caller can modify the dirnames list in-place 1175 // (e.g., via del or slice assignment), and walk will only recurse into the 1176 // subdirectories whose names remain in dirnames; this can be used to prune the 1177 // search, or to impose a specific order of visiting. Modifying dirnames when 1178 // topdown is false has no effect on the behavior of os.walk(), since the 1179 // directories in dirnames have already been generated by the time dirnames 1180 // itself is generated. No matter the value of topdown, the list of 1181 // subdirectories is retrieved before the tuples for the directory and its 1182 // subdirectories are generated. 1183 // 1184 // By default errors from the os.scandir() call are ignored. If 1185 // optional arg 'onerror' is specified, it should be a function; it 1186 // will be called with one argument, an OSError instance. It can 1187 // report the error to continue with the walk, or raise the exception 1188 // to abort the walk. Note that the filename is available as the 1189 // filename attribute of the exception object. 1190 // 1191 // By default, os.walk does not follow symbolic links to subdirectories on 1192 // systems that support them. In order to get this functionality, set the 1193 // optional argument 'followlinks' to true. 1194 // 1195 // Caution: if you pass a relative pathname for top, don't change the 1196 // current working directory between resumptions of walk. walk never 1197 // changes the current directory, and assumes that the client doesn't 1198 // either. 1199 // 1200 // Example: 1201 // 1202 // import os 1203 // from os.path import join, getsize 1204 // for root, dirs, files in os.walk('python/Lib/email'): 1205 // print(root, "consumes ") 1206 // print(sum(getsize(join(root, name)) for name in files), end=" ") 1207 // print("bytes in", len(files), "non-directory files") 1208 // if 'CVS' in dirs: 1209 // dirs.remove('CVS') # don't visit CVS directories 1210 // 1211 //go:linkname Walk py.walk 1212 func Walk(top *py.Object, topdown *py.Object, onerror *py.Object, followlinks *py.Object) *py.Object 1213 1214 // Directory tree generator. 1215 // 1216 // This behaves exactly like walk(), except that it yields a 4-tuple 1217 // 1218 // dirpath, dirnames, filenames, dirfd 1219 // 1220 // `dirpath`, `dirnames` and `filenames` are identical to walk() output, 1221 // and `dirfd` is a file descriptor referring to the directory `dirpath`. 1222 // 1223 // The advantage of fwalk() over walk() is that it's safe against symlink 1224 // races (when follow_symlinks is False). 1225 // 1226 // If dir_fd is not None, it should be a file descriptor open to a directory, 1227 // and top should be relative; top will then be relative to that directory. 1228 // (dir_fd is always supported for fwalk.) 1229 // 1230 // Caution: 1231 // Since fwalk() yields file descriptors, those are only valid until the 1232 // next iteration step, so you should dup() them if you want to keep them 1233 // for a longer period. 1234 // 1235 // Example: 1236 // 1237 // import os 1238 // for root, dirs, files, rootfd in os.fwalk('python/Lib/email'): 1239 // print(root, "consumes", end="") 1240 // print(sum(os.stat(name, dir_fd=rootfd).st_size for name in files), 1241 // end="") 1242 // print("bytes in", len(files), "non-directory files") 1243 // if 'CVS' in dirs: 1244 // dirs.remove('CVS') # don't visit CVS directories 1245 // 1246 //go:linkname Fwalk py.fwalk 1247 func Fwalk(top *py.Object, topdown *py.Object, onerror *py.Object) *py.Object 1248 1249 // execl(file, *args) 1250 // 1251 // Execute the executable file with argument list args, replacing the 1252 // current process. 1253 // 1254 //go:linkname Execl py.execl 1255 func Execl(file *py.Object, __llgo_va_list ...interface{}) *py.Object 1256 1257 // execle(file, *args, env) 1258 // 1259 // Execute the executable file with argument list args and 1260 // environment env, replacing the current process. 1261 // 1262 //go:linkname Execle py.execle 1263 func Execle(file *py.Object, __llgo_va_list ...interface{}) *py.Object 1264 1265 // execlp(file, *args) 1266 // 1267 // Execute the executable file (which is searched for along $PATH) 1268 // with argument list args, replacing the current process. 1269 // 1270 //go:linkname Execlp py.execlp 1271 func Execlp(file *py.Object, __llgo_va_list ...interface{}) *py.Object 1272 1273 // execlpe(file, *args, env) 1274 // 1275 // Execute the executable file (which is searched for along $PATH) 1276 // with argument list args and environment env, replacing the current 1277 // process. 1278 // 1279 //go:linkname Execlpe py.execlpe 1280 func Execlpe(file *py.Object, __llgo_va_list ...interface{}) *py.Object 1281 1282 // execvp(file, args) 1283 // 1284 // Execute the executable file (which is searched for along $PATH) 1285 // with argument list args, replacing the current process. 1286 // args may be a list or tuple of strings. 1287 // 1288 //go:linkname Execvp py.execvp 1289 func Execvp(file *py.Object, args *py.Object) *py.Object 1290 1291 // execvpe(file, args, env) 1292 // 1293 // Execute the executable file (which is searched for along $PATH) 1294 // with argument list args and environment env, replacing the 1295 // current process. 1296 // args may be a list or tuple of strings. 1297 // 1298 //go:linkname Execvpe py.execvpe 1299 func Execvpe(file *py.Object, args *py.Object, env *py.Object) *py.Object 1300 1301 // Returns the sequence of directories that will be searched for the 1302 // 1303 // named executable (similar to a shell) when launching a process. 1304 // 1305 // *env* must be an environment variable dict or None. If *env* is None, 1306 // os.environ will be used. 1307 // 1308 //go:linkname GetExecPath py.get_exec_path 1309 func GetExecPath(env *py.Object) *py.Object 1310 1311 // Get an environment variable, return None if it doesn't exist. 1312 // 1313 // The optional second argument can specify an alternate default. 1314 // key, default and the result are str. 1315 // 1316 //go:linkname Getenv py.getenv 1317 func Getenv(key *py.Object, default_ *py.Object) *py.Object 1318 1319 // Get an environment variable, return None if it doesn't exist. 1320 // 1321 // The optional second argument can specify an alternate default. 1322 // key, default and the result are bytes. 1323 // 1324 //go:linkname Getenvb py.getenvb 1325 func Getenvb(key *py.Object, default_ *py.Object) *py.Object 1326 1327 // Encode filename (an os.PathLike, bytes, or str) to the filesystem 1328 // 1329 // encoding with 'surrogateescape' error handler, return bytes unchanged. 1330 // On Windows, use 'strict' error handler if the file system encoding is 1331 // 'mbcs' (which is the default encoding). 1332 // 1333 //go:linkname Fsencode py.fsencode 1334 func Fsencode(filename *py.Object) *py.Object 1335 1336 // Decode filename (an os.PathLike, bytes, or str) from the filesystem 1337 // 1338 // encoding with 'surrogateescape' error handler, return str unchanged. On 1339 // Windows, use 'strict' error handler if the file system encoding is 1340 // 'mbcs' (which is the default encoding). 1341 // 1342 //go:linkname Fsdecode py.fsdecode 1343 func Fsdecode(filename *py.Object) *py.Object 1344 1345 // spawnv(mode, file, args) -> integer 1346 // 1347 // Execute file with arguments from args in a subprocess. 1348 // If mode == P_NOWAIT return the pid of the process. 1349 // If mode == P_WAIT return the process's exit code if it exits normally; 1350 // otherwise return -SIG, where SIG is the signal that killed it. 1351 // 1352 //go:linkname Spawnv py.spawnv 1353 func Spawnv(mode *py.Object, file *py.Object, args *py.Object) *py.Object 1354 1355 // spawnve(mode, file, args, env) -> integer 1356 // 1357 // Execute file with arguments from args in a subprocess with the 1358 // specified environment. 1359 // If mode == P_NOWAIT return the pid of the process. 1360 // If mode == P_WAIT return the process's exit code if it exits normally; 1361 // otherwise return -SIG, where SIG is the signal that killed it. 1362 // 1363 //go:linkname Spawnve py.spawnve 1364 func Spawnve(mode *py.Object, file *py.Object, args *py.Object, env *py.Object) *py.Object 1365 1366 // spawnvp(mode, file, args) -> integer 1367 // 1368 // Execute file (which is looked for along $PATH) with arguments from 1369 // args in a subprocess. 1370 // If mode == P_NOWAIT return the pid of the process. 1371 // If mode == P_WAIT return the process's exit code if it exits normally; 1372 // otherwise return -SIG, where SIG is the signal that killed it. 1373 // 1374 //go:linkname Spawnvp py.spawnvp 1375 func Spawnvp(mode *py.Object, file *py.Object, args *py.Object) *py.Object 1376 1377 // spawnvpe(mode, file, args, env) -> integer 1378 // 1379 // Execute file (which is looked for along $PATH) with arguments from 1380 // args in a subprocess with the supplied environment. 1381 // If mode == P_NOWAIT return the pid of the process. 1382 // If mode == P_WAIT return the process's exit code if it exits normally; 1383 // otherwise return -SIG, where SIG is the signal that killed it. 1384 // 1385 //go:linkname Spawnvpe py.spawnvpe 1386 func Spawnvpe(mode *py.Object, file *py.Object, args *py.Object, env *py.Object) *py.Object 1387 1388 // spawnl(mode, file, *args) -> integer 1389 // 1390 // Execute file with arguments from args in a subprocess. 1391 // If mode == P_NOWAIT return the pid of the process. 1392 // If mode == P_WAIT return the process's exit code if it exits normally; 1393 // otherwise return -SIG, where SIG is the signal that killed it. 1394 // 1395 //go:linkname Spawnl py.spawnl 1396 func Spawnl(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object 1397 1398 // spawnle(mode, file, *args, env) -> integer 1399 // 1400 // Execute file with arguments from args in a subprocess with the 1401 // supplied environment. 1402 // If mode == P_NOWAIT return the pid of the process. 1403 // If mode == P_WAIT return the process's exit code if it exits normally; 1404 // otherwise return -SIG, where SIG is the signal that killed it. 1405 // 1406 //go:linkname Spawnle py.spawnle 1407 func Spawnle(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object 1408 1409 // spawnlp(mode, file, *args) -> integer 1410 // 1411 // Execute file (which is looked for along $PATH) with arguments from 1412 // args in a subprocess with the supplied environment. 1413 // If mode == P_NOWAIT return the pid of the process. 1414 // If mode == P_WAIT return the process's exit code if it exits normally; 1415 // otherwise return -SIG, where SIG is the signal that killed it. 1416 // 1417 //go:linkname Spawnlp py.spawnlp 1418 func Spawnlp(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object 1419 1420 // spawnlpe(mode, file, *args, env) -> integer 1421 // 1422 // Execute file (which is looked for along $PATH) with arguments from 1423 // args in a subprocess with the supplied environment. 1424 // If mode == P_NOWAIT return the pid of the process. 1425 // If mode == P_WAIT return the process's exit code if it exits normally; 1426 // otherwise return -SIG, where SIG is the signal that killed it. 1427 // 1428 //go:linkname Spawnlpe py.spawnlpe 1429 func Spawnlpe(mode *py.Object, file *py.Object, __llgo_va_list ...interface{}) *py.Object