workspace
stringclasses 1
value | channel
stringclasses 1
value | sentences
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
| sentence_id
stringlengths 44
53
| timestamp
float64 1.5B
1.56B
| __index_level_0__
int64 0
106k
|
---|---|---|---|---|---|---|---|
pythondev | help | the similarity I see with the function you provided, is that it's generating a command, and then calling that command on the terminal/command line using `subprocess`, which is what you want to do. The only difference is in what command would be generated | 2019-02-20T10:47:02.001600 | Ashley | pythondev_help_Ashley_2019-02-20T10:47:02.001600 | 1,550,659,622.0016 | 9,621 |
pythondev | help | not sure if it's helpful but this seems to indicate you might try separating the path from the .exe, and calling just the exe?
<https://stackoverflow.com/questions/3005437/windowserror-error-5-access-is-denied> | 2019-02-20T11:03:35.003800 | Marth | pythondev_help_Marth_2019-02-20T11:03:35.003800 | 1,550,660,615.0038 | 9,622 |
pythondev | help | or maybe try changing into the directory first? | 2019-02-20T11:05:04.005600 | Marth | pythondev_help_Marth_2019-02-20T11:05:04.005600 | 1,550,660,704.0056 | 9,623 |
pythondev | help | I figured it out - the issue stuck deep in a wrong formatted string in `process` of `subprocess.run(process)` :rubberduck:
It got solved by using `pathlib` instead of `os.path` - so probably there was an issue inside how the path got adressed.
Thanks for your help! | 2019-02-20T11:06:03.006400 | Shawana | pythondev_help_Shawana_2019-02-20T11:06:03.006400 | 1,550,660,763.0064 | 9,624 |
pythondev | help | Does anyone know if there is a built-in alternative in celery for the following code? The purpose of the code is to generate iterative chords of tasks from the resultsets of prior tasks.
```@app.task
def dmap(it, callback, finisher=None):
def flatten(it):
result = []
for i in it:
if isinstance(i, list):
result.extend(flatten(i))
else:
result.append(i)
return result
callback = signature(callback)
dmap_chord = chord(callback.clone([i,]) for i in flatten(it))
return dmap_chord(signature(finisher)) if isinstance(finisher, dict) else dmap_chord(dmap_dummy.s())
@app.task
def dmap_dummy(results):
return results``` | 2019-02-20T12:40:52.011900 | Harris | pythondev_help_Harris_2019-02-20T12:40:52.011900 | 1,550,666,452.0119 | 9,625 |
pythondev | help | The use-case would be like `sometask | dmap.s(someothertask, dmap.s(yetanothertask))` | 2019-02-20T12:42:35.012500 | Harris | pythondev_help_Harris_2019-02-20T12:42:35.012500 | 1,550,666,555.0125 | 9,626 |
pythondev | help | Hey guys, so there’s a system that new customers are going to be added to, and when that happens, it’s going to send a POST to my server with some customer information that I’m putting into a letter, and then printing.
To get this POST, I have a small flask server running, and I’m able to test post data to it just fine.
The letter that I’m putting the customer data into is an HTML file, that I then convert to a PDF so I can print it. I’m using HTML because it was a good option since the letter has some images embedded in it (company logos), so this way we can have it formatted exactly how we want. I already have all of this part figured out.
I store the HTML as a string (using Beautiful Soup), and then I use re to replace the fields which are written as `{DateSold}` `{FirstName}` `{CarrierName}` and `{AttendantName}` with the actual data from the POST. I already have all that figured out too.
**The problem I have is** after I replace the fields once, and save the PDF, and then do a second test POST with different data, it still uses the data from the first test because the fields above aren’t there anymore. I’ve tried storing the original HTML as a second variable, and then rewriting it back to the first one in the main flask function, but since that’s not an actual loop, it only fires once, and isn’t actually helping.
So how can I restore the HTML string after altering it each time a POST occurs so re can do my replacements every time?
I’ll post some of my code in a second so you can see what I’m talking about. | 2019-02-20T13:40:33.020500 | Kristine | pythondev_help_Kristine_2019-02-20T13:40:33.020500 | 1,550,670,033.0205 | 9,627 |
pythondev | help | None | 2019-02-20T13:44:41.020600 | Kristine | pythondev_help_Kristine_2019-02-20T13:44:41.020600 | 1,550,670,281.0206 | 9,628 |
pythondev | help | So you can see, I’m trying to alter the souptemp string, then revert it back to the original soup string, so that I can find and replace the fields successfully again (because after this is done, the fields are replaced with the corresponding data). | 2019-02-20T13:45:46.022000 | Kristine | pythondev_help_Kristine_2019-02-20T13:45:46.022000 | 1,550,670,346.022 | 9,629 |
pythondev | help | I’m sure there’s better ways to do some of the things I’m doing here, but this works. I’ll take any advice on improving this anyways. | 2019-02-20T13:46:10.022500 | Kristine | pythondev_help_Kristine_2019-02-20T13:46:10.022500 | 1,550,670,370.0225 | 9,630 |
pythondev | help | I'm suspicious that `souptemp = soup` is just duplicating an object reference, instead of making a copy. Is there a `copy()` method or something like that available? | 2019-02-20T13:46:59.023500 | Sasha | pythondev_help_Sasha_2019-02-20T13:46:59.023500 | 1,550,670,419.0235 | 9,631 |
pythondev | help | I hadn’t considered that at all | 2019-02-20T13:47:15.023700 | Kristine | pythondev_help_Kristine_2019-02-20T13:47:15.023700 | 1,550,670,435.0237 | 9,632 |
pythondev | help | that’s an excellent point | 2019-02-20T13:47:22.023900 | Kristine | pythondev_help_Kristine_2019-02-20T13:47:22.023900 | 1,550,670,442.0239 | 9,633 |
pythondev | help | “Assignment statements in Python do not copy objects, they create bindings between a target and an object.” <I think you hit the nail on the head | 2019-02-20T13:48:07.024100 | Kristine | pythondev_help_Kristine_2019-02-20T13:48:07.024100 | 1,550,670,487.0241 | 9,634 |
pythondev | help | :point_up: | 2019-02-20T13:50:34.024300 | Hiroko | pythondev_help_Hiroko_2019-02-20T13:50:34.024300 | 1,550,670,634.0243 | 9,635 |
pythondev | help | Is there a reason you're trying to copy the soup object instead of just having the HTML template remain as a string and just recreating the soup object every time you need it? | 2019-02-20T13:59:25.025400 | Carmen | pythondev_help_Carmen_2019-02-20T13:59:25.025400 | 1,550,671,165.0254 | 9,636 |
pythondev | help | Well this was just how I came up with it in the first place, and then since it hadn’t occurred to me that it was duplicating the object reference, I figured what was happening was it was just doing `souptemp = soup` once, so I figured even if I tried to do that, it would also just do that once. | 2019-02-20T14:27:49.027700 | Kristine | pythondev_help_Kristine_2019-02-20T14:27:49.027700 | 1,550,672,869.0277 | 9,637 |
pythondev | help | But now that I loaded in the copy module, and used that to actually make a copy of the string it’s working. Would there be an advantage to me recreating the soup object every time instead? | 2019-02-20T14:28:16.028300 | Kristine | pythondev_help_Kristine_2019-02-20T14:28:16.028300 | 1,550,672,896.0283 | 9,638 |
pythondev | help | (which, btw, thanks ed for reminding me object references exist lol) | 2019-02-20T14:28:38.028600 | Kristine | pythondev_help_Kristine_2019-02-20T14:28:38.028600 | 1,550,672,918.0286 | 9,639 |
pythondev | help | I'm just thinking that if you're doing a replace on the soup object, then recreating it from a pristine template each time lets you avoid dealing with deep copies of things. | 2019-02-20T15:13:48.029400 | Carmen | pythondev_help_Carmen_2019-02-20T15:13:48.029400 | 1,550,675,628.0294 | 9,640 |
pythondev | help | Well a shallowcopy was enough in this case, but yeah, now that I know I was incorrect about it just running once, that’s probably how I’ll do it in the future. | 2019-02-20T15:34:04.030400 | Kristine | pythondev_help_Kristine_2019-02-20T15:34:04.030400 | 1,550,676,844.0304 | 9,641 |
pythondev | help | FYI, <@Kristine>, most languages will do a reference when doing an assignment like that | 2019-02-20T15:36:05.031000 | Hiroko | pythondev_help_Hiroko_2019-02-20T15:36:05.031000 | 1,550,676,965.031 | 9,642 |
pythondev | help | I don’t recall one off the top of my head that will do an implicit copy | 2019-02-20T15:36:23.031400 | Hiroko | pythondev_help_Hiroko_2019-02-20T15:36:23.031400 | 1,550,676,983.0314 | 9,643 |
pythondev | help | Hi devs,
Can anyone please provide ChangeLog of BeautifulSoup4
The one i get is <https://launchpad.net/ubuntu/+source/beautifulsoup4/+changelog> for ubuntu, can anoyone provide for other platforms also thanks | 2019-02-20T15:40:02.033100 | Carissa | pythondev_help_Carissa_2019-02-20T15:40:02.033100 | 1,550,677,202.0331 | 9,644 |
pythondev | help | seems to be about it | 2019-02-20T15:41:06.034500 | Hiroko | pythondev_help_Hiroko_2019-02-20T15:41:06.034500 | 1,550,677,266.0345 | 9,645 |
pythondev | help | need to import a file from my script. I created a script named `eks-control-plane.py` and I want to import it on my `eks-builder.py` script. They *both* reside in the same directory, so I thought I could do the following:
```
import eks-control-plane as control_plane
```
but this is not working due to:
>SyntaxError: invalid syntax | 2019-02-20T15:41:42.035400 | Carlota | pythondev_help_Carlota_2019-02-20T15:41:42.035400 | 1,550,677,302.0354 | 9,646 |
pythondev | help | for the python lib, don’t think the distinction of it being the ubuntu repo is important | 2019-02-20T15:41:44.035500 | Hiroko | pythondev_help_Hiroko_2019-02-20T15:41:44.035500 | 1,550,677,304.0355 | 9,647 |
pythondev | help | <@Carlota> do you have an __init__.py in the same folder? | 2019-02-20T15:42:44.036000 | Clemmie | pythondev_help_Clemmie_2019-02-20T15:42:44.036000 | 1,550,677,364.036 | 9,648 |
pythondev | help | negative <@Clemmie> I have `if __name == "__main__":` on both scripts. | 2019-02-20T15:44:26.037000 | Carlota | pythondev_help_Carlota_2019-02-20T15:44:26.037000 | 1,550,677,466.037 | 9,649 |
pythondev | help | in order to do imports from other files your script needs to know about those files. having an empty file __init__.py in the folder allows that to happen. <https://docs.python.org/3/tutorial/modules.html#packages> | 2019-02-20T15:45:46.038400 | Clemmie | pythondev_help_Clemmie_2019-02-20T15:45:46.038400 | 1,550,677,546.0384 | 9,650 |
pythondev | help | <https://bazaar.launchpad.net/%7Eleonardr/beautifulsoup/bs4/view/head:/CHANGELOG> <@Carissa> | 2019-02-20T15:45:57.038700 | Jimmy | pythondev_help_Jimmy_2019-02-20T15:45:57.038700 | 1,550,677,557.0387 | 9,651 |
pythondev | help | not sure if it's much different than the ubuntu one | 2019-02-20T15:46:07.039100 | Jimmy | pythondev_help_Jimmy_2019-02-20T15:46:07.039100 | 1,550,677,567.0391 | 9,652 |
pythondev | help | also you are missing the trailing `__` on name in those scripts | 2019-02-20T15:46:28.039800 | Clemmie | pythondev_help_Clemmie_2019-02-20T15:46:28.039800 | 1,550,677,588.0398 | 9,653 |
pythondev | help | doesn’t seem to be a public repo for that project, all I can find are forks or mirrors | 2019-02-20T15:46:29.039900 | Hiroko | pythondev_help_Hiroko_2019-02-20T15:46:29.039900 | 1,550,677,589.0399 | 9,654 |
pythondev | help | <@Hiroko> beautifulsoup ? | 2019-02-20T15:48:18.040900 | Jimmy | pythondev_help_Jimmy_2019-02-20T15:48:18.040900 | 1,550,677,698.0409 | 9,655 |
pythondev | help | <https://code.launchpad.net/~leonardr/beautifulsoup/bs4> is the official place | 2019-02-20T15:48:25.041200 | Jimmy | pythondev_help_Jimmy_2019-02-20T15:48:25.041200 | 1,550,677,705.0412 | 9,656 |
pythondev | help | oh… bazaar? | 2019-02-20T15:49:02.041700 | Hiroko | pythondev_help_Hiroko_2019-02-20T15:49:02.041700 | 1,550,677,742.0417 | 9,657 |
pythondev | help | ¯\_(ツ)_/¯ | 2019-02-20T15:49:19.042000 | Jimmy | pythondev_help_Jimmy_2019-02-20T15:49:19.042000 | 1,550,677,759.042 | 9,658 |
pythondev | help | now that’s a name I’ve not heard in a long time | 2019-02-20T15:49:20.042100 | Hiroko | pythondev_help_Hiroko_2019-02-20T15:49:20.042100 | 1,550,677,760.0421 | 9,659 |
pythondev | help | thanks <@Clemmie> this is what i have on the script that I am running (which is calling the `eks-data-plane.py`:
```
def main():
_launch()
if __name__ == "__main__":
main()
```
just finished adding an empty file named `__init__.py` in the same directory, yet I am still getting the same error | 2019-02-20T15:50:10.042400 | Carlota | pythondev_help_Carlota_2019-02-20T15:50:10.042400 | 1,550,677,810.0424 | 9,660 |
pythondev | help | Sorry, I didn’t look close enough. Package names don’t work with `-` change the file name and import to `_` and you should be ok | 2019-02-20T15:51:14.043100 | Clemmie | pythondev_help_Clemmie_2019-02-20T15:51:14.043100 | 1,550,677,874.0431 | 9,661 |
pythondev | help | (dash and underscore respectively) | 2019-02-20T15:51:26.043400 | Clemmie | pythondev_help_Clemmie_2019-02-20T15:51:26.043400 | 1,550,677,886.0434 | 9,662 |
pythondev | help | You can make it work, but you need to do the import as a string literal, and it is a whole weird thing | 2019-02-20T15:52:10.043900 | Clemmie | pythondev_help_Clemmie_2019-02-20T15:52:10.043900 | 1,550,677,930.0439 | 9,663 |
pythondev | help | thanks <@Jimmy> | 2019-02-20T15:54:38.044100 | Carissa | pythondev_help_Carissa_2019-02-20T15:54:38.044100 | 1,550,678,078.0441 | 9,664 |
pythondev | help | I added a github repo to my requirements.txt and it seems to build but the library isn’t in my `pip list` | 2019-02-20T16:29:06.045200 | Bok | pythondev_help_Bok_2019-02-20T16:29:06.045200 | 1,550,680,146.0452 | 9,665 |
pythondev | help | > git+<https://github.mycompany.com/myteam/myrepo.git> | 2019-02-20T16:30:04.045800 | Bok | pythondev_help_Bok_2019-02-20T16:30:04.045800 | 1,550,680,204.0458 | 9,666 |
pythondev | help | >>> Building wheels for collected packages: myrepo
Running setup.py bdist_wheel for myrepo ... done
Stored in directory: /private/var/folders/70/7jmvq6pn3r54rdtj_tdv7hphw0y6lf/T/pip-ephem-wheel-cache-_zgkzauj/wheels/49/9e/50/dce766b19541b60f679e9e31fa5a5a13036658687af29a3757
Successfully built myrepo | 2019-02-20T16:31:19.046000 | Bok | pythondev_help_Bok_2019-02-20T16:31:19.046000 | 1,550,680,279.046 | 9,667 |
pythondev | help | Any ideas what I’m doing wrong? | 2019-02-20T16:31:39.046400 | Bok | pythondev_help_Bok_2019-02-20T16:31:39.046400 | 1,550,680,299.0464 | 9,668 |
pythondev | help | BTW, I don’t want to use eggs. | 2019-02-20T16:31:52.046700 | Bok | pythondev_help_Bok_2019-02-20T16:31:52.046700 | 1,550,680,312.0467 | 9,669 |
pythondev | help | Is `myrepo` in your pip list? If you're looking for the git link, that's not going to show up. | 2019-02-20T16:34:03.047200 | Carmen | pythondev_help_Carmen_2019-02-20T16:34:03.047200 | 1,550,680,443.0472 | 9,670 |
pythondev | help | No | 2019-02-20T16:34:38.047400 | Bok | pythondev_help_Bok_2019-02-20T16:34:38.047400 | 1,550,680,478.0474 | 9,671 |
pythondev | help | `pip list | grep myrepo` comes up blank | 2019-02-20T16:35:02.048000 | Bok | pythondev_help_Bok_2019-02-20T16:35:02.048000 | 1,550,680,502.048 | 9,672 |
pythondev | help | Is the directory that it listed in your build output showing up in your Python path? | 2019-02-20T16:35:53.048600 | Carmen | pythondev_help_Carmen_2019-02-20T16:35:53.048600 | 1,550,680,553.0486 | 9,673 |
pythondev | help | Alternately, you did a `pip install -r requirements.txt` command, not something that just pulls and builds without installing, right? | 2019-02-20T16:36:40.049100 | Carmen | pythondev_help_Carmen_2019-02-20T16:36:40.049100 | 1,550,680,600.0491 | 9,674 |
pythondev | help | seems like the directory listed (/private/var/folders/…) is not there now. | 2019-02-20T16:39:24.049700 | Bok | pythondev_help_Bok_2019-02-20T16:39:24.049700 | 1,550,680,764.0497 | 9,675 |
pythondev | help | I used the `pip install -r requirements.txt`. I also tried `pip install git+<https://github.mycompany.com/myteam/myrepo.git>` | 2019-02-20T16:40:13.050400 | Bok | pythondev_help_Bok_2019-02-20T16:40:13.050400 | 1,550,680,813.0504 | 9,676 |
pythondev | help | on the surface, it should work? | 2019-02-20T16:40:29.050700 | Bok | pythondev_help_Bok_2019-02-20T16:40:29.050700 | 1,550,680,829.0507 | 9,677 |
pythondev | help | All the examples I can find specify `#egg=xxxx` in the url | 2019-02-20T16:41:18.051400 | Bok | pythondev_help_Bok_2019-02-20T16:41:18.051400 | 1,550,680,878.0514 | 9,678 |
pythondev | help | BTW, I’m on osx (mojave). | 2019-02-20T16:43:31.051900 | Bok | pythondev_help_Bok_2019-02-20T16:43:31.051900 | 1,550,681,011.0519 | 9,679 |
pythondev | help | pip list looks at your Python path. So if that build directory isn't there, it's not going to list the module. | 2019-02-20T16:54:36.052600 | Carmen | pythondev_help_Carmen_2019-02-20T16:54:36.052600 | 1,550,681,676.0526 | 9,680 |
pythondev | help | OK. I think I figured it out. | 2019-02-20T17:02:27.053100 | Bok | pythondev_help_Bok_2019-02-20T17:02:27.053100 | 1,550,682,147.0531 | 9,681 |
pythondev | help | I deleted the venv/lib/site-packages/myrepo* directories then ran again and it seemed to work. | 2019-02-20T17:02:50.053700 | Bok | pythondev_help_Bok_2019-02-20T17:02:50.053700 | 1,550,682,170.0537 | 9,682 |
pythondev | help | Thanks <@Carmen> | 2019-02-20T17:06:36.054100 | Bok | pythondev_help_Bok_2019-02-20T17:06:36.054100 | 1,550,682,396.0541 | 9,683 |
pythondev | help | :+1: | 2019-02-20T17:32:54.055000 | Carmen | pythondev_help_Carmen_2019-02-20T17:32:54.055000 | 1,550,683,974.055 | 9,684 |
pythondev | help | So I made a small flask server that listens for url encoded POSTs from an API that occur every time a new customer is added to a database. I seem to have been mistaken on it being URL encoded though, because when I finally tested it with the site that has the customer data, I apparently returned a 405 (Method not allowed).
So my question is… How can I allow all types of methods, and just log the data, so I can do a test one just to see what method its actually using, and then alter my code accordingly? (Or at least, how can I record incoming data even if it’s not the type of method I’m taking, just so I can figure out what I”m working with? | 2019-02-20T18:35:30.058900 | Kristine | pythondev_help_Kristine_2019-02-20T18:35:30.058900 | 1,550,687,730.0589 | 9,685 |
pythondev | help | well, method not allowed means HTTP method | 2019-02-20T18:36:23.059200 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:36:23.059200 | 1,550,687,783.0592 | 9,686 |
pythondev | help | so, that seems to be an issue of how your flask server is hitting that API | 2019-02-20T18:36:43.059600 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:36:43.059600 | 1,550,687,803.0596 | 9,687 |
pythondev | help | eg, if its expecting a POST when only a GET is mapped to that endpoint, you’ll get a 405 | 2019-02-20T18:37:06.060200 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:37:06.060200 | 1,550,687,826.0602 | 9,688 |
pythondev | help | Well the problem is that I’m not sending anything to their server, it’s the other way around. Their API sends POSTs to my server, and I’m the one that gave them the 405 | 2019-02-20T18:38:31.061500 | Kristine | pythondev_help_Kristine_2019-02-20T18:38:31.061500 | 1,550,687,911.0615 | 9,689 |
pythondev | help | ah, ok | 2019-02-20T18:38:45.061900 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:38:45.061900 | 1,550,687,925.0619 | 9,690 |
pythondev | help | so, is there a POST handler mapped to the URL? | 2019-02-20T18:38:56.062200 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:38:56.062200 | 1,550,687,936.0622 | 9,691 |
pythondev | help | and is the URL in the mapping correct? | 2019-02-20T18:39:15.062800 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:39:15.062800 | 1,550,687,955.0628 | 9,692 |
pythondev | help | Yeah, I just tried changing it from args.get to form.get, waiting for the manager to come back to he can trigger another test from the system. | 2019-02-20T18:39:53.064100 | Kristine | pythondev_help_Kristine_2019-02-20T18:39:53.064100 | 1,550,687,993.0641 | 9,693 |
pythondev | help | for example, if you map `/some-resource/<uuid>/` and try calling it without the trailing slash, unless its specifically set up to handle that, you can get a 404 or 405 | 2019-02-20T18:39:54.064200 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:39:54.064200 | 1,550,687,994.0642 | 9,694 |
pythondev | help | Here’s what it comes in as on flask’s console `X.X.X.X - - [20/Feb/2019 15:31:36] "POST /velocify? HTTP/1.1" 200 -`
And here’s what I have at the moment (after the change I just mentioned:
```@app.route('/velocify', methods=['GET', 'POST'])
def form_example():
if request.method == 'POST':
dateSold = request.form.get('date_sold')
firstName = request.form.get('first_name')
carrierName = request.form.get('carrier_name')
attendantName = request.form.get('attendant_name')``` | 2019-02-20T18:41:40.065100 | Kristine | pythondev_help_Kristine_2019-02-20T18:41:40.065100 | 1,550,688,100.0651 | 9,695 |
pythondev | help | Okay so the manager came back, and did a test one, and it went through this time with a 200, so I guess that was what I had to do, change from args to forms | 2019-02-20T18:43:49.066000 | Kristine | pythondev_help_Kristine_2019-02-20T18:43:49.066000 | 1,550,688,229.066 | 9,696 |
pythondev | help | that would make sense, if you’re pushing form data | 2019-02-20T18:44:12.066400 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:44:12.066400 | 1,550,688,252.0664 | 9,697 |
pythondev | help | Yeah, I thought it was just URL encoded, given the interface on their site where I configured the POST to my server, but apparently it’s form data anyways. | 2019-02-20T18:45:24.067200 | Kristine | pythondev_help_Kristine_2019-02-20T18:45:24.067200 | 1,550,688,324.0672 | 9,698 |
pythondev | help | Hence the confusion. | 2019-02-20T18:45:30.067400 | Kristine | pythondev_help_Kristine_2019-02-20T18:45:30.067400 | 1,550,688,330.0674 | 9,699 |
pythondev | help | But thanks for the help. | 2019-02-20T18:45:37.067700 | Kristine | pythondev_help_Kristine_2019-02-20T18:45:37.067700 | 1,550,688,337.0677 | 9,700 |
pythondev | help | :thumbsup: | 2019-02-20T18:46:57.067900 | Hiroko | pythondev_help_Hiroko_2019-02-20T18:46:57.067900 | 1,550,688,417.0679 | 9,701 |
pythondev | help | So I wrote a script to iterate through a directory of PDF’s to print using glob: `for letter in glob.glob('/home/fileserver/letters/*.pdf'):` Does this iterate through the directory alphabetically? I only have a very small data set to work with at the moment, so unless I’m gonna cp a dozen times it’s easier for me to just ask. | 2019-02-20T19:51:24.070600 | Kristine | pythondev_help_Kristine_2019-02-20T19:51:24.070600 | 1,550,692,284.0706 | 9,702 |
pythondev | help | It may be OS-dependent, but in general it won't be alphabetical. <https://stackoverflow.com/questions/6773584/how-is-pythons-glob-glob-ordered> | 2019-02-20T19:59:56.070900 | Sasha | pythondev_help_Sasha_2019-02-20T19:59:56.070900 | 1,550,692,796.0709 | 9,703 |
pythondev | help | Ah I’ll read through that, thanks | 2019-02-20T20:00:25.071200 | Kristine | pythondev_help_Kristine_2019-02-20T20:00:25.071200 | 1,550,692,825.0712 | 9,704 |
pythondev | help | Oh sweet, there’s even an answer right there, I just have to put “sorted( )” around it | 2019-02-20T20:03:54.071600 | Kristine | pythondev_help_Kristine_2019-02-20T20:03:54.071600 | 1,550,693,034.0716 | 9,705 |
pythondev | help | Hi, I have written this script (below snippet), when I run the script, it gives me an error telling | 2019-02-21T03:59:22.074800 | Elisha | pythondev_help_Elisha_2019-02-21T03:59:22.074800 | 1,550,721,562.0748 | 9,706 |
pythondev | help | None | 2019-02-21T03:59:29.074900 | Elisha | pythondev_help_Elisha_2019-02-21T03:59:29.074900 | 1,550,721,569.0749 | 9,707 |
pythondev | help | None | 2019-02-21T03:59:43.075200 | Elisha | pythondev_help_Elisha_2019-02-21T03:59:43.075200 | 1,550,721,583.0752 | 9,708 |
pythondev | help | it means one of your http request return a `404` | 2019-02-21T04:00:37.075900 | Jimmy | pythondev_help_Jimmy_2019-02-21T04:00:37.075900 | 1,550,721,637.0759 | 9,709 |
pythondev | help | a `404` status code means `not found` | 2019-02-21T04:00:44.076300 | Jimmy | pythondev_help_Jimmy_2019-02-21T04:00:44.076300 | 1,550,721,644.0763 | 9,710 |
pythondev | help | yes | 2019-02-21T04:00:48.076400 | Elisha | pythondev_help_Elisha_2019-02-21T04:00:48.076400 | 1,550,721,648.0764 | 9,711 |
pythondev | help | so does the url you call exists ? | 2019-02-21T04:01:18.077000 | Jimmy | pythondev_help_Jimmy_2019-02-21T04:01:18.077000 | 1,550,721,678.077 | 9,712 |
pythondev | help | yes it exists | 2019-02-21T04:01:34.077600 | Elisha | pythondev_help_Elisha_2019-02-21T04:01:34.077600 | 1,550,721,694.0776 | 9,713 |
pythondev | help | you could print the url you call to make sure you are doing what you expect | 2019-02-21T04:01:44.077800 | Jimmy | pythondev_help_Jimmy_2019-02-21T04:01:44.077800 | 1,550,721,704.0778 | 9,714 |
pythondev | help | yes | 2019-02-21T04:01:54.078000 | Elisha | pythondev_help_Elisha_2019-02-21T04:01:54.078000 | 1,550,721,714.078 | 9,715 |
pythondev | help | can someone help a bit? the following code open way too many chrome processes that eat all of my ram
```chrome_options = Options()
chrome_options.add_experimental_option('prefs', {'disk-cache-size': 14096})
chrome_options.add_argument(user_agent2)
driver = webdriver.Chrome("/usr/lib/chromium-browser/chromedriver")
driver.implicitly_wait(90)
driver.set_window_size(929, 1047)
capabilities = webdriver.DesiredCapabilities.CHROME
current_ua = driver.execute_script("return navigator.userAgent")
driver.get("<https://www.example.com/>")``` | 2019-02-21T05:25:54.079300 | Karen | pythondev_help_Karen_2019-02-21T05:25:54.079300 | 1,550,726,754.0793 | 9,716 |
pythondev | help | Chrome is heavyweight, it will launch more than 1 process | 2019-02-21T06:18:39.081100 | Jonas | pythondev_help_Jonas_2019-02-21T06:18:39.081100 | 1,550,729,919.0811 | 9,717 |
pythondev | help | <@Jonas> so how to optimize this process? to use something else or? | 2019-02-21T06:42:48.081500 | Karen | pythondev_help_Karen_2019-02-21T06:42:48.081500 | 1,550,731,368.0815 | 9,718 |
pythondev | help | <@Karen> you dont wanna try headless chrome ? Its super-fast and resource friendly :slightly_smiling_face: | 2019-02-21T07:23:08.082400 | Shirly | pythondev_help_Shirly_2019-02-21T07:23:08.082400 | 1,550,733,788.0824 | 9,719 |
pythondev | help | <@Shirly> this is headless chrome it opens 7 processes each time | 2019-02-21T07:26:00.083400 | Karen | pythondev_help_Karen_2019-02-21T07:26:00.083400 | 1,550,733,960.0834 | 9,720 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.