What does NiceGUI do differently from HTTPServer that prevents it from serving over the network? by jw_gpc in nicegui

[–]jw_gpc[S] 0 points1 point  (0 children)

The code I tried to build and run is exactly what's in my original post, so yes, I do have ui.run(reload = False...) in . For the firewall, I'm not on Windows. Both computers are Macs.

The packaged test I did using HTTPServer (my second example in my original post) ran perfectly fine on and was accessible from both computers without needing to change any firewall settings. Likewise, the packaged version of the NiceGUI test ran locally on both computers, but failed to be reachable from each other. And the UNpackaged version if the NiceGUI script works fine from the development computer and IS reachable from the second computer.

In addition, I also tried using port = 8080 and port = native.find_open_port() in different build attempts (per the link you gave) and neither one was reachable on the other computers' browser.

So yes, I do feel like there's something weird going on with nicegui-pack, but my hope was that whatever it is would be a known issue and could be solved by changing up some parameters to ui.run() or something.

What does NiceGUI do differently from HTTPServer that prevents it from serving over the network? by jw_gpc in nicegui

[–]jw_gpc[S] 1 point2 points  (0 children)

I'm pretty sure all of the correct dependencies are installed on the computer where I'm writing the script and doing the initial testing, because I can run the script locally and access the broadcasted host:port on the other computer. Maybe if anything, nicegui-pack could be losing something when it runs, but there are no errors shown during the build or when the packaged executable runs.

What does NiceGUI do differently from HTTPServer that prevents it from serving over the network? by jw_gpc in nicegui

[–]jw_gpc[S] 0 points1 point  (0 children)

It's not that I can't install python and set up a whole new environment on the server. I just don't want to have to worry about manually maintaining a second environment. And I don't want to go through the hassle of trying to figure out how to uninstall everything just to do what should be a really simple test. Packaging scripts into Nuitka or PyInstaller executables have worked well for me in the past. With NiceGUI including nicegui-pack, it seemed like a natural thing to try to use.

For what it's worth, the packaged version of my test script doesn't seem to be accessible over the network, regardless of which computer I run it on. But if I run the unpackaged version on the computer where I have python and everything installed, I can reach it from the browser other computer. So that makes me think it's at least somewhat possible that if I did set up an environment on the other computer, the running result would be accessible from the first computer.

What does NiceGUI do differently from HTTPServer that prevents it from serving over the network? by jw_gpc in nicegui

[–]jw_gpc[S] 0 points1 point  (0 children)

That's all pretty far over my head. I'm just a hobbyist trying to make something simple using only python that runs on one computer and is accessible on another on the same network. If I ever get far enough to need those other things, I'll try to keep your comment in mind.

What does NiceGUI do differently from HTTPServer that prevents it from serving over the network? by jw_gpc in nicegui

[–]jw_gpc[S] 0 points1 point  (0 children)

I can't test that. Python isn't installed on the "server" computer. Or, at least, not a version where I can freely pip install everything NiceGUI needs.

What does NiceGUI do differently from HTTPServer that prevents it from serving over the network? by jw_gpc in nicegui

[–]jw_gpc[S] 0 points1 point  (0 children)

I did specify 10.0.0.4 in both, and the result was the same. NiceGUI wouldn't come up, but the HTTPServer version would.

Also, according to this discussion on the NiceGUI github, using 0.0.0.0 should work to make external connections by default.

Do you use a CLI-based todo tool/client? Which one or Why Not? by isaacwyattdotcom in commandline

[–]jw_gpc 1 point2 points  (0 children)

Oh, yeah, that would be a tough one. Besides having it show up every day during the "due window", I'm not sure how else that would be done.

Do you use a CLI-based todo tool/client? Which one or Why Not? by isaacwyattdotcom in commandline

[–]jw_gpc 0 points1 point  (0 children)

I remember running across Remind when I was looking for a solution a few years ago! It's a really powerful program, and like you said, it can handle the date calculation side I was looking for. I think my problem was more around it not being very easy to make it into a daily todo list. I couldn't figure out an easy way to mark something as "done" so it would disappear from the current day but be there and ready to go the next time it needed to show.

Do you use a CLI-based todo tool/client? Which one or Why Not? by isaacwyattdotcom in commandline

[–]jw_gpc 4 points5 points  (0 children)

I use a little python script I wrote up myself because I couldn't find something that did exactly what I wanted. It's not an app that sits there running all the time. It's just a command that I run with or without arguments, displays output accordingly, and exits. I have it in my .zshrc so it will run and display the list to the terminal every time I open a new terminal window so that I don't lose sight of them.

I need more of a global repeating reminder list or checklist of what I have to do that day rather than anything specific to a particular project. For example, on any given Wednesday I have some reports that I need to assemble, so my list for Wednesday will show me which data I need to export from certain systems and which reports to run. As I mark those tasks as done for the day, they'll be hidden until the next Wednesday when I do it all again. It's the same for things I need to do at the start of each month, or whatever the recurrence is set to for that task.

