Questions tagged [p4python]

p4python is a Python interface to Perforce, a source-code control system.

P4Python: Perforce's API for Python allows you to write Python scripts that directly execute Perforce commands. Documentation can be found here: Helix Core P4Python Developer Guide.

98 questions
7
votes
1 answer

File (s) not on client

I'm getting a really weird problem with P4Python since I started implementing workspace awareness. The situation is as follows: I have a "P4Commands" module which inherits P4 and connects in the __init__() Then, I have respectively the following…
MaVCArt
  • 745
  • 8
  • 21
6
votes
1 answer

In Python2.7, undefined symbol importing P4API

On RHEL5 (5.3) I've installed python27, python27-devel, setuptools, gcc44, gcc44-c++, and P4PythonInstaller. All seemingly installed just fine, with no reported errors. However when I open Python2.7 and attempt to import P4 or P4API I receive the…
Bill Brooks
  • 751
  • 1
  • 10
  • 30
5
votes
2 answers

Cannot build P4Python without SSL support win 10

trying to install p4python on Windows 10 with cmd: pip install p4python and getting Using cached https://files.pythonhosted.org/packages/36/5a/0a1b192cdecd31cb8bc0d0ba39c73ffd84ce823053d0004823a1fdbe1440/p4python-2018.2.1743033.tar.gz …
user2809176
  • 1,042
  • 12
  • 29
5
votes
0 answers

import P4API fails on win 64, python 3.5.1

I'm getting the following error when running import P4: Traceback (most recent call last): File "", line 1, in File "C:\Python35\lib\site-packages\P4.py", line 410, in import P4API ImportError: DLL load failed: The…
4
votes
1 answer

Perforce - creating and editing a change list

My goal is to automatically create a changelist. I do this by running though some edit commands and submitting the change list at the end of the code sequence. I run through all my commands in this similar order: //Open all files in folder for edit…
Michael Isaza
  • 229
  • 1
  • 15
3
votes
3 answers

ImportError: /usr/local/lib/python3.7/site-packages/P4API.cpython-37m-x86_64-linux-gnu.so: undefined symbol: SSL_library_init

** *File "/usr/local/lib/python3.7/site-packages/P4.py", line 410, in import P4API ImportError: /usr/local/lib/python3.7/site-packages/P4API.cpython-37m-x86_64-linux-gnu.so: undefined symbol: SSL_library_init* ** I'm getting the…
3
votes
2 answers

How to read depot's folders structure by p4python without syncing?

I'd like to read folders and files structure inside a specified folder path on the P4 depot without syncing it. Is it possible?
smoke_lp
  • 113
  • 1
  • 8
3
votes
1 answer

P4API.cpp:39:20: fatal error: Python.h: No such file or directory

Getting fatal error while installing p4python on linux machine. configuration: Python 2.7.5 os : fedora Below is the message I am getting while installing "p4python": $ pip install p4python creating build/lib.linux-x86_64-2.7 copying P4.py ->…
neo
  • 969
  • 1
  • 11
  • 23
3
votes
4 answers

Error while installing P4Python on windows

Configuration: Machine: windows8 64-bit Pyhton 2.7 Environment variable: PATH: %PATH%;C:\Python27 PYTHONPATH: C:\Python27;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk; While installing P4Python 2.7, I got following…
Patrick
  • 2,464
  • 3
  • 30
  • 47
3
votes
1 answer

p4python: get diff2 form depot

I want to retrieve output of the next command (where p4 is standard perforce client): p4 diff2 //depot/...#1 //depot/...#2 In terminal it is producing something like this: ==== //depot/bin/build.sh#1 (xtext) - //depot/bin/build.sh#2 (xtext)…
Anton Koval'
  • 4,863
  • 5
  • 31
  • 44
3
votes
1 answer

How to get changes that have been integrated within a CL range?

Given src and dest branches, how do I find what was integrated from src within dest/...@lower,upper? P4.run_integrated complains that it doesn't accept revision specs.
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
2
votes
1 answer

P4Python : AttributeError: type object 'P4' has no attribute 'Map'

Here is the code I use: from P4 import P4, P4Exception mp = P4.Map() And here's the error I get: mp = P4.Map() AttributeError: type object 'P4' has no attribute 'Map' WHY? According to P4Python manuals such class method should construct a new…
w.wa
  • 35
  • 6
2
votes
1 answer

P4Python installation via pipenv fails inside docker file

The pipenv's file has the module p4python specified for installation and below is the relevant line in the docker file which runs the pipenv's module installation. RUN pipenv install --system --deploy --ignore-pipfile However, the dependency…
aman
  • 365
  • 3
  • 13
2
votes
1 answer

set timeout/number of tries/force to stop syncing problematic file in P4Python

I'm creating a tool that uses the P4Python's run_sync. I've noticed, that if the file cannot be overwritten, e.g. it is an opened .exe, P4Python waits about 2 minutes and tries 10 times to overwrite it. This takes too long and I need some way to…
Kowalski Paweł
  • 594
  • 1
  • 6
  • 27
2
votes
1 answer

P4Python use argument -I Indicators

I would like to use the -I argument to know what is happening other than just exceptions when I sync using p4python. The website says I can use -I for progress indicators as a console command, particularly with p4 -I sync -q. This works in console,…
Goose
  • 23
  • 3
1
2 3 4 5 6 7