Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
2 Endorsements
Ranked #621
Ranked #2K
~43.6K People Reached
Member Avatar for abaddon2031

What line is causing the error. Perhaps you could post the error message? It sounds like one of your el.find statements is coming up empty (None) and that's causing the error

Member Avatar for abaddon2031
0
296
Member Avatar for chophouse

I'm trying to design a lambda function that returns any line in a file that begins with any digit [0-9]. The point would be to return the whole line if it does, and skip any line if it doesn't. This is for log analysis where I want all the lines …

Member Avatar for Gribouillis
0
341
Member Avatar for chophouse

Does anyone on the forum have any experience with pyspark (Python API for Apache Spark)

0
124
Member Avatar for chophouse

I've written this function to take a list and shift each member right by the number supplied as the offset. I want to preserve the supplied list and return the shifted list. My problem is that the function modifies the supplied input list itself as well as returning a new …

Member Avatar for chophouse
0
294
Member Avatar for chophouse

Using Python 3.3.0 and this script: from ftplib import FTP_TLS ftps = FTP_TLS('xxx.xx.xxx.xx') ftps.sendcmd('USER myuname') ftps.sendcmd('PASS mypwd') ftps.prot_p() ftps.retrlines('LIST') ftps.quit() I get a connection failure due to timeout >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:\Python33\fixFTP.py", line 2, in <module> ftps = FTP_TLS('xxx.xx.xxx.xx') File "C:\Python33\lib\ftplib.py", line …

Member Avatar for Gribouillis
0
2K
Member Avatar for chophouse

I'm having trouble calling a function I've written after importing the module containing it. The module is called funky.py. Here is the code for funky.py: from ftplib import FTP_TLS #### FUNCTION --- fileup() #### for sending file via FTP TLS ## ## arg1 .. destname > the filename to be …

Member Avatar for chophouse
0
17K
Member Avatar for chophouse

Need help understanding this error, and how to eliminate it. Using Python 3.3. I'm trying to define a function that takes two arguments and then constructs the proper arguments for a call to the ftblib.storbinary method. Here's my code: from ftplib import FTP_TLS ftps = FTP_TLS('xxxxxx', user='xxxx', passwd='xxxx') ftps.prot_p() ftps.set_pasv(False) …

Member Avatar for chophouse
0
9K
Member Avatar for chophouse

I'm writing a script to automatically up load a file from Server A to FTP server B. I'm getting stuck at the connecting part. I can connect with a python script using regular FTP, and have done so, but when trying to implement a SSL connection, I keep getting a …

Member Avatar for chophouse
0
3K
Member Avatar for Iceman10284

I'm new too (couple months), but you have to write code, not forever think about what might work. Try something, get it to work, then try the next thing. For instance write the code to ask the user to input a list of 20 integers. Make that work, then try …

Member Avatar for booicu
-1
7K
Member Avatar for chophouse

I'm not sure exactly which forum to ask this,so I'm starting here, I have a cron job I want to execute every 72 minutes. I've researched how to schedule the job for an interval of 60 min or less, but is there a way to specify a minutes interval when …

Member Avatar for Watael
0
571
Member Avatar for chophouse

Is the following possible using Python? 1. Given a directory with 500 emails in it. These are all bounced emails. 2. Have script open 1st email 3. Python extracts the failed email address (from body of email, not header or addressing) 4. Script appends found email address to separate file …

Member Avatar for chophouse
0
173
Member Avatar for chophouse

My Python environment: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32 I have a script that has been running for months. It's a cron job and suddenly it started throwing this error: *pymysql.err.Error: (<class 'TypeError'>, TypeError("'int' does not support the buffer interface",))* I don't …

Member Avatar for chophouse
0
626
Member Avatar for chophouse

I just moved to a new server and installed Python 3.3. On my old box i was using Python 3.2. Now my scripts that import pymysql won't work, saying the module doesn't exist. Wher do I download this from? I'm on Win Server 2008 R2 (on both boxes) Thanks

Member Avatar for chophouse
0
103
Member Avatar for gilgil2

Use a cron job. If you are on a windows platform (I am) I'd recommend Windows Cron Service by Intelladmin http://www.intelliadmin.com/?p=5079

Member Avatar for chophouse
0
152
Member Avatar for javanub123

Guessing here, but maybe you need to give the full absolute path: 'C:\Users\spreston\Desktop\HeadFirst\Chapter 3' assuming that is what the full absolute path is, of course

Member Avatar for Gribouillis
0
142
Member Avatar for chophouse

I'm getting an error/crash when trying to use Python on my virtual server running Win 2008 Server. Python installed without incident, and IDLE opens and the interactive widnow works fine. But when I try to open a new window and run it it crshes when trying to save. Example: I …

Member Avatar for chophouse
0
2K
Member Avatar for chophouse

I have a question about a better way to do this as what I've written seems clunky. I'm trying to generate 2 variables here that will be used as the date in a BETWEEN clause in MySQL. In order to get the proper construction (YYYYMMDD) I am converting to a …

Member Avatar for chophouse
0
287
Member Avatar for chophouse

This is part of another script, too long for here, but isolating this part, my dilemma is that this works when manually invoked from IDLE, but not when run as a cron job. from datetime import datetime import os # check to see if a log file exists, make one …

Member Avatar for chophouse
0
236
Member Avatar for chophouse

Has anybody written or know of a log parser I can use to parse Shoutcast (v2) logs?

0
71
Member Avatar for chophouse

Is there a way to use Order by RAND() for a query so that it returns a list of results and guarantees that adjacent values will be at least 'x' from each other, on either side? The results are all numbers, no strings. So if it returns 5 results r1 …

Member Avatar for chophouse
0
137
Member Avatar for chophouse

I'm writing a script to populate a list with the last 5 albums frm a list of what's about to play. My query works in terms of retrieving the values, but the list populates with a set of parens and an extra comma added to each returned value. Any ideas …

Member Avatar for chophouse
0
143
Member Avatar for chophouse

My first Daniweb question!! Am at the front end of learning Python (3.2.3) I'm doing a SQL query into a MySQL database for two fields, track_ID and track_duration. I'm getting a return of both, but instead of the duration value being expressed as 00:02:50, as it is stored in the …

Member Avatar for TrustyTony
0
152
Member Avatar for chophouse

Over the last couple weeks my Outlook program has been automatically sending what I think are mass emails to addresses with a .ru suffix. I only know this because I periodically (about 2x a week) get failure notices where an email address was undeliverable. I usually get about a dozen …

0
45