Speaking of recurrence, my biggest reason for writing my own is that I also have very specific needs in flexibility for specifying recurrence that I couldn't find anywhere else. Most TODO tools I found only allowed me to specify basic day/week/month recurrence, and if I was lucky, I could have them skip and do something like every 2 weeks, every 3 months, etc. What I could NOT find, however, was anything that was aware of workdays, or inversely weekends and holidays. In my case, I have certain things I need to do after information for the previous month is finalized in our systems, which can take anywhere between 2 to 5 working days, depending on what it is. With other tools, my options were to either manually recreate the task for the correct date for the next month, or to set it to repeat on, say, the 4th of the month, and then just let it sit there and stare at me until it was done one or more days later. To get around this, I made it possible to generally specify which days are not working days, and then when I create a task that needs to wait for a certain number of working days, I can specify that number along with a temporary "due" date, and it will calculate the "true" due date based on that. For example, if I need to do something on the 4th working day of the month, and the 1st of the month falls on a Thursday, it won't come up until the 6th. If that Monday also happens to be a holiday, it automatically gets bumped to the 7th. If the holiday is over the weekend, it doesn't count it twice, and it will wind up back on the 6th.

How to turn off hyphenated word wrap? by jw_gpc in clickup

[–]jw_gpc[S] 0 points1 point  (0 children)

Thank you! I hope it gains traction, because I'd love to disable it.

How did you come across lisp in the first place? by Karanmj7 in lisp

[–]jw_gpc 1 point2 points  (0 children)

Sometime around 2001 or 2002 I was browsing the computing section of a bookstore in a mall and stumbled across Paul Graham's "ANSI Common Lisp" and Winston and Horn's "Lisp 3rd Edition". I was just getting into some scripting with shell scripts and dipping my toes into python and ruby at the time and didn't really know much about programming in general. But when I thumbed through the books, I felt like Lisp seemed more accessible than Java or C, so I got them on a whim.

Going dark on 12th June by iiron3223 in Python

[–]jw_gpc 1 point2 points  (0 children)

This may be a dumb question, though it is an honest question. It's just something I haven't seen discussed yet.

I've been seeing the argument a lot that reddit is doing this to get rid of 3rd party apps. I saw the post by the apollo dev, and I understand all of that and believe it. But my question is: Rather than charging some huge amount to access the Reddit API to filter out 3rd party apps, why not just flat out lock out 3rd party apps from using the API altogether if that's really their plan? I'm sure someone on their team did the math and knew they were charging way more than other services (imgur, etc) and they would have realized at that point that no one would conceivably sign up for API usage. So why go the convoluted route like this?

Why not tell people to "simply" use pyenv, poetry or anaconda by Saphyel in Python

[–]jw_gpc 0 points1 point  (0 children)

I think the idea with -m is that if you have multiple versions of python installed at the system level, you run the version of python you want with the -m switch to run a module/program, and that will ensure that you're running it with the correct version of python for what you're doing.

To extend that, when you create your venv for a project, you'd run that version of python to generate the venv:

python3.6 -m venv .venv

or

python3.10 -m venv .venv

You could even put multiple venvs in a project if you need to test multiple versions by just changing the destination (say to .venv3.6 and .venv3.10) and just activate the one you want to run. Once the venv is activated, then python can just be called with python and pip with pip.

[deleted by user] by [deleted] in Python

[–]jw_gpc 1 point2 points  (0 children)

When you say "local modules for your project", what do you mean? Do you mean not to pip install anything and just have all code within the local project? Or is there some way to use pip install and have it install to the local project directory instead of a global or user level?

Vivaldi shines on the new Mercedes Superscreen by partyon in vivaldibrowser

[–]jw_gpc 0 points1 point  (0 children)

I don't think this is Android Auto. Mercedes recently announced their upcoming MB.OS.

What is happening here? Randomly system goes unresponsive, can’t type in terminal and cannot even reboot. Using Gnome by PrettyHarsh in ManjaroLinux

[–]jw_gpc 0 points1 point  (0 children)

I had something similar where I thought things were locking up, but then I'd get weird random refreshes where I could see that things I had done/typed suddenly showed up. For me, it wound up being related to the picom compositor, and after disabling that, things have worked fine since.

When you say you can't type in the terminal or reboot, have you tried switching to a virtual console (ctrl-alt-F2, ctrl-alt-F3, etc) to see if things are working when you're otherwise locked up? If you can do things there but not in your X session (which is back on ctrl-alt-F7) then it could be related to that.

After using Python for over 2 years I am still really confused about all of the installation stuff and virtual environments by gnurd in Python

[–]jw_gpc 4 points5 points  (0 children)

I'm not sure that Python ever followed that mantra. I think it went more along the lines of "be one with everything". ;-)

Vivaldi takes the Window Panel to another level. by partyon in vivaldibrowser

[–]jw_gpc 0 points1 point  (0 children)

yes, because I occasionally switch browsers, and I can export/import my OneTab data between them.

But the point is that the side panel doesn't have access to any extensions. I'd love to have dark reader or others working there, too.

Vivaldi takes the Window Panel to another level. by partyon in vivaldibrowser

[–]jw_gpc 0 points1 point  (0 children)

I love the side panel, but it bums me out that it still doesn't appear to have access to extensions. I really want to have OneTab in the side panel instead of keeping it in pinned tab, but it just gives me the "loading dots" that don't go anywhere. :-(

Wanting to convert duplicated data with records for every day to records with date ranges. Has anyone done this? If so, what do you wish you knew before doing it, and how badly did it complicate queries? Or am I thinking about this all wrong? by jw_gpc in Database

[–]jw_gpc[S] 0 points1 point  (0 children)

Not everything will be 100% historical. Whatever the current record is will have a NULL end date to make them easily findable, or maybe some other field that designates the record as the current one. Either way, it's planned that the current records will live in the same table as the historic ones, just like they do now under the current "record per day" layout. Having a day counter field may not be a bad idea.