473,396 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to use the PyPerforce api

I want to automate perforce. So I am using the PyPerforce given on the http://pyperforce.sourceforge.net web site. The problem I am facing is that it is not in the python script, results.py, it does not seem to find an import it is doing.

In results.py it is doing an import protocols but it can't be find anywhere. The only protocols.py or a folder called protocols is from a package called Twisted. I even tried changing the import in results.py for the following

Expand|Select|Wrap|Line Numbers
  1. from twisted import protocols
but now in the results.py we are looking for protocol.interface which cannot be found.

In conclusion, it seems that protocols is missing from the PyPerforce package.

Could someone help me.

tkx
Mar 22 '07 #1
3 1288
bartonc
6,596 Expert 4TB
I want to automate perforce. So I am using the PyPerforce given on the http://pyperforce.sourceforge.net web site. The problem I am facing is that it is not in the python script, results.py, it does not seem to find an import it is doing.

In results.py it is doing an import protocols but it can't be find anywhere. The only protocols.py or a folder called protocols is from a package called Twisted. I even tried changing the import in results.py for the following

Expand|Select|Wrap|Line Numbers
  1. from twisted import protocols
but now in the results.py we are looking for protocol.interface which cannot be found.

In conclusion, it seems that protocols is missing from the PyPerforce package.

Could someone help me.

tkx
It looks like you may be doing the import incorrectly. A python package is a directory with an __init__.py file in it. Most packages are installed in a place like D:\Python24\Lib\site-packages". If you look for (and can find) the desired module in the package (probably perforce, but maybe twisted) then it's
Expand|Select|Wrap|Line Numbers
  1. import packagename.modulename
Mar 22 '07 #2
It looks like you may be doing the import incorrectly. A python package is a directory with an __init__.py file in it. Most packages are installed in a place like D:\Python24\Lib\site-packages". If you look for (and can find) the desired module in the package (probably perforce, but maybe twisted) then it's
Expand|Select|Wrap|Line Numbers
  1. import packagename.modulename
Presently I have the Perforce package which is in the site-packages directory. I also have the twisted package which is also in the site-packages directory. The results.py file is in the Perforce package and the protocols.py is in the twisted package.

Also I am not even sure if the protocols module is the right on for this import since I am not the one who implemented this results.py.

Also I know that the import that I was doing was working since first I was having a problem about the Protocols.py, It was saying that it couldn't find it. But since I did change the import, python seems to be looking for protocols.Interface which interface is not in the Protocols package.

For now, I don't even know if I am importing the proper package or maybe there is just something I am missing.
Mar 23 '07 #3
I finally found how to use this pyperforce.

I was simply missing a package, The package name is PyProtocols.

now that it is install, I can finally run my PyPerforce.
Mar 23 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Huayang Xia | last post by:
I'm completely new to pyperforce. I want to open a file (check out a file) for editing. How can I do it from PyPerforce? Another thing is how can I add files to my created label? Thanks in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.