Quantcast
Channel: ActiveState Community Site - ActivePython discussion

New Recipe Posts

$
0
0

I have some recipes in Python I think would be valuable to this community but the recipe post feature appears to be turned off. Is there a way I can post my recipes?


ActivePython in ALM VAPI-XP Script

$
0
0

Bonjour
Je souhaite exécuter du un script Python depuis HP ALM, de la même manière que je peux exécuter du code VBS. J'ai installé ActivePython sur mon poste local, et pourtant mon script ne s'exécute pas. Le code du script se résume à un 'print("test")'. Comment faire pour exécuter le script python depuis ALM?
Merci =)


Hi,
I would like to run Python in ALM. I installed ActivePython on my local computer but the script does'nt run. The script is 'print("test")'. How can I run the python script from ALM???
Thank you =)

Install other Packages

$
0
0

Hello,

I install ActivePython but now i want to install others packages which are not include in active python (like mechanize for exemple). I install them by typing sudo apt-get install python-mechanize in my terminal but when i open python so it's active python now, i can't import them. My question is : how to import the installed packages which are not in active python ?

Thanks,

Pierre.

security plugins for active python

$
0
0

So I've been stepping into the field of cybersecurity using python and am in a crossroad right now as far as my dedicated IDE goes. I love and started out using Komodo when I picked up on Python and now that I am transitioning into cyber security I am broadening my workbench and am looking for plugins for Komodo that will help detect security flaws easier. I know eclipse and vs have them but I am so used to Komodo and am trying to avoid turning towards another IDE. Is there anything like this or any security plugins that can help for Komodo?

How do I import the Paho MQTT Library to Komodo IDE?

$
0
0

I've been trying to import the Paho MQTT Library (https://github.com/eclipse/paho.mqtt.python) into Komodo IDE.

What I have done so far:
> Copied the Paho folder into python>lib>site-packages>
> In Komodo preferences, I set the path under Python language to add the folder.
> Changed/tried different paths for Python, Pip, etc.

Nothing seems to work so far. Whenever I run a python script, I see this error:

Traceback (most recent call last):
  File "C:\Users\kvin\workspace\paho_projects\mqtt_test0.py", line 1, in <module>
    import paho.mqtt.client as mqtt
ImportError: No module named paho.mqtt.client

Can someone tell me if I'm doing something wrong here? Thanks

How can i install a package?

$
0
0

I have installed Active Python 3.5.4 on Windows 10 x64.

I have upgraded the pip package by typing

python -m pip install -U pip

I have installed the package "whois" by typing

pip3 install whois

I have created a file "whois.py" with the content:

import whois

When i execute the whois.py file, a window opens and is asking me for a file "ActivePython-3.5.4.3504-win64-x64-404899.exe.msi".

I don't have that file and i can't find on the ActivePython download page. There is only an exe file to download. MSI files are unavailable.

So i am unable to install the package.

Please what am i doing wrong?
How can i install the package?

Thank you!

AttachmentSize
activepython_moduleinstall.png33.22 KB
activepython_moduleinstall_whois.png18.85 KB

Package "whois 0.7" does not work on Windows 10

$
0
0

I tried to test the package according to the description https://pypi.python.org/pypi/whois

>>> import whois
>>> domain = whois.query('google.com')

But i only get the error

AttributeError: module 'whois' has no attribute 'query'

What is wrong there?
Thank you!

ILDE SOCKET

$
0
0

Hello all,

I am Running windows xp sp3, MS Security Essentials, and Windows Firewall. I installed ActivePython-2.7.1.4-win32-x86.

When I run the IDLE I get a message that says:
Socket Error: No connection could be made because the target machine actively refused it.

Does anyone know what I could do to resolve this issue?


Odd behavior after upgrading package with pip.

$
0
0

I am seeing some very odd behavior with ActiveState ActivePython after using pip to install a package.

1. Install ActiveState ActivePython 3.6.

2. Run a Python script using the file association, that is just by calling the script itself. All is well in the universe.

3. Use pip to upgrade a package that is included in ActiveState ActivePython. For example, run the following command.

python -m pip install --upgrade pip

4. Run a Python script using the file association, that is just by calling the script itself. The universe blows up.

5. The following dialog box is displayed.

[ActivePython 3.6.0 Build 3600 (64-bit)]

Please wait while Windows configures ActivePython 3.6.0 Build 3600 (64-bit).

[Cancel]

6. This leads to a "The feature you are trying to use is on a network resource that is available" dialog box.

7. Since I have not idea what it is looking for, I hit cancel in this dialog box.

8. A "Fatal error during installation" message is displayed.

9. Focus returns to the command prompt.

10. The script fails to run.

The end result is that running a script by calling the script directly is completely broken. You have to uninstall ActivePython and reinstall it to get the just run script feature to work.

You are forced to put up with out of date packages since any attempt to upgrade an out of date package causes this to break.

Adding class types to engine's namespace

$
0
0

Hello,
I tried this one in the other forum, I am trying my luck here:
I was wondering if it's possible to add class types defined in a type library calling AddTypeLib() instead of adding a specific instance using AddNamedObject(). I tried to do it on IActiveScript interface to VBScript and to Python in some implementation of an embeddable scripting editor and though the return code from AddTypeLib was OK- the class types from the type library were not familiar to the engine.
Is it possible with Python? how should I address this class once it's in?

Thanks!





Latest Images