PortableApps | Portable apps for the portableapps.com platform | Audio Utils library
kandi X-RAY | PortableApps Summary
kandi X-RAY | PortableApps Summary
Portable apps for the portableapps.com platform
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of PortableApps
PortableApps Key Features
PortableApps Examples and Code Snippets
Community Discussions
Trending Discussions on PortableApps
QUESTION
I am in a bit of a pickle here. I have a python script (gather.py) that gathers information from an .xml file and uploads it into a database on a infinite loop that sleeps for 60sec; btw all of this is local. I am using Flask to run a webpage that will later pull information from the database, but at the moment all it does is display a sample page (main.py). I want to run main.py as for it to start gather.py as background process that won't prevent Flask from starting, I tried importing gather.py but it halts the process (indefinitely) and Flask won't start. After Googling for a while it seems that the best option is to use a task queue (Celery) and a message-broker (RabbitMQ) to take care of this. This is fine if the application were to do a lot of stuff in the background, but I only need it to do 1 or 2 things. So I did more digging and found posts stating that subprocess.Popen()
could do the job. I tried using it and I don't think it failed, since it didn't raise any errors, but the database is empty. I confirmed that both gather.py and main.py work independently. I tried running the following code in IDLE:
subprocess.Popen([sys.executable, 'path\to\gather.py'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
and got this in return:
Now, I don't know what this means, I tried using .value
and .attrib
but understandably I get this:
AttributeError: 'Popen' object has no attribute 'value'
and
AttributeError: 'Popen' object has no attribute 'attrib'
Then I read on a StackOverflow post that stdout=subprocess.PIPE
would cause the program to halt so, in a 'just in case' moment, I ran:
subprocess.Popen([sys.executable, 'path\to\gather.py'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
and got this in return:
Through all this process the database tables have remained empty. I am new to the subprocess
module but all this checks and I can't figure out why it is not running gather.py. Is it because it has an infinite loop?? If there is a better option pls let me know.
Python version: 3.4.4
PS. IDK if it'll matter but I am running a portable version of Python (PortableApps) on a Windows 10 PC. This is why I included sys.executable
inside subprocess.Popen()
.
ANSWER
Answered 2020-Nov-28 at 01:12Solution 1 (all in python script): Try to use Thread and Queue.
I do this:
QUESTION
In my work, I have got a Windows Laptop with limited access, I can't install anything because admin privilege required but lucky this website https://portableapps.com/apps
have many apps that can be run without installation and admin not required even there is a portable MySQL ,Apache server etc.
Now I have got access to an old Ubuntu server without internet and no sudo
privilage with the below details:-
ANSWER
Answered 2020-Aug-24 at 19:55In theory, you should be able to manually install programs into your home directory and run them from there.
There are a few caveats:
- You cannot use the system's package manager, it requires root access.
- You will have to manually install the software into your home directory.
- If the program requires elevated privilege (root), it still won't work.
- Ubuntu's security policies (AppArmor) may still block you.
- Your company may have some other non-standard access controls in place that will block you.
QUESTION
I don't know what is the error here
I know that it is very messy but I get an exception after the client connects and send a message
The error id here
...ANSWER
Answered 2020-Jun-03 at 16:33You're passing your arguments backwards. You set up the thread like this:
QUESTION
NOTE: There have been several EDITs to the question, as per comments. They are indicated below, and separated by lines. As of now, the only remaining issue seems to be that numpy cannot load, possibly (but not certainly) due to two alternative python 3.8 systems present.
I have updated my msys2 system a couple of months ago.
That apparently included an update from python 3.7 to 3.8, but which left me with two broken pythons: I can start python
when it is 3.7, but there are no associated packages, and I cannot start python
when it is 3.8, which is the version holding packages.
I do not know what went wrong with that, or what did I do wrong.
I just noticed this now with the first time I mean to use python again after the upgrade.
I will describe here a sequence of steps I followed and what I found. I will post supporting code below for clarity.
I can start python, but
pandas
(e.g.) and many other packages are not found in python. Checking further,/mingw64/lib/python3.7/site-packages
is essentially empty (surely emptied when upgrading to 3.8).Looking for the
pandas
package, I found I have one version installed.The
pandas
version is for python 3.8, surely upgraded from 3.7.I redirected
PYTHONPATH
from 3.7 to 3.8Now I cannot even start python. EDIT Now I can start python, with some misconfiguration issues (i.e., partially fixed).
Now the question is
How can I fix python3.8, which gives the error below?
ImportError: cannot import name 'open_code' from 'io' (unknown location)
How can I fix python3.8, which gives the problems below?
New problems:
5.1. I should have python pointing to 3.8, and also fix packages.
5.2. Some modules are not found, some other are.
Note: I don't know if Msys2 upgrade breaks python2-pyqt5 has anything to do with this.
Related:
https://github.com/tox-dev/tox/issues/1334
https://github.com/yan12125/python3-android/issues/19
TL;DR: Supporting code
...pandas
not found
ANSWER
Answered 2020-Apr-24 at 10:40The ImportError: cannot import name 'open_code' from 'io' (unknown location)
comes from the fact that there are two different versions of Python conflicting with each other. python
still points to the old version 3.7 but PYTHONPATH
got updated to point to the new 3.8 version. As the documentation of PYTHONPATH
states, it becomes prepended to the module search path and hence shadows any builtin modules:
The default search path is installation dependent, but generally begins with
prefix/lib/pythonversion
(seePYTHONHOME
above). It is always appended toPYTHONPATH
.
You can reproduce that behavior by creating two different virtual environments and then start one while having PYTHONPATH
point to the other. In the following I used Miniconda to create two different environments, py37
and py38
, containing a 3.7 and 3.8 installation respectively.
QUESTION
I would love some help, thanks!
I am trying to use lambdas to assign functionality to window events. It already worked for assigning the "enter" button to a function.
But, for some reason, it doesn't work for the default exit button on the window.
As you can see in the create_entry_window
function, I used a lambda twice, and it worked only for the "Return".
The problem occurs with this line:
...ANSWER
Answered 2020-Apr-11 at 15:31The quick-fix to your problem is quite easy:
Change the line reading root.protocol("WM_DELETE_WINDOW", (lambda event: exit_entry(root)))
into
QUESTION
Since January 2020, maven has switched their repo from HTTP to HTTPS. In order my project (running with Java 5 + maven 3.1.1) to download the repos i changed in my pom.xml the repos to look to: https://repo.maven.apache.org/maven2 This worked fine and now maven tries to access the dependencies from the secure repository. Trying to build/clean my project i faced following issues:
Issue 1 Trying to mvn clean my project without any further arguments i receive following error: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): peer not authenticated -> [Help 1]
I tried to bypass the error by adding following arguments: mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean
New error: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Remote host closed connection during handshake: SSL peer shut down incorrectly -> [Help 1]
Further attemp by adding alos the following argument: -Dhttps.protocols=TLSv1.2,TLSv1.1 Resolves to a new error:
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): TLSv1.2 -> [Help 1]
Issue 2 I tried to with a different approach by using the certificate provided from https://repo.maven.apache.org/maven2/ I import the certificate into a trust store and tried to use this with the following maven command:
mvn -Djavax.net.ssl.trustStore=C:\PortableApps\trust.jks -Djavax.net.ssl.trustStorePassword=pass -Djavax.net.ssl.keyStore=C:\PortableApps\trust.jks -Djavax.net.ssl.keyStoreType=jks -Djavax.net.ssl.keyStorePassword=pass clean
The error is the same as previous again Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): peer not authenticated -> [Help 1]
I start to believe, that this is not goign to work with Java 5 due to the limitations of the JVM. As a last resolution, i find the usage of the insecure repo http://insecure.repo1.maven.org/maven2/ but i want to go do this as my very last option. Any further suggestions?
Note
- On another project with Java 7, i was able to resolve all the issues by using the latest maven version 3.6.3
- Since the project is compatible only with Java 5, i am limited in using maven version up to 3.1.1
ANSWER
Answered 2020-Jan-29 at 13:47I ended up using the insecure maven repo http://insecure.repo1.maven.org/maven2/ in order to make it work with Java 5 (build/run).
Alternative, as some already suggested in the comments, you may use JDK 7 for your build process in order to download the dependencies from the secure maven repository and Java 5 for running your app.
As it seems, there is no way in accessing the secure maven repo while using Java 5 due to the lack of TLSv1.2 support which maven seems to use (https://central.sonatype.org/articles/2018/May/04/discontinued-support-for-tlsv11-and-below/?__hstc=31049440.13cc707ef0d169390d4d7ac8ba12c78e.1571910247825.1579506965027.1580304556973.4&__hssc=31049440.1.1580304556973&__hsfp=1122763312)
QUESTION
My goal is to get a list of the names of all the new items that have been posted on https://www.prusaprinters.org/prints during the full 24 hours of a given day.
Through a bit of reading I've learned that I should be using Selenium because the site I'm scraping is dynamic (loads more objects as the user scrolls).
Trouble is, I can't seem to get anything but an empty list from webdriver.find_elements_by_
with any of the suffixes listed at https://selenium-python.readthedocs.io/locating-elements.html.
On the site, I see "class = name"
and "class = clamp-two-lines"
when I inspect the element I want to get the title of (see screenshot), but I can't seem to return a list of all the elements on the page with that name
class or the clamp-two-lines
class.
Here's the code I have so far (the lines commented out are failed attempts):
...ANSWER
Answered 2020-Jan-22 at 21:42This is xpath of the name of the items:
QUESTION
I installed Eclipse on my office pc, using this procedure (64 bit): https://portableapps.com/node/53284 But when i want to create a new project, it does not propose me the usual "Java project" with minimal files written. I don't have the Java Perspective so I'm trying to install the dev tools but when I want check a software site, eclipse keeps telling me it doesn't find it.
What i have done so far:
-Putted Active Provider on "Direct" in network connections
-The Eclipse Internal Web Browser works just fine (including the repositories urls and able to download files)
-I've tryed with an "/" at the end of the urls (http://download.eclipse.org/eclipse/updates/4.13/ and http://download.eclipse.org/mpc/mars/)
-I've tryed to download http://download.eclipse.org/eclipse/updates/4.13/compositeContent.jar and opened it manually. Didn't worked.
-I've added "-Djava.net.preferIPv4Stack=true" after "-vmargs" in my eclipse.ini then restarted. Same.
It keeps searching for http://download.eclipse.org/eclipse/updates/4.13/content.xml and http://download.eclipse.org/mpc/mars/content.xml which do not exist. (Unknown Host... org.eclipse.equinox.p2.core.ProvisionException)
But I don't know how to change that into compositeContent since Eclipse starts to look for compositeContent.[xml/jar]/content.xml instead.
Could you help me?
[Edit] See the resolution below
...ANSWER
Answered 2020-Jan-14 at 21:00It works! There was indeed a proxy on my company network, with an autoconfig file.
I've putted my network options on "Manual" and followed the instructions there : Is there any way of configuring Eclipse IDE proxy settings via an autoproxy configuration script?
Now it works perfectly! Thanks to howlger for helping me getting in the right direction \o/
QUESTION
I am trying to plot a pandas
Series
with a line.
These lines produce the output shown and a scatter plot.
ANSWER
Answered 2019-Dec-17 at 15:37You can try:
QUESTION
I made a script that simply opens or activate specific app.
it works great but I have one issue, when the app minimized to windows tray.
the Hotkey activate the Else statement part so it creates another instance of the same app.
ANSWER
Answered 2019-Dec-18 at 22:31Try this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install PortableApps
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